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

cleanup: incorrect fuserecovery logging #4598

Merged
merged 1 commit into from
May 7, 2024

Conversation

iPraveenParihar
Copy link
Contributor

Describe what this PR does

cleanup: incorrect fuserecovery logging
This commit make sure that logs fuserecovery.go is only logged
when the chosen mount is FUSE.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next major release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

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 unrelated
    failure (please report the failure too!)

@iPraveenParihar iPraveenParihar self-assigned this May 6, 2024
@mergify mergify bot added the cleanup label May 6, 2024
@iPraveenParihar iPraveenParihar force-pushed the fix/incorrect-fuse-log branch 2 times, most recently from 29d2faa to 3887028 Compare May 6, 2024 11:01
Comment on lines 454 to 461
if err := store.ExtractMounter(&volOptions.Mounter, req.GetVolumeContext()); err != nil {
return nil, err
}

volMounter, err := mounter.New(volOptions)
if err != nil {
return nil, err
}
Copy link
Collaborator

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(
Copy link
Collaborator

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.

@Madhu-1 Madhu-1 requested a review from gman0 May 6, 2024 12:07
@iPraveenParihar iPraveenParihar force-pushed the fix/incorrect-fuse-log branch 3 times, most recently from 2b2ba7c to e43fbf2 Compare May 6, 2024 18:43
Copy link
Contributor

@Rakshith-R Rakshith-R left a 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 {
Copy link
Member

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()) {

defer volOptions.Destroy()

if err := volOptions.DetectMounter(req.GetVolumeContext()); err != nil {
return nil, err
Copy link
Collaborator

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")
Copy link
Collaborator

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?

Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

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

LGTM

@Madhu-1 Madhu-1 requested a review from nixpanic May 7, 2024 14:06
@nixpanic
Copy link
Member

nixpanic commented May 7, 2024

@Mergifyio rebase

Copy link
Contributor

mergify bot commented May 7, 2024

rebase

✅ Branch has been successfully rebased

@nixpanic
Copy link
Member

nixpanic commented May 7, 2024

@Mergifyio queue

Copy link
Contributor

mergify bot commented May 7, 2024

queue

🛑 The pull request has been removed from the queue default

The queue conditions cannot be satisfied due to failing checks.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

@mergify mergify bot added the ok-to-test Label to trigger E2E tests label May 7, 2024
@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.27

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.27

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.27

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.28

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.28

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.29

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.28

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.29

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.29

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label May 7, 2024
@nixpanic
Copy link
Member

nixpanic commented May 7, 2024

/retest ci/centos/k8s-e2e-external-storage/1.29

@nixpanic
Copy link
Member

nixpanic commented May 7, 2024

/retest ci/centos/k8s-e2e-external-storage/1.29

logs show 2 failures related to RBD, but this PR only changes CephFS code...

@nixpanic
Copy link
Member

nixpanic commented May 7, 2024

@Mergifyio requeue

Copy link
Contributor

mergify bot commented May 7, 2024

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

@mergify mergify bot merged commit 0e61b82 into ceph:devel May 7, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants