is there a specific reason for the mix of "disabling styles" here?
first hunk adds a die and comments the original code, second replaces the orig. code completely with a die statement, and the last two add additional (final) die statements.. imho it would make more sense to stick to one way or the other - I think I'd prefer an early die + comment for the unreliable code if it is supposed to be fixed and reintroduced soon, or a die and removal/revert of the unreliable code if this won't work for the forseeable future. On Thu, Jun 23, 2016 at 11:20:07AM +0200, Dominik Csapak wrote: > we have a few problems with hotplug at the moment: > qemu may add usb hubs when adding usb devices but fails to remove them > when removing the usb device (this is a qemu bug) > > also when starting a guest with a usb device we add ehci and uchi > controllers, which we cannot hot unplug > > with those devices, it is impossible to live migrate the guest > to another host, meaning even if you remove all usb devices, > the migrate fails > > so we deactivate usb hotplugging for now > > Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> > --- > PVE/QemuServer.pm | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm > index b6ad27a..3df8f84 100644 > --- a/PVE/QemuServer.pm > +++ b/PVE/QemuServer.pm > @@ -3273,7 +3273,8 @@ sub vm_deviceplug { > > } elsif ($deviceid =~ m/^usb(\d+)$/) { > > - qemu_deviceadd($vmid, PVE::QemuServer::USB::print_usbdevice_full($conf, > $deviceid, $device)); > + die "usb hotplug currently not reliable\n"; > + #qemu_deviceadd($vmid, > PVE::QemuServer::USB::print_usbdevice_full($conf, $deviceid, $device)); > > } elsif ($deviceid =~ m/^(virtio)(\d+)$/) { > > @@ -3372,8 +3373,7 @@ sub vm_deviceunplug { > > } elsif ($deviceid =~ m/^usb\d+$/) { > > - qemu_devicedel($vmid, $deviceid); > - qemu_devicedelverify($vmid, $deviceid); > + die "usb hotplug currently not reliable\n"; > > } elsif ($deviceid =~ m/^(virtio)(\d+)$/) { > > @@ -3911,6 +3911,8 @@ sub vmconfig_hotplug_pending { > } > } elsif ($opt =~ m/^usb\d+/) { > die "skip\n" if !$hotplug_features->{usb} || $conf->{$opt} =~ > m/spice/i; > + # usb hotplug unreliable > + die "skip\n"; > vm_deviceunplug($vmid, $conf, $opt); > } elsif ($opt eq 'vcpus') { > die "skip\n" if !$hotplug_features->{cpu}; > @@ -3966,6 +3968,8 @@ sub vmconfig_hotplug_pending { > die "skip\n" if !$hotplug_features->{usb} || $value =~ > m/spice/i; > my $d = eval { > PVE::JSONSchema::parse_property_string($usbdesc->{format}, $value) }; > die "skip\n" if !$d; > + # usb hotplug unreliable > + die "skip\n"; > qemu_usb_hotplug($storecfg, $conf, $vmid, $opt, $d); > } elsif ($opt eq 'vcpus') { > die "skip\n" if !$hotplug_features->{cpu}; > -- > 2.1.4 > > > _______________________________________________ > pve-devel mailing list > pve-devel@pve.proxmox.com > http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel