Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdateDesiredStatus for task stop verification ACK #4240

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

danehlim
Copy link
Contributor

@danehlim danehlim commented Jul 10, 2024

Summary

Update ECS Agent to update containers' (desired) statuses when stopping a task as part of responding to a task stop verification ACK received from ACS.

ECS Agent may not call UpdateDesiredStatus when stopping tasks in response to task stop verification ACKs sent from ACS. Having ECS Agent perform this call is strictly necessary since UpdatedDesiredStatus is responsible for updating container statuses to STOPPED in this case.

For supplementary information on when ACS may send a task stop verification ACK to ECS Agent, please refer to the original pull request for full task sync feature.

Implementation details

  • Call UpdateDesiredStatus after setting desired status for the task here (refer to Summary above)
  • Remove redundant call to AddTask
  • Add logic to save task state to Agent local state DB when setting task's status to STOPPED as part of processing task stop verification ACK from ACS

Testing

Manually test using a custom ECS Agent built with the changes in this pull request against an internal bug repro environment. With the custom ECS Agent, bug behavior is no longer observed.

New tests cover the changes: existing tests updated (additional verification of containers' desired statuses being updated when stopping a task in response to a task stop verification ACK)

Description for the changelog

UpdateDesiredStatus for task stop verification ACK

Does this PR include breaking model changes? If so, Have you added transformation functions?

No

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@danehlim danehlim marked this pull request as ready for review July 11, 2024 16:48
@danehlim danehlim requested a review from a team as a code owner July 11, 2024 16:48
@danehlim danehlim merged commit fb239e3 into aws:dev Jul 11, 2024
40 checks passed
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.

5 participants