Skip to content

Comments for Task Reaper.#2421

Merged
anshulpundir merged 1 commit intomoby:masterfrom
anshulpundir:orphaned
Oct 31, 2017
Merged

Comments for Task Reaper.#2421
anshulpundir merged 1 commit intomoby:masterfrom
anshulpundir:orphaned

Conversation

@anshulpundir
Copy link
Copy Markdown
Contributor

Based on recent conversations about 'orphaned' task state and the task reaper. Just wanted to capture these in the code for better readability.

Signed-off-by: Anshul Pundir anshul.pundir@docker.com

@anshulpundir anshulpundir force-pushed the orphaned branch 2 times, most recently from 1703dfb to 221f945 Compare October 31, 2017 01:21
@anshulpundir
Copy link
Copy Markdown
Contributor Author

@aaronlehmann please take a look.

cc @nishanttotla

Copy link
Copy Markdown
Collaborator

@aaronlehmann aaronlehmann left a comment

Choose a reason for hiding this comment

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

Overall LGTM

api/types.proto Outdated
REJECTED = 768 [(gogoproto.enumvalue_customname)="TaskStateRejected"]; // task could not be executed here.
ORPHANED = 832 [(gogoproto.enumvalue_customname)="TaskStateOrphaned"]; // The node on which this task is scheduled is Down for too long
// The purpose of this state is to free up resources associated with service tasks on unresponsive nodes
// , without having to delete those tasks. This state is directly assigned as current task state by the
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Weird comma at the beginning of the line here.

api/types.proto Outdated
ORPHANED = 832 [(gogoproto.enumvalue_customname)="TaskStateOrphaned"]; // The node on which this task is scheduled is Down for too long
// The purpose of this state is to free up resources associated with service tasks on unresponsive nodes
// , without having to delete those tasks. This state is directly assigned as current task state by the
// orchestrator (as opposed to setting it as the desired state which is not very intuitive).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't understand the last part.

api/types.proto Outdated
FAILED = 704 [(gogoproto.enumvalue_customname)="TaskStateFailed"]; // task execution failed with error
REJECTED = 768 [(gogoproto.enumvalue_customname)="TaskStateRejected"]; // task could not be executed here.
ORPHANED = 832 [(gogoproto.enumvalue_customname)="TaskStateOrphaned"]; // The node on which this task is scheduled is Down for too long
// The purpose of this state is to free up resources associated with service tasks on unresponsive nodes
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Extra space after "associated"

}
}

// Tick performs the actual cleanup.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Lowercase "tick"

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 31, 2017

Codecov Report

Merging #2421 into master will increase coverage by 0.11%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2421      +/-   ##
==========================================
+ Coverage   60.69%   60.81%   +0.11%     
==========================================
  Files         128      128              
  Lines       26401    26401              
==========================================
+ Hits        16025    16055      +30     
+ Misses       8974     8942      -32     
- Partials     1402     1404       +2

Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
@anshulpundir anshulpundir merged commit 0769c60 into moby:master Oct 31, 2017
FAILED = 704 [(gogoproto.enumvalue_customname)="TaskStateFailed"]; // task execution failed with error
REJECTED = 768 [(gogoproto.enumvalue_customname)="TaskStateRejected"]; // task could not be executed here.
ORPHANED = 832 [(gogoproto.enumvalue_customname)="TaskStateOrphaned"]; // The node on which this task is scheduled is Down for too long
// The main purpose of this state is to free up resources associated with service tasks on
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use Go style for these comments: start with the identifier.

// TaskStateOrphaned ...

stopChan chan struct{}
doneChan chan struct{}

// List of slot tubles to be inspected for task history cleanup.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again, make sure to follow godoc style for these: start with the identifier.

@stevvooe
Copy link
Copy Markdown
Contributor

@anshulpundir It is considered poor form to self merge. I understand there are situations where it is okay, but this is an open source project and review standards must be met.

Copy link
Copy Markdown
Contributor Author

@anshulpundir anshulpundir left a comment

Choose a reason for hiding this comment

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

It is considered poor form to self merge. I understand there are situations where it is okay, but this is an open source project and review standards must be met.

I was not aware of that. Thanks for letting me know!
edit: Can you please elaborate on why this is considered poor form ? I'd also suggest adding that to https://github.com/docker/swarmkit/blob/master/CONTRIBUTING.md @stevvooe

marcusmartins added a commit to marcusmartins/docker that referenced this pull request Nov 3, 2017
Upgrade swarmkit dependency.

Changes:
moby/swarmkit@ce5f7b8a (HEAD -> master, origin/master, origin/HEAD) Merge pull request moby/swarmkit#2411 from crunchywelch/2401-arm64_support
moby/swarmkit@b0856099 Merge pull request moby/swarmkit#2423 from thaJeztah/new-misty-handle
moby/swarmkit@2bd294fc Update Misty's GitHub handle
moby/swarmkit@0769c605 Comments for orphaned state/task reaper. (moby/swarmkit#2421)
moby/swarmkit@de950a7e Generic resource cli (moby/swarmkit#2347)
moby/swarmkit@312be598 Provide custom gRPC dialer to override default proxy dialer (moby/swarmkit#2419)
moby/swarmkit@4f12bf79 Merge pull request moby/swarmkit#2415 from cheyang/master
moby/swarmkit@8f9f7dc1 add pid limits
moby/swarmkit@da5ee2a6 Merge pull request moby/swarmkit#2409 from dperny/workaround-attachments
moby/swarmkit@0c7b2fc2 Delete node attachments when node is removed
moby/swarmkit@9d702763 normalize "aarch64" architectures to "arm64"

moby/swarmkit@28f91d8...ce5f7b8

Signed-off-by: Marcus Martins <marcus@docker.com>
denverdino pushed a commit to AliyunContainerService/swarmkit that referenced this pull request Nov 5, 2017
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
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