Revision 7db0ca2a lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
2085 | 2085 |
device specific method. |
2086 | 2086 |
|
2087 | 2087 |
""" |
2088 |
# in case of hot-mod this is given |
|
2088 |
# in case of hot-mod if the device already exists this is given
|
|
2089 | 2089 |
if device.pci is None: |
2090 | 2090 |
self._GetFreePCISlot(instance, device) |
2091 | 2091 |
kvm_devid = _GenerateDeviceKVMId(dev_type, device) |
... | ... | |
2146 | 2146 |
""" |
2147 | 2147 |
if dev_type == constants.HOTPLUG_TARGET_NIC: |
2148 | 2148 |
# putting it back in the same pci slot |
2149 |
device.pci = self.HotDelDevice(instance, dev_type, device, _, seq) |
|
2149 |
try: |
|
2150 |
device.pci = self.HotDelDevice(instance, dev_type, device, _, seq) |
|
2151 |
except errors.HotplugError: |
|
2152 |
logging.info("Device not found in runtime file. Assuming it was" |
|
2153 |
" previously added without --hotplug option.") |
|
2150 | 2154 |
# TODO: remove sleep when socat gets removed |
2151 | 2155 |
time.sleep(2) |
2152 | 2156 |
self.HotAddDevice(instance, dev_type, device, _, seq) |
Also available in: Unified diff