Skip to content

orchestrator/global: Delete tasks when their node is deleted#2301

Merged
aluzzardi merged 1 commit intomoby:masterfrom
aaronlehmann:global-service-removed-node
Jul 11, 2017
Merged

orchestrator/global: Delete tasks when their node is deleted#2301
aluzzardi merged 1 commit intomoby:masterfrom
aaronlehmann:global-service-removed-node

Conversation

@aaronlehmann
Copy link
Copy Markdown
Collaborator

Currently, the global orchestrator leaves associated tasks around when
a node is deleted. There is no process for reaping these tasks, as the
task reaper keeps a certain number of global service tasks per node.
Instead, delete the task right away when its node is deleted. This is
similar to how the replicated orchestrator deletes tasks when scaling
down, since tasks in those slots that are no longer being used would not
end up being reaped.

Fixes #2295

cc @thaJeztah

Currently, the global orchestrator leaves associated tasks around when
a node is deleted. There is no process for reaping these tasks, as the
task reaper keeps a certain number of global service tasks *per node*.
Instead, delete the task right away when its node is deleted. This is
similar to how the replicated orchestrator deletes tasks when scaling
down, since tasks in those slots that are no longer being used would not
end up being reaped.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 10, 2017

Codecov Report

Merging #2301 into master will increase coverage by 0.1%.
The diff coverage is 45.45%.

@@            Coverage Diff            @@
##           master    #2301     +/-   ##
=========================================
+ Coverage   61.06%   61.16%   +0.1%     
=========================================
  Files         128      128             
  Lines       20550    20556      +6     
=========================================
+ Hits        12549    12574     +25     
+ Misses       6630     6615     -15     
+ Partials     1371     1367      -4

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, not too familiar with this code, so didn't review, but can try to dive into it if desired 😄 thanks!

@aluzzardi aluzzardi merged commit a3d96fe into moby:master Jul 11, 2017
andrewhsu pushed a commit to docker-archive/docker-ce that referenced this pull request Jul 14, 2017
- moby/swarmkit#2266 (support for templating Node.Hostname in docker executor)
- moby/swarmkit#2281 (change restore action on objects to be update, not delete/create)
- moby/swarmkit#2285 (extend watch queue with timeout and size limit)
- moby/swarmkit#2253 (version-aware failure tracking in the scheduler)
- moby/swarmkit#2275 (update containerd and port executor to container client library)
- moby/swarmkit#2292 (rename some generic resources)
- moby/swarmkit#2300 (limit the size of the external CA response)
- moby/swarmkit#2301 (delete global tasks when the node running them is deleted)

Minor cleanups, dependency bumps, and vendoring:
- moby/swarmkit#2271
- moby/swarmkit#2279
- moby/swarmkit#2283
- moby/swarmkit#2282
- moby/swarmkit#2274
- moby/swarmkit#2296 (dependency bump of etcd, go-winio)

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 4509a00
Component: engine
silvin-lubecki pushed a commit to silvin-lubecki/engine-extract that referenced this pull request Mar 16, 2020
- moby/swarmkit#2266 (support for templating Node.Hostname in docker executor)
- moby/swarmkit#2281 (change restore action on objects to be update, not delete/create)
- moby/swarmkit#2285 (extend watch queue with timeout and size limit)
- moby/swarmkit#2253 (version-aware failure tracking in the scheduler)
- moby/swarmkit#2275 (update containerd and port executor to container client library)
- moby/swarmkit#2292 (rename some generic resources)
- moby/swarmkit#2300 (limit the size of the external CA response)
- moby/swarmkit#2301 (delete global tasks when the node running them is deleted)

Minor cleanups, dependency bumps, and vendoring:
- moby/swarmkit#2271
- moby/swarmkit#2279
- moby/swarmkit#2283
- moby/swarmkit#2282
- moby/swarmkit#2274
- moby/swarmkit#2296 (dependency bump of etcd, go-winio)

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 4509a00
Component: engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants