chrisharper / libvirt-usb

0 stars 0 forks source link

libvirt dislikes detach ordering #1

Open chrisharper opened 4 years ago

chrisharper commented 4 years ago

The command detaches the device AFTER udev has begun unbinding. It seems virsh tries to cleanup some state and cant because by that time the device is gone from the host .

Doesn't seem to be any consequences of this so far other that errors.

Jun 25 21:12:28 VMHOST kernel: usb 1-12.4: USB disconnect, device number 35
Jun 25 21:12:28 VMHOST libvirt-usb[218191]: Running detach-device on 1050/407/512 
Jun 25 21:12:28 VMHOST libvirtd[65612]: internal error: child reported (status=125): unable to open /dev/bus/usb/001/032: No such device
Jun 25 21:12:28 VMHOST kernel: audit: type=1400 audit(1593115948.551:147): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-ad76c73a-cbc4-45ed-8608-c90541b10152" pid=218196 comm="apparmor_parser"
Jun 25 21:12:28 VMHOST libvirtd[65612]: Failed to restore host device labelling
Jun 25 21:12:28 VMHOST libvirtd[65612]: Path '/dev/bus/usb/001/032' is not accessible: No such file or directory
Jun 25 21:12:28 VMHOST libvirtd[65612]: Failed to remove host device cgroup ACL
chrisharper commented 4 years ago

The device is still removed from the guest usb port just seems the remapping of the device itself back to normal cannot happen as its now gone from the host.

avbor commented 3 years ago

Yea, i have same errors when trying to detach usb device already removed from the host.

Oct 21 12:01:30 srv01-89 libvirtd[823]: internal error: child reported (status=125): unable to open /dev/bus/usb/001/034: No such device
Oct 21 12:01:30 srv01-89 libvirtd[823]: Failed to restore host device labelling
Oct 21 12:01:30 srv01-89 libvirtd[823]: Path '/dev/bus/usb/001/034' is not accessible: No such file or directory
Oct 21 12:01:30 srv01-89 libvirtd[823]: Failed to remove host device cgroup ACL