-
Notifications
You must be signed in to change notification settings - Fork 19
controller/blockdevice: should update DevPath once it changed #195
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
controller/blockdevice: should update DevPath once it changed #195
Conversation
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.
Pull Request Overview
This PR addresses the issue where the BlockDevice's devPath may change unexpectedly after a node reboot or when the device is temporarily removed. The changes update the BlockDevice's status by reflecting the new devPath and activating an inactive device when it returns.
- Update the device path when a change is detected.
- Change the device state from Inactive to Active if applicable.
- Modify error handling by signaling the scanner upon update failure.
9484915
to
09c128f
Compare
- when the node reboot, it might cause the device path change because of the interrupt order with the device. We need to update the device path once it changed. Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
09c128f
to
6716553
Compare
@Mergifyio backport v1.5 |
✅ Backports have been created
|
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. Just one question...
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, thanks!
@Mergifyio backport v0.7.x |
✅ Backports have been created
|
Problem:
Sometimes we will see the duplicated status.deviceStatus.devPath of the blockdevice CR in the same node.
The device path would be change in following two cases:
So, we need to update the device path once it has changed
Solution:
Update device path once it has changed
Related Issue:
harvester/harvester#8164
Test plan:
Try to reboot, and you might see the spec.devPath is different from status.deviceStatus.devPath.
NOTE: It is hard to reproduce so that we can focus on the general use case, which should be kept the same.