diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-27 08:05:24 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-27 08:05:24 +0000 |
| commit | 23795489ddd9ec80f1ca78a6e36fc411d75103f3 (patch) | |
| tree | 69860e77d266566337a1e54daa45e3a050ad4ee8 | |
| parent | f96dcc39c764f78c1a81cfc13e598f6acc033ddb (diff) | |
| parent | dd6852992b9b63e0cfb387e20f1dae4490c7ead3 (diff) | |
| download | nova-23795489ddd9ec80f1ca78a6e36fc411d75103f3.tar.gz nova-23795489ddd9ec80f1ca78a6e36fc411d75103f3.tar.xz nova-23795489ddd9ec80f1ca78a6e36fc411d75103f3.zip | |
Merge "Cleanup .rescue files in libvirt driver unrescue."
| -rw-r--r-- | nova/virt/libvirt/connection.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 556607666..c531c2cc8 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -41,6 +41,7 @@ Supports KVM, LXC, QEMU, UML, and XEN. import hashlib import functools +import glob import multiprocessing import os import shutil @@ -749,6 +750,10 @@ class LibvirtConnection(driver.ComputeDriver): unrescue_xml = libvirt_utils.load_file(unrescue_xml_path) libvirt_utils.file_delete(unrescue_xml_path) self.reboot(instance, network_info, xml=unrescue_xml) + rescue_files = os.path.join(FLAGS.instances_path, instance['name'], + "*.rescue") + for rescue_file in glob.iglob(rescue_files): + libvirt_utils.file_delete(rescue_file) @exception.wrap_exception() def poll_rebooting_instances(self, timeout): |
