-
Notifications
You must be signed in to change notification settings - Fork 908
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
Use log_with_downgradable_level for user password configuration warnings #5927
Conversation
6318fc9
to
8cc3a60
Compare
@TheRealFalcon what do you think? |
Hmmm, I would say that errors are for alerting that something is broken. In the cases pointed out in this PR, cloud-init was asked to do something that it was not able to. I think that is something worthy of a warning, especially surrounding user passwords. Otherwise the only way somebody would be alerted to this condition is if they go digging through the logs which won't happen unless somebody notices a problem and correctly identifies cloud-init as the cause. That said, in the case of May I ask where this request is coming from? Is there a customer on a stable platform that started seeing a return code of 2 after our new warning mechanism was backported? If so, do you think it makes mores sense for the |
The request is not yet from a customer but we suspect that once we start rolling this out to the hands of our customers, they will complain and get confused. This has happened before with other logs and the schema validator. |
If upstream is not willing to change this, we are debating whether to have a downstream only patch or to simply document it and point customers to it if they ask. |
Yes, agree with here. |
That could happen, however the commit that introduced these warnings was released in 24.3 - at the end of August. Nobody has complained about it yet on Ubuntu which has been running this code (backported to old series of Ubuntu) for months.
Spurious warnings messages that cropped up for a few reasons: cloud-init automatically accepted multiple key types in some cases that were missed, and in other cases it was just an auditing error when generating the schema. It is unfortunate that this happened, however I think that the bulk of the issues have been resolved - and the rate of new warnings being added has slowed significantly.
In the case of a configuration that cloud-init cannot successfully fulfill, I strongly believe that emitting a warning to aid user debugging is better for end users than silently failing. In the cases where cloud-init was asked to do something that it is unable to do, choosing to not log a warning seems to prioritize downstream stability over what I think is best for future users. This isn't a tradeoff that I want to accept in upstream cloud-init. |
There is a compromise that should satisfy downstream stability desires while enabling upstream to make forward progress to improve user experience. This helper function allows logging a warning or error message with an annotated cloud-init version at the callsite. When the cloud-init version set at the callsite is newer than the version set in Perhaps these warning log sites could be converted to use this helper? |
yes I think for c9s, we can use this simple downstream patch to not cause a disruption/behavior change for our customers. Let me see if I can send some patch. |
8cc3a60
to
f91acc2
Compare
f91acc2
to
a1ee419
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.
Thanks for the update @ani-sinha . This approach will work.
The changes look good, but 168f821 was recently merged that refactored the args
argument to be a tuple. Would you be able to update the args
in these calls to be tuples instead?
Introduction of new WARNING level logs could be problematic for stable downstream distros. Customers using these distros would then see a new and unexpected behavior change or a new WARNING log that can confuse them. So for handling user account passwords, use log_with_downgradable_level() helper api instead so that downstream distros can maintain stability while also making progressive changes in upstream towards improved user experience. Downstream distros can convert these logs to DEBUG level by setting DEPRECATION_INFO_BOUNDARY to a value older than the cloud-init version at which these logs were first introduced (24.3). Please see the documentation for log_with_downgradable_level(). Signed-off-by: Ani Sinha <anisinha@redhat.com>
a1ee419
to
6533189
Compare
Done. |
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!
Introduction of new WARNING level logs could be problematic for stable downstream distros. Customers using these distros would then see a new and unexpected behavior change or a new WARNING log that can confuse them. So for handling user account passwords, use log_with_downgradable_level() helper api instead so that downstream distros can maintain stability while also making progressive changes in upstream towards improved user experience. Downstream distros can convert these logs to DEBUG level by setting DEPRECATION_INFO_BOUNDARY to a value older than the cloud-init version at which these logs were first introduced (24.3). Please see the documentation for log_with_downgradable_level(). Signed-off-by: Ani Sinha <anisinha@redhat.com>
…#5927) Introduction of new WARNING level logs could be problematic for stable downstream distros. Customers using these distros would then see a new and unexpected behavior change or a new WARNING log that can confuse them. So for handling user account passwords, use log_with_downgradable_level() helper api instead so that downstream distros can maintain stability while also making progressive changes in upstream towards improved user experience. Downstream distros can convert these logs to DEBUG level by setting DEPRECATION_INFO_BOUNDARY to a value older than the cloud-init version at which these logs were first introduced (24.3). Please see the documentation for log_with_downgradable_level(). Signed-off-by: Ani Sinha <anisinha@redhat.com>
…#5927) Introduction of new WARNING level logs could be problematic for stable downstream distros. Customers using these distros would then see a new and unexpected behavior change or a new WARNING log that can confuse them. So for handling user account passwords, use log_with_downgradable_level() helper api instead so that downstream distros can maintain stability while also making progressive changes in upstream towards improved user experience. Downstream distros can convert these logs to DEBUG level by setting DEPRECATION_INFO_BOUNDARY to a value older than the cloud-init version at which these logs were first introduced (24.3). Please see the documentation for log_with_downgradable_level(). Signed-off-by: Ani Sinha <anisinha@redhat.com>
Proposed Commit Message
Merge type