Skip to content

Add REMOVE and ORPHANED to TaskState#36146

Merged
yongtang merged 1 commit intomoby:masterfrom
yongtang:36142-TaskState
Feb 2, 2018
Merged

Add REMOVE and ORPHANED to TaskState#36146
yongtang merged 1 commit intomoby:masterfrom
yongtang:36142-TaskState

Conversation

@yongtang
Copy link
Copy Markdown
Member

This fix tries to address the issue raised in #36142 where
there are discrepancies between Swarm API and swagger.yaml.

This fix adds two recently added state REMOVE and ORPHANED to TaskState.

This fix fixes #36142.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

This fix tries to address the issue raised in 36142 where
there are discrepancies between Swarm API and swagger.yaml.

This fix adds two recently added state `REMOVE` and `ORPHANED` to TaskState.

This fix fixes 36142.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
@yongtang
Copy link
Copy Markdown
Member Author

yongtang commented Feb 2, 2018

/cc @thaJeztah Please take a look.

@thaJeztah
Copy link
Copy Markdown
Member

relates to moby/swarmkit#2461, moby/swarmkit#2485 (vendored through #35698)

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.

LGTM

@tiborvass
Copy link
Copy Markdown
Contributor

LGTM

@gbarr01
Copy link
Copy Markdown

gbarr01 commented Mar 12, 2018

@thaJeztah ... shouldn't the state be "REMOVED" and not "REMOVE"? Compare the others:

https://docs.docker.com/engine/swarm/how-swarm-mode-works/swarm-task-states/

Task state | Description
-- | --
NEW | The task was initialized.
PENDING | Resources for the task were allocated.
ASSIGNED | Docker assigned the task to nodes.
ACCEPTED | The task was accepted by a worker node. If a worker node rejects the task, the state changes to REJECTED.
PREPARING | Docker is preparing the task.
STARTING | Docker is starting the task.
RUNNING | The task is executing.
COMPLETE | The task exited without an error code.
FAILED | The task exited with an error code.
SHUTDOWN | Docker requested the task to shut down.
REJECTED | The worker node rejected the task.
ORPHANED | The node was down for too long.

@thaJeztah
Copy link
Copy Markdown
Member

@gbarr01 this is documenting what was implemented in SwarmKit. I think the state REMOVE is to indicate that the task is ready for removal (not removed yet), so I assume that's why it was named remove instead of removed, but @anshulpundir or @nishanttotla should be able to give you the full story :D

@nishanttotla
Copy link
Copy Markdown
Contributor

@gbarr01 what @thaJeztah said is pretty much accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

api/swagger.yaml does not contain "orphaned" as a TaskState

6 participants