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
blockdev: use --nodeps when querying single device #453
Conversation
Functionally equivalent. Prep for next patch.
`lsblk` by default outputs the target device followed by all its reverse dependencies. But interestingly, when using `--pairs`, the `lsblk` in RHCOS seems to output the reverse dependency first before the target device. We were relying on correct ordering in `lsblk_single`, where all we care about is the target device. Instead, explicitly use `--nodeps` in that case so that `lsblk` knows to only print the target device. (The `lsblk()` helper actually used to support that, but it was removed in 88de4fc.) Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1916502
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.
@arithx confirmed that this fixes 1916502.
One clarification on this: it seems like in some cases, RHEL's |
Sometimes `lsblk` returns devices in the wrong order, so we can't rely on it to iterate over the devices in hierarchical order. Instead, use the `holders/` directory ourselves directly and use `--nodeps` when calling `lsblk`. See: https://bugzilla.redhat.com/show_bug.cgi?id=1934174#c4 See: https://bugzilla.redhat.com/show_bug.cgi?id=1940607 See: coreos/coreos-installer#453
Sometimes `lsblk` returns devices in the wrong order, so we can't rely on it to iterate over the devices in hierarchical order. Instead, use the `holders/` directory ourselves directly and use `--nodeps` when calling `lsblk`. See: https://bugzilla.redhat.com/show_bug.cgi?id=1934174#c4 See: https://bugzilla.redhat.com/show_bug.cgi?id=1940607 See: coreos/coreos-installer#453
Sometimes `lsblk` returns devices in the wrong order, so we can't rely on it to iterate over the devices in hierarchical order. Instead, use the `holders/` directory ourselves directly and use `--nodeps` when calling `lsblk`. See: https://bugzilla.redhat.com/show_bug.cgi?id=1934174#c4 See: https://bugzilla.redhat.com/show_bug.cgi?id=1940607 See: coreos/coreos-installer#453
Sometimes `lsblk` returns devices in the wrong order, so we can't rely on it to iterate over the devices in hierarchical order. Instead, use the `holders/` directory ourselves directly and use `--nodeps` when calling `lsblk`. See: https://bugzilla.redhat.com/show_bug.cgi?id=1934174#c4 See: https://bugzilla.redhat.com/show_bug.cgi?id=1940607 See: coreos/coreos-installer#453 (cherry picked from commit 5228316)
Sometimes `lsblk` returns devices in the wrong order, so we can't rely on it to iterate over the devices in hierarchical order. Instead, use the `holders/` directory ourselves directly and use `--nodeps` when calling `lsblk`. See: https://bugzilla.redhat.com/show_bug.cgi?id=1934174#c4 See: https://bugzilla.redhat.com/show_bug.cgi?id=1940607 See: coreos/coreos-installer#453 (cherry picked from commit 5228316)
lsblkby default outputs the target device followed by all its reversedependencies. But interestingly, when using
--pairs, thelsblkinRHCOS seems to output the reverse dependency first before the target
device.
We were relying on correct ordering in
lsblk_single, where all we careabout is the target device. Instead, explicitly use
--nodepsin thatcase so that
lsblkknows to only print the target device. (Thelsblk()helper actually used to support that, but it was removed in88de4fc.)
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1916502