]> xenbits.xensource.com Git - osstest/openstack-nova.git/commitdiff
libvirt: Add comments in _hard_reboot
authorMatthew Booth <mbooth@redhat.com>
Mon, 5 Dec 2016 14:16:33 +0000 (14:16 +0000)
committerMatthew Booth <mbooth@redhat.com>
Tue, 6 Dec 2016 11:38:23 +0000 (11:38 +0000)
Promote some important context gleaned from git history diving to code
comments.

Change-Id: Ie9fa202fe63acc181ac0c775a4dab24839117064

nova/virt/libvirt/driver.py

index 165346a8e238d5f87b3bea57694bf0e106bea841..5287d910e2779757c49b80f772e5898b044f4ab1 100644 (file)
@@ -2335,6 +2335,8 @@ class LibvirtDriver(driver.ComputeDriver):
         self._undefine_domain(instance)
 
         # Convert the system metadata to image metadata
+        # NOTE(mdbooth): This is a workaround for stateless Nova compute
+        #                https://bugs.launchpad.net/nova/+bug/1349978
         instance_dir = libvirt_utils.get_instance_path(instance)
         fileutils.ensure_tree(instance_dir)
 
@@ -2352,6 +2354,8 @@ class LibvirtDriver(driver.ComputeDriver):
                                   instance.image_meta,
                                   block_device_info=block_device_info)
 
+        # NOTE(mdbooth): context.auth_token will not be set when we call
+        #                _hard_reboot from resume_state_on_host_boot()
         if context.auth_token is not None:
             # NOTE (rmk): Re-populate any missing backing files.
             backing_disk_info = self._get_instance_disk_info(instance.name,