-
Notifications
You must be signed in to change notification settings - Fork 547
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
cleanup: incorrect fuserecovery logging #4598
Conversation
29d2faa
to
3887028
Compare
internal/cephfs/nodeserver.go
Outdated
if err := store.ExtractMounter(&volOptions.Mounter, req.GetVolumeContext()); err != nil { | ||
return nil, err | ||
} | ||
|
||
volMounter, err := mounter.New(volOptions) | ||
if err != nil { | ||
return nil, 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.
return GRPC error message.
); err != nil { | ||
return nil, status.Errorf(codes.Internal, "failed to try to restore FUSE mounts: %v", err) | ||
if _, ok := volMounter.(*mounter.FuseMounter); ok { | ||
if err = ns.tryRestoreFuseMountsInNodePublish( |
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.
as the check is added outside, we can remove few things inside the tryRestoreFuseMountsInNodePublish function, please check.
2b2ba7c
to
e43fbf2
Compare
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.
Looks good to me.
@@ -151,7 +151,7 @@ func validateMounter(m string) error { | |||
return nil | |||
} | |||
|
|||
func extractMounter(dest *string, options map[string]string) error { | |||
func ExtractMounter(dest *string, options map[string]string) 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.
Instead of exporting ExtractMounter()
, can you clean it up and have this as a function of VolumeOptions
?
In NodePublish()
, you can then write something like this:
volOptions := &store.VolumeOptions{}
defer volOptions.Destroy()
if err := volOptions.DetectMounter(req.GetVolumeContext()) {
e43fbf2
to
b001cb5
Compare
internal/cephfs/nodeserver.go
Outdated
defer volOptions.Destroy() | ||
|
||
if err := volOptions.DetectMounter(req.GetVolumeContext()); err != nil { | ||
return nil, 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.
return GRPC error
// Check that the existing stage mount for this volume is managed by | ||
// ceph-fuse, and that the mounter is FuseMounter. Then try to restore them. | ||
|
||
procMountInfo, err := util.ReadMountInfoForProc("self") |
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.
remove ReadMountInfoForProc
as its not used anymore as well?
b001cb5
to
ad93f3e
Compare
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
@Mergifyio rebase |
Signed-off-by: Praveen M <[email protected]>
✅ Branch has been successfully rebased |
ad93f3e
to
60c96e1
Compare
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
/test ci/centos/upgrade-tests-cephfs |
/test ci/centos/k8s-e2e-external-storage/1.27 |
/test ci/centos/upgrade-tests-rbd |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/k8s-e2e-external-storage/1.30 |
/test ci/centos/mini-e2e/k8s-1.27 |
/test ci/centos/k8s-e2e-external-storage/1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.30 |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
/test ci/centos/k8s-e2e-external-storage/1.29 |
/test ci/centos/mini-e2e/k8s-1.30 |
/test ci/centos/mini-e2e/k8s-1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.29 |
/test ci/centos/mini-e2e/k8s-1.29 |
/retest ci/centos/k8s-e2e-external-storage/1.29 |
logs show 2 failures related to RBD, but this PR only changes CephFS code... |
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
Describe what this PR does
cleanup: incorrect fuserecovery logging
This commit make sure that logs
fuserecovery.go
is only loggedwhen the chosen mount is FUSE.
Checklist:
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!)