Public bug reported:

When doing rescue, instance's xml info will be flush into
"unrescue.xml", and then rescue instance's xml info will be write into
"libvirt.xml"

    def rescue(self, context, instance, network_info, image_meta,
               rescue_password):
        unrescue_xml = self._get_existing_domain_xml(instance, network_info)
        unrescue_xml_path = os.path.join(instance_dir, 'unrescue.xml')
        libvirt_utils.write_to_file(unrescue_xml_path, unrescue_xml)
...
        xml = self._get_guest_xml(context, instance, network_info, disk_info,
                                  image_meta, rescue=rescue_images,
                                  write_to_disk=True)

And when doing unrescue, nova will use xml info in "unrescue.xml" to restore  
domain, and then delete "unrescue.xml".
Though instance's domain info in memory is correct, xml info in "libvir.xml" is 
still rescue instance's.
And this should be fixed. 
 
    def unrescue(self, instance, network_info):
        """Reboot the VM which is being rescued back into primary images.
        """
        instance_dir = libvirt_utils.get_instance_path(instance)
        unrescue_xml_path = os.path.join(instance_dir, 'unrescue.xml')
        xml = libvirt_utils.load_file(unrescue_xml_path)

** Affects: nova
     Importance: Undecided
     Assignee: leehom (feli5)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => leehom (feli5)

** Changed in: nova
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1558877

Title:
  libvirt.xml not change back after doing rescue and unrescue

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  When doing rescue, instance's xml info will be flush into
  "unrescue.xml", and then rescue instance's xml info will be write into
  "libvirt.xml"

      def rescue(self, context, instance, network_info, image_meta,
                 rescue_password):
          unrescue_xml = self._get_existing_domain_xml(instance, network_info)
          unrescue_xml_path = os.path.join(instance_dir, 'unrescue.xml')
          libvirt_utils.write_to_file(unrescue_xml_path, unrescue_xml)
  ...
          xml = self._get_guest_xml(context, instance, network_info, disk_info,
                                    image_meta, rescue=rescue_images,
                                    write_to_disk=True)

  And when doing unrescue, nova will use xml info in "unrescue.xml" to restore  
domain, and then delete "unrescue.xml".
  Though instance's domain info in memory is correct, xml info in "libvir.xml" 
is still rescue instance's.
  And this should be fixed. 
   
      def unrescue(self, instance, network_info):
          """Reboot the VM which is being rescued back into primary images.
          """
          instance_dir = libvirt_utils.get_instance_path(instance)
          unrescue_xml_path = os.path.join(instance_dir, 'unrescue.xml')
          xml = libvirt_utils.load_file(unrescue_xml_path)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1558877/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to