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

pubsys: improve logging for publish-ami #2688

Closed
webern opened this issue Dec 29, 2022 · 0 comments · Fixed by #2695
Closed

pubsys: improve logging for publish-ami #2688

webern opened this issue Dec 29, 2022 · 0 comments · Fixed by #2695
Assignees
Labels
area/tools Issues in the build, publishing or other tooling1 or scripts type/bug Something isn't working

Comments

@webern
Copy link
Contributor

webern commented Dec 29, 2022

What I'd like:

During pubsys publish-ami, which is called by cargo make ami-public, certain error paths can be confusing. It can appear that an error occurred for one region only, and that the other regions were successfully made public when, in fact, no regions were made public.

This contributed to #2617. We are taking other, stronger measures to ensure that private AMIs cannot be promoted to public SSM params (these include, but are not limited to, #2621 and #2680). In addition to such stronger measures, we also want to improve error messaging.

The confusing error looked like this:

Failed to publish AMI: AMI 'ami-xyz123' in some-region-1 did not become available: Failed to reach desired state within 90 attempts for ami-xyz123 in some-region-1

It came from here:

https://github.com/bottlerocket-os/bottlerocket/blob/develop/tools/pubsys/src/aws/publish_ami/mod.rs#L173..L178

It could lead someone to believe that only one region (i.e. some-region-1) has failed to become public. In fact what it means is that one of the AMIs was detected to be unavailable, and the operation was aborted before ANY AMIs were made public.

The goal of this issue is to make this error condition more clear.
At the same time, we may want to reduce the verbosity of the "happy" path to draw more attention to error conditions.

@webern webern added type/bug Something isn't working area/tools Issues in the build, publishing or other tooling1 or scripts labels Dec 29, 2022
@webern webern self-assigned this Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tools Issues in the build, publishing or other tooling1 or scripts type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant