Open
Conversation
769ea8e to
bfdeea0
Compare
e431939 to
efcb2f6
Compare
efcb2f6 to
0091b74
Compare
yaroslavborbat
previously approved these changes
Mar 24, 2026
0091b74 to
4984fec
Compare
- Remove call to undefined validateAvailableUSBIPPortsDefault - Replace getNodeTotalPorts with direct client.Get for Node - Use usb.CheckFreePortForRequest from common/usb package - Remove unused imports Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Check free USBIP ports only for new attachments, not for devices already attached in KVVMI. This prevents resetting attached: true to false when ports are exhausted but device is already working. Fixes the issue where attached USB devices were marked as detached due to 'no free USBIP ports available' logs. Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
When a USB device attach request is already in flight (existingStatus exists but not yet attached), skip the USBIP port availability check. The port was available when the request was made, and re-checking would cause devices to get stuck if ports become exhausted mid-flight while DRA/KubeVirt is still processing the request. Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Use Ready=true && Attached=false instead of just Attached=false to determine if a USB device attach request is already in flight. This is more reliable because: - existingStatus may exist from the start when VM is created with USB device - Ready=true means the USBDevice is ready and ResourceClaimTemplate exists - Attached=false means KVVMI has not yet reported the device as attached This ensures we only skip port checks when the request has actually been sent, not just when any status exists. Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Check USBIP port availability only when device is added for the first time (existingStatus == nil). Once a device has a status, the attach request was already sent and ports were available at that time. This prevents devices from getting stuck if ports are exhausted mid-flight while DRA processes the request. Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Add helper to check if a device exists in KVVMI regardless of its phase. Used by usb_device_attach_handler to skip port checks for devices that are already in flight (exist in KVVMI, even if not yet ready). Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Skip free-port validation when the device already appears in KVVMI host device statuses (attach in progress), matching hostDeviceExistsByName helper added earlier. Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
bd2a95c to
3b7852d
Compare
…r device sets Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
prismagod
reviewed
Mar 27, 2026
Signed-off-by: Vladislav Panfilov <97229646+prismagod@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR now contains two groups of changes:
pkg/common/usb/speed.go+ tests);NoFreeUSBIPPortreason.release-channel-versionimage stage.Why do we need it, and what problem does it solve?
For USB flows, attach operations could repeatedly retry even when the target node had no free USBIP ports for the required speed class. This created noisy retries and delayed feedback.
With these changes, validation and reconciliation fail earlier and report a clear reason, so behavior is predictable and troubleshooting is easier.
Additional e2e/werf changes improve test stability and packaging correctness for the current branch content.
What is the expected result?
NoFreeUSBIPPortwhen applicable.module.yamlcorrectly after werf import path fix.Checklist
Changelog entries