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

updog: ignore termination signals right before initiating reboot #869

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

etungsten
Copy link
Contributor

Issue number:
Fixes #864 and partially addresses bottlerocket-os/bottlerocket-update-operator#28

Description of changes:
Termination signals are ignored right before shutdown -r invocation.
This change allows updog to exit normally (with exit code 0, as to indicate a successful update
operation) after initiating reboot.

Testing done:

  1. Built Bottlerocket image with release version set to 0.3.0.
  2. Created an ASG with 18 instances of said image and have all instances join my cluster
  3. Installed bottlerocket-update-operator on my cluster.
  4. Observed all 18 nodes automatically upgraded from my dirty v0.3.0 to the v0.3.1 image from the TUF repository successfully one by one.
  5. All nodes uncordoned successfully, and can run pods fine.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@etungsten etungsten requested review from bcressey and jahkeup March 25, 2020 21:13
@etungsten etungsten changed the title updog: ignore termination signals right before initating reboot updog: ignore termination signals right before initiating reboot Mar 25, 2020
@etungsten etungsten requested a review from sam-aws March 25, 2020 21:17
To allow updog exit normally (as to indicate successful update
operation) after initiating reboot, termination
signals are ignored right before `shutdown -r` invocation.
@etungsten
Copy link
Contributor Author

etungsten commented Mar 25, 2020

Push above addresses @tjkirch 's comments.

Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

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

LGTM, but would you please confirm the testing is still OK with the reduced signal set?

@etungsten
Copy link
Contributor Author

LGTM, but would you please confirm the testing is still OK with the reduced signal set?

I tested the new changes with the steps in the PR description and everything still works as expected.

@etungsten etungsten merged commit 5c5ec4b into bottlerocket-os:develop Mar 26, 2020
@etungsten etungsten deleted the updog-handle-term branch March 26, 2020 17:58
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.

Updater exits non-zero when passed flag to reboot
3 participants