-
Notifications
You must be signed in to change notification settings - Fork 554
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
rbd: log sitestatuses and description #4431
Conversation
@@ -891,6 +896,9 @@ func RemoteStatus(gmis *librbd.GlobalMirrorImageStatus) (librbd.SiteMirrorImageS | |||
ss librbd.SiteMirrorImageStatus | |||
err error = librbd.ErrNotExist | |||
) | |||
log.UsefulLog( |
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.
%q
might not help as you are logging the details, can you please check and provide the log output?
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.
Log this as TraceLog
log?
ctx, | ||
"remote status %q:, description=%q", | ||
remoteStatus, | ||
description) | ||
resp, err := getLastSyncInfo(description) |
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.
Log Description inside the getLastSyncInfo
function
Haven't tested the PR yet, Will request for reviw and add the output log once done. |
1c045ff
to
525d9f6
Compare
Marking this as Draft for now, please update the PR description with the results of your testing. |
Here's the log from rbdplugin pods.
|
var ( | ||
ss librbd.SiteMirrorImageStatus | ||
err error = librbd.ErrNotExist | ||
) | ||
log.DebugLog( | ||
ctx, | ||
"Site Statuses: %s", gmis.SiteStatuses) |
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.
this logging includes %!s
in the output, it seems gmis.SiteStatuses
can not simply be formatted as a string, does the struct have a String()
function?
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.
No it doesn't have it.
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.
If you want to log it, you will either need to log attributes of if, or write a String()
function for it.
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.
can you do the logging at line 898
inside for loop of for i := range gmis.SiteStatuses {
but before if
check? so that we don't need to log multiple times?
Here's the updated log:
|
still log contains |
yeah, that's the older change, kept it to get your reviews. If logging the site statues individually work for you, or it have to be printed as the list too? I will update the PR accordingly. |
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 @yati1998 CI is failing, please paste the output from the testing.
@Mergifyio rebase |
✅ Nothing to do for rebase action |
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at fbaf9d5 |
/test ci/centos/k8s-e2e-external-storage/1.29 |
/test ci/centos/mini-e2e-helm/k8s-1.29 |
/test ci/centos/upgrade-tests-cephfs |
/test ci/centos/mini-e2e/k8s-1.29 |
/test ci/centos/upgrade-tests-rbd |
/test ci/centos/k8s-e2e-external-storage/1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/k8s-e2e-external-storage/1.28 |
/test ci/centos/mini-e2e/k8s-1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
/test ci/centos/mini-e2e/k8s-1.28 |
/cherry-pick release-4.15 |
@Mergifyio backport release-3.10 |
@Mergifyio backport release-v3.10 |
❌ No backport have been created
GitHub error: |
✅ Backports have been created
|
This commit logs sitestatues and description in
GetVolumeReplicationInfo RPC call for better
debuging.
Fixes: #4430