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

feat: remove orphaned USB device automatically and add reconcile after deleting claim #94

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

Yu-Jack
Copy link
Contributor

@Yu-Jack Yu-Jack commented Oct 8, 2024

IMPORTANT: Please do not create a Pull Request without creating an issue first.

Problem:
Steps:

  • Plugin USB device
  • Enable device (Don't need to attach it to a VM)
  • Unplug USB device
  • Plugin USB device again

There are two USB device listed on the page, one of them is orphaned.

Solution:
Case A: If that orphaned USB device is enabled and unattached, just remove it directly.
Case B: if that orphaned USB device is enabled and attached to a VM, just update status. I think GUI can show message to users in the future.

Additional fix is that deleting attached USB device claim should be forbidden.

Related Issue:
harvester/harvester#6720

Test plan:
Follow above steps to test it.

Copy link
Collaborator

@ibrokethecloud ibrokethecloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks.

Copy link
Member

@WebberHuang1118 WebberHuang1118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the PR.

@Yu-Jack Yu-Jack merged commit f45c82f into harvester:master Oct 9, 2024
5 checks passed
@Yu-Jack Yu-Jack deleted the HARV/6720 branch October 9, 2024 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants