Revision 08879a9d lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
1023 | 1023 |
"""Removes an instance's rutime sockets/files/dirs. |
1024 | 1024 |
|
1025 | 1025 |
""" |
1026 |
# This takes info from NICDir and RuntimeFile |
|
1027 |
cls._UnconfigureInstanceNICs(instance_name) |
|
1026 | 1028 |
utils.RemoveFile(pidfile) |
1027 | 1029 |
utils.RemoveFile(cls._InstanceMonitor(instance_name)) |
1028 | 1030 |
utils.RemoveFile(cls._InstanceSerial(instance_name)) |
... | ... | |
2290 | 2292 |
elif dev_type == constants.HOTPLUG_TARGET_NIC: |
2291 | 2293 |
cmds = ["device_del %s" % kvm_devid] |
2292 | 2294 |
cmds += ["netdev_del %s" % kvm_devid] |
2293 |
utils.RemoveFile(self._InstanceNICFile(instance.name, seq)) |
|
2295 |
self._UnconfigureNic(instance.name, kvm_device, False) |
|
2296 |
self._RemoveInstanceNICFiles(instance.name, seq, device) |
|
2294 | 2297 |
self._CallHotplugCommands(instance.name, cmds) |
2295 | 2298 |
self._VerifyHotplugCommand(instance.name, kvm_device, dev_type, False) |
2296 | 2299 |
index = _DEVICE_RUNTIME_INDEX[dev_type] |
... | ... | |
2516 | 2519 |
|
2517 | 2520 |
self._WriteKVMRuntime(instance.name, info) |
2518 | 2521 |
else: |
2522 |
self._UnconfigureInstanceNICs(instance.name, info) |
|
2519 | 2523 |
self.StopInstance(instance, force=True) |
2520 | 2524 |
|
2521 | 2525 |
def MigrateInstance(self, cluster_name, instance, target, live): |
Also available in: Unified diff