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
Set log-level immediately, before rootless setup #4124
Set log-level immediately, before rootless setup #4124
Conversation
If we don't do this, we print WARN level messages that we should not be printing by default. Up one WARN message to ERROR so it still shows up by default. Fixes: containers#4115 Fixes: containers#4012 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@giuseppe PTAL. I think this is safe to do before rootless setup happens. |
Tentative LGTM! I hand-built this on my f30 laptop, copied the binary over to an f31 vm, played around with it in nonroot mode. Warning messages are gone! Lots of cgroups failures, but I'm guessing that's because my build didn't have the right tags. Thanks, @mheon! |
yeah lgtm here |
LGTM, nice catch/fix @mheon |
Happy green test buttons here too |
/lgtm |
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, just an online comment
@@ -365,7 +365,7 @@ func GetConfiguredMappings() ([]idtools.IDMap, []idtools.IDMap, error) { | |||
} | |||
mappings, err := idtools.NewIDMappings(username, username) | |||
if err != nil { | |||
logrus.Warnf("cannot find mappings for user %s: %v", username, err) | |||
logrus.Errorf("cannot find mappings for user %s: %v", username, err) | |||
} else { |
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.
Would it be a problem for people using a single ID mapped to get always the error?
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.
That's what was happening before, so I kept it. We can swap it back if folks complain, I think.
If we don't do this, we print WARN level messages that we should not be printing by default.
Up one WARN message to ERROR so it still shows up by default.
Fixes: #4115
Fixes: #4012