-
Notifications
You must be signed in to change notification settings - Fork 911
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
tests: ec2 check status exit code instead of cloud-init init --local #5504
tests: ec2 check status exit code instead of cloud-init init --local #5504
Conversation
2 | ||
if should_log_deprecation( | ||
"24.3", get_feature_flag_value(client, "DEPRECATION_INFO_BOUNDARY") | ||
) | ||
else 0 | ||
) | ||
assert client.execute("cloud-init clean --logs") | ||
assert return_code == client.execute("cloud-init init --local").return_code | ||
assert status_code == client.execute("cloud-init status").return_code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's any reason to be checking cloud-init status in this test. That was never the point of this test.
I think we should just revert this file to its state prior to https://github.com/canonical/cloud-init/pull/5209/files#diff-53a08506f1820f460078130200aee26e99c5a8f151d99367acfef2d7db5020beR12
f35ef37
to
1b9bb92
Compare
Commit 604d80e introduced assertions expecting exit 2 from the CLI when calling cloud-init init --local. Revert this test assertion as only cloud-init status command exits (2) on deprecations/warnings. Invoking cloud-init's boot stages on the commmand line will only exit 1 if critical errors are encountered to avoid degrading overall systemd health as seen from cloud-init systemd units. When cloud-init boot stages encounter recoverable_errors of any type, there is no need to exit non-zero as those deprecation logs are not-critical to the health of the system as a whole.
1b9bb92
to
a6b4206
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
…onical#5504) Commit 604d80e introduced assertions expecting exit 2 from the CLI when calling cloud-init init --local. Revert this test assertion as only cloud-init status command exits (2) on deprecations/warnings. Invoking cloud-init's boot stages on the commmand line will only exit 1 if critical errors are encountered to avoid degrading overall systemd health as seen from cloud-init systemd units. When cloud-init boot stages encounter recoverable_errors of any type, there is no need to exit non-zero as those deprecation logs are not-critical to the health of the system as a whole.
Commit 604d80e introduced assertions expecting exit 2 from the CLI when calling cloud-init init --local. Revert this test assertion as only cloud-init status command exits (2) on deprecations/warnings. Invoking cloud-init's boot stages on the commmand line will only exit 1 if critical errors are encountered to avoid degrading overall systemd health as seen from cloud-init systemd units. When cloud-init boot stages encounter recoverable_errors of any type, there is no need to exit non-zero as those deprecation logs are not-critical to the health of the system as a whole.
Proposed Commit Message
Additional Context
Expected integration test failure on ec2 with daily PPA tomorrow because cloud-init init --local (or any direct call to cloud-init stage doesn't actually exit non-zero because we didn't want cloud-init systemd units/services to degrade overall systemd health based on recoverable_errors.
Test Steps
Merge type