-
Notifications
You must be signed in to change notification settings - Fork 807
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
Use lsblk to safeguard against outdated symlinks #1878
Conversation
32fd85e
to
6fc24c8
Compare
Code Coverage Diff
|
/retest |
6fc24c8
to
355f684
Compare
355f684
to
e8eae49
Compare
/retest |
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.
Is this fix still necessary? it appears the issue leading to #1224 has been addressed via:
@torredil yes, I believe so: Firstly, that fix is relatively recent and it is unlikely that slow-moving distros have picked it up. Non-security fixes can often take months or years to be distributed. Secondly, even when all users have that fix, that issue does not cause the race condition but only exacerbates it (by increasing the chance users hit it by hogging the CPU during the hotplug). Thus, I think this fix is still valuable because:
|
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.
Even if the race condition that causes it is very rarely lost, the bug avoided is catastrophic
That makes sense. In that case, agree that paying the lsblk
fee is worthwhile.
/lgtm
e8eae49
to
e84561a
Compare
/lgtm |
/retest |
1 similar comment
/retest |
} | ||
} else { | ||
// If the command fails (for example, because lsblk is not available), silently ignore the error and proceed | ||
klog.V(5).ErrorS(err, "Ignoring lsblk failure", "canonicalDevicePath", canonicalDevicePath, "strippedVolumeName", strippedVolumeName) |
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.
np: How about increasing the severity? This can help customers (and us) debug this issue faster.
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.
I debated with myself about this, so I'd like to hear other's opinions.
On one hand, a broken lsblk
is an arguably incorrect installation environment.
On the other hand, it feels unhelpful to flood the logs with the same error for every staged volume if lsblk
is missing from the container or similar.
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.
Thought about this quite a bit an ultimately landed on the following as well:
it feels unhelpful to flood the logs with the same error for every staged volume if lsblk is missing from the container or similar.
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.
Cleanly done, thank you!
e84561a
to
db4bef8
Compare
Signed-off-by: Connor Catlett <[email protected]>
db4bef8
to
7b01f64
Compare
/retest |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: torredil The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Is this a bug fix or adding new feature?
Bug fix
What is this PR about? / Why do we need it?
Fixes #1224
What testing is done?
CI/Added new unit tests