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

fix(recurring-job): flooded source label log #2058

Merged

Conversation

c3y1huang
Copy link
Contributor

@c3y1huang c3y1huang self-assigned this Jul 10, 2023
@c3y1huang c3y1huang force-pushed the fix-recurring-job-source-label-log-level branch from 61ca07c to 5920b42 Compare July 10, 2023 01:35
@@ -3647,7 +3647,7 @@ func (c *VolumeController) syncPVCRecurringJobLabels(volume *longhorn.Volume) er
}

if !hasSourceLabel {
c.logger.Warnf("Ignoring recurring job labels on Volume %v PVC %v due to missing source label", volume.Name, pvc.Name)
logrus.Tracef("Ignoring recurring job labels on Volume %v PVC %v due to missing source label", volume.Name, pvc.Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using the existing c.logger?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most log messages' levels are corrected. I think we use INFO as default log level. Then, use c.logger.Debugf here. WDYT? @c3y1huang @innobead

Copy link
Member

@innobead innobead Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC we still use debug, confirm? @derekbit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c3y1huang do u know why it doesn't have trace? Duo to a different interface?

Copy link
Contributor Author

@c3y1huang c3y1huang Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c3y1huang do u know why it doesn't have trace? Duo to a different interface?

Yes, upstream removed it due to backward compatibility concerns.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC we still use debug, confirm? @derekbit

How about changing it to INFO from v1.5.1?
I've adjusted most of log messages' levels.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@c3y1huang c3y1huang marked this pull request as ready for review July 10, 2023 01:47
@c3y1huang c3y1huang requested a review from a team as a code owner July 10, 2023 01:47
ref: 6257

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
Copy link
Member

@derekbit derekbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

BTW, I adjust some logs in #2059. Please help review it if you have time. Thank you.

@innobead innobead merged commit 2c5b623 into longhorn:master Jul 10, 2023
3 checks passed
@innobead
Copy link
Member

@Mergifyio backport v1.5.x

@mergify
Copy link

mergify bot commented Jul 10, 2023

backport v1.5.x

✅ Backports have been created

@innobead
Copy link
Member

@c3y1huang need to backport this to 1.4 and 1.3 with a different implementation since their default log level is debug.

@c3y1huang c3y1huang deleted the fix-recurring-job-source-label-log-level branch July 10, 2023 02:50
@c3y1huang
Copy link
Contributor Author

@Mergifyio backport v1.4.x v1.3.x

@mergify
Copy link

mergify bot commented Jul 10, 2023

backport v1.4.x v1.3.x

✅ Backports have been created

@c3y1huang
Copy link
Contributor Author

c3y1huang commented Jul 10, 2023

@c3y1huang need to backport this to 1.4 and 1.3 with a different implementation since their default log level is debug.

I think we don't need to backport this to 1.4 and 1.3 since the source label is introduced in v1.5.

@innobead
Copy link
Member

@c3y1huang please go ahead to remove backup labels. Thanks.

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.

3 participants