-
Notifications
You must be signed in to change notification settings - Fork 586
rbd: add additional logging details for stream server #5411
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
Conversation
d8f587f to
db02f74
Compare
internal/csi-common/utils.go
Outdated
| case *volumegroup.DeleteVolumeGroupRequest: | ||
| reqID = r.GetVolumeGroupId() | ||
| case *volumegroup.ControllerGetVolumeGroupRequest: | ||
| reqID = r.GetVolumeGroupId() |
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.
why volumegroup?
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.
why volumegroup?
This got modified by mistake, fixed now
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.
i still see the case, looks like the latest code is not pushed?
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.
i still see the case, looks like the latest code is not pushed?
sorry 🤦 its pushed now
internal/csi-common/utils.go
Outdated
| err := s.ServerStream.RecvMsg(req) | ||
| if err != nil { | ||
| klog.Errorf(log.Log(s.ctx, "GRPC error: %v"), err) | ||
| } |
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.
Move this line to last so that request is logged first followed by 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.
Moved the error log to last.
But RecvMsg needs to called first to fill in the req object in order to be able to extract reqID.
Added example logs to pr description .
PTAL
|
/test ci/centos/mini-e2e/k8s-1.30 |
1 similar comment
|
/test ci/centos/mini-e2e/k8s-1.30 |
db02f74 to
b1ecbd8
Compare
92f8758 to
7e69c5f
Compare
Madhu-1
left a comment
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.
small nits.
internal/csi-common/utils.go
Outdated
| // NewMiddlewareStreamServerOptions creates a new grpc.ServerOption that configures a | ||
| // common format for log messages and other gRPC related handlers. |
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 please update the comment to specify this is for Stream one
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.
done.
| func (s *wrapperServerStream) Context() context.Context { | ||
| return s.ctx | ||
| } |
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.
what is the use of this helper?
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.
what is the use of this helper?
This wraps around the ServerStream so that so to provide this context with additional details(ID, ReqID).
example
Modified the function definition to explain it better now.
5c2b485 to
efafa7d
Compare
|
@Mergifyio rebase |
This commit adds stream server interceptor to inject additional logging details. Signed-off-by: Rakshith R <rar@redhat.com>
✅ Branch has been successfully rebased |
efafa7d to
4fc0ec4
Compare
|
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
|
/test ci/centos/upgrade-tests-cephfs |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/k8s-e2e-external-storage/1.31 |
|
/test ci/centos/k8s-e2e-external-storage/1.32 |
|
/test ci/centos/mini-e2e-helm/k8s-1.31 |
|
/test ci/centos/mini-e2e-helm/k8s-1.32 |
|
/test ci/centos/mini-e2e/k8s-1.31 |
|
/test ci/centos/mini-e2e/k8s-1.32 |
|
/test ci/centos/k8s-e2e-external-storage/1.33 |
|
/test ci/centos/mini-e2e-helm/k8s-1.33 |
|
/test ci/centos/mini-e2e/k8s-1.33 |
|
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You may have to fix your CI before adding the pull request to the queue again. |
|
/retest ci/centos/k8s-e2e-external-storage/1.31 |
|
/retest ci/centos/mini-e2e-helm/k8s-1.32 |
|
/retest ci/centos/mini-e2e/k8s-1.31 |
|
/retest ci/centos/mini-e2e/k8s-1.32 |
|
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
Describe what this PR does
This commit adds stream server interceptor
for logging purposes.
Related issues
Updated: #5346
Depends-on: #5347
Example logs:
Checklist:
guidelines in the developer
guide.
Request
notes
updated with breaking and/or notable changes for the next major release.
Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>: retest the<job-name>after unrelatedfailure (please report the failure too!)