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

udevadm may be never triggered right now #376

Closed
ZeroMagic opened this issue Aug 16, 2019 · 7 comments · Fixed by #459
Closed

udevadm may be never triggered right now #376

ZeroMagic opened this issue Aug 16, 2019 · 7 comments · Fixed by #459
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
Milestone

Comments

@ZeroMagic
Copy link
Member

In the function VerifyDevicePath(https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/master/pkg/mount-manager/device-utils.go#L89), the value of sdBefore is the same with sdAfter.

Then the function udevadmChangeToDrive will never be called. It seems like the code doesn't actually do anything.

/ping @davidz627

@davidz627
Copy link
Contributor

davidz627 commented Aug 16, 2019

This is true, the code as-is doesn't do anything :) thanks for the find.

The intent for udevadm triggers is to "workaround" two known errors.

  • The disk has attached and shows up as /dev/sdx but does not get symlinked to /dev/disk/by-id/ which we rely on for finding the correct disk
  • A disk was detached (at /dev/sdy), a different one has attached also at /dev/sdy and the /dev/disk/by-id/ symlinks are stale (?)
    • @msau42 I feel like I didn't write this second one properly could you confirm/edit

The actual solution to this would be as follows:

  • Check that the disk at /dev/disk/by-id/ has a SCSI Serial that matches the diskName that we expect
    • If not, run a udev fix on it
  • If the /dev/disk/by-id does not exist, we then have to trigger the udev fix on the /dev/sdx of the missing disk
    • Finding this disk poses an issue, the clumsy method we can think of right now is to take the set of all disks in /dev/disk/by-id and diff them with the set of /dev/sdx and run the udev fix on all the diffs until we get the symlink that we want
      • The issue with this method is that we will trigger udev on disks that may be attached that are not PD repeatedly (this is not ideal but may not be a terrible problem).

@ZeroMagic please let me know and assign yourself if you are interested in working on this fix. If not, considering this is a known issue that occurs infrequently we do not consider this high priority and will fix it sometime before GA.

@davidz627 davidz627 added this to the GA milestone Aug 16, 2019
@ZeroMagic
Copy link
Member Author

@davidz627 Oh, I'm afraid not. I have no time to fix it recently.

@davidz627
Copy link
Contributor

/help

@k8s-ci-robot
Copy link
Contributor

@davidz627:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Aug 16, 2019
@davidz627 davidz627 added this to To do in GA Driver Sep 18, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 14, 2019
@davidz627
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 14, 2019
@davidz627
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
GA Driver
  
Done
4 participants