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

Change some log messages from warning to info #5927

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ani-sinha
Copy link
Contributor

Proposed Commit Message

Warning logs tends to alert customers that something is broken! Info log level is more suitable in those cases where we want to inform the user of some actions but not give an impression that something is broken and needs fixing. Convert some warn logs to info logs when handling user account passwords.

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

Warning logs tends to alert customers that something is broken! Info log level
is more suitable in those cases where we want to inform the user of some actions
but not give an impression that something is broken and needs fixing. Convert
some warn logs to info logs when handling user account passwords.

Signed-off-by: Ani Sinha <[email protected]>
@ani-sinha
Copy link
Contributor Author

@TheRealFalcon what do you think?

@TheRealFalcon
Copy link
Member

TheRealFalcon commented Dec 19, 2024

@ani-sinha

Warning logs tends to alert customers that something is broken

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 passwd, I can see the case for downgrading that to INFO, both in that we specifically document that passwd doesn't apply to existing users and to use hashed_passwd instead for that use case, along with the fact that a new instance id or calling of cloud-init clean can wind up triggering this warning without the user having done anything to cause this warning. For the other two though, it seems they can only be triggered if this user is asking for something that doesn't make sense.

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 lock_passwd cases to be downstream changes rather than upstream?

@ani-sinha
Copy link
Contributor Author

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?

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.

@ani-sinha
Copy link
Contributor Author

If so, do you think it makes mores sense for the lock_passwd cases to be downstream changes rather than upstream?

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.

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.

2 participants