-
Notifications
You must be signed in to change notification settings - Fork 113
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
fix(node-disk-manager): support nvme virtual paths #678
fix(node-disk-manager): support nvme virtual paths #678
Conversation
e10254c
to
13d7aa2
Compare
There was one more place where it was only looking for
|
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.
A few questions on the change and test cases need to be added.
2e28e00
to
281573a
Compare
Thanks for the review @akhilerm. I think I have addressed all your comments. In addition, I made a fix for
If you are happy with these changes, I will squash things back down to a single commit. |
Enhance getParentBlockDevice() by looking not only for /nvme/ in the path, but also /nvme-subystem/, which is the name under /sys/devices/virtual on OpenSUSE 15.3. Clean up the osdiskexcludefilter.go Start() routine so that for each mount point it will first check /proc/1/mounts and if that fails, then check /proc/self/mounts, and then if that also fails, finally log an error message. The observation is that things will be found in one or the other, but not both, so the old code would print out an error message in once case, even when the mountpoint had been added to the filter list by the other case. Change "make test" so that it will run all the go tests and not stop at the first failure. Signed-off-by: David Borman <[email protected]>
281573a
to
5d3fb53
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
On another note: which are the tests that fail if you have only NVMe disks on your machine? My assumption was that we were not directly looking for a /dev/sda
to be present on the system for the tests to run.
Here's the output I get from
|
So, https://github.com/openebs/node-disk-manager/blob/develop/api-service/node/services/listBlockDeviceDetails_test.go#L30-L33 is hardcoded to Second, https://github.com/openebs/node-disk-manager/blob/683879d938b72464361e595171a9287d0f93fe4d/pkg/udev/mockdata.go#L117 is going to find the root disk, which in my case is an NVMe disk, and that leads to assumptions failing, like
|
ok. got it. thank you. |
Enhance getParentBlockDevice() by looking not only
for /nvme/ in the path, but also /nvme-subystem/,
which is the name under /sys/devices/virtual on
OpenSUSE 15.3.
Also clean up the osdiskexcludefilter.go Start()
routine so that for each mount point it will first
check /proc/1/mounts and if that fails, then check
/proc/self/mounts, and then if that also fails, finally
log an error message. The observation is that things
will be found in one or the other, but not both, so
the old code would print out an error message in one
case, even when the mountpoint had been added to the
filter list by the other case.
Signed-off-by: David Borman [email protected]
Pull Request template
Why is this PR required? What issue does it fix?:
NDM failed to filter out nvme disks on OpenSUSE 15.3 due a difference in the path name
What this PR does?:
Adds looking for
nvme-subsystem
in addition tonvme
Does this PR require any upgrade changes?:
No
If the changes in this PR are manually verified, list down the scenarios covered::
I have one mount point to be filtered out,
/mnt/openebs-local
which is mounted on/dev/nvme0n1p1
I looked at the logs, and now see lines like:
whereas before it didn't have that regex filter.
For the logs on creating the filters, it now has:
whereas before it had:
Any additional information for your reviewer? :
No
Checklist:
<type>(<scope>): <subject>