Skip to content

Update design to describe desired state REMOVE behavior for tasks#2485

Merged
anshulpundir merged 1 commit intomoby:masterfrom
nishanttotla:update-task-model-design
Jan 17, 2018
Merged

Update design to describe desired state REMOVE behavior for tasks#2485
anshulpundir merged 1 commit intomoby:masterfrom
nishanttotla:update-task-model-design

Conversation

@nishanttotla
Copy link
Copy Markdown
Contributor

Updating design docs based on new behavior introduced in #2461.

Ping @dperny @anshulpundir

Signed-off-by: Nishant Totla nishanttotla@gmail.com

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 16, 2018

Codecov Report

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

@@            Coverage Diff             @@
##           master    #2485      +/-   ##
==========================================
+ Coverage   61.45%   61.52%   +0.07%     
==========================================
  Files         129      129              
  Lines       21292    21292              
==========================================
+ Hits        13084    13099      +15     
+ Misses       6799     6778      -21     
- Partials     1409     1415       +6

the `REJECTED` state if the agent rejected the
task, or the `ORPHANED` state if the node on which the task is scheduled is
down for too long.
down for too long. The orchestrator might also set desired state for a task to
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.

The orchestrator might also set desired
Make this more certain e.g. the orchestrator will also set desired state for a task to 'REMOVE' for tasks not already in a terminal state.

down for too long. The orchestrator might also set desired state for a task to
`REMOVE` when the service associated with the task was removed or scaled down
by the user. When this happens, the agent proceeds to shut the task down.
The task is only fully removed by the task reaper when the shutdown succeeds.
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.

fully removed => removed from the store

`REMOVE` when the service associated with the task was removed or scaled down
by the user. When this happens, the agent proceeds to shut the task down.
The task is only fully removed by the task reaper when the shutdown succeeds.
Notice that tasks that were removed becacuse of service removal or scale down
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.

This line is probably redundant with the change above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it's useful to keep it here (also not sure why it's redundant).

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.

Redundant because of the line "The task is removed from the store by the task reaper only after the shutdown succeeds."

Removed from the store == not kept around in task history.

But its not a big deal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. Still think it is useful to state explicitly for clarity.

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
@nishanttotla nishanttotla force-pushed the update-task-model-design branch from 2eb6a7e to 46ee581 Compare January 16, 2018 20:45
@nishanttotla
Copy link
Copy Markdown
Contributor Author

@anshulpundir addressed your comments.

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.

2 participants