← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1567024] Re: updated VM name leaves libvirt domain behind after deletion

 

When created vm, the libvirt driver created vm on compute node.  
When updated vm name,  the vm name updated in the database, the vm name didn't update on the compute node by libvirt.xml, this means that instance.name would not changed.
When deleted vm, the function call 'self._get_domain_by_name(instance.name) ' would get the right domain by name, so it is correct to delete vm.

By the way, I tested it in liberty version.

** Changed in: nova
       Status: New => Invalid

** Changed in: nova
     Assignee: zhaolihui (zhaolh) => (unassigned)

-- 
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/1567024

Title:
  updated VM name leaves libvirt domain behind after deletion

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  After successfully updating the name of an instance (from a libvirt/KVM host), I proceeded to delete the instance.
  The instance was successfully deleted. However, upon using "virsh list --all", it can be seen that the domain has not been undefined.

  Steps to Reproduce:
  1. Setup instance with a libvirt/KVM host and SVC storage
  2. Spawn a VM called "test-vm"
  API --> POST https://<ip>:8774/v2.1/da0be0d560f541d7acccb66104ebe094/servers
  3. Update the VM with a new name "new-name-vm"
  API --> PUT https://<ip>:8774/v2.1/da0be0d560f541d7acccb66104ebe094/servers/5334ead7-4bd7-4f81-8b41-d833ebf52a9b
  body: {{'name': 'new-name-vm'}}
  4. Delete the VM
  API --> DELETE https://<ip>:8774/v2.1/da0be0d560f541d7acccb66104ebe094/servers/5334ead7-4bd7-4f81-8b41-d833ebf52a9b

  Expected Results:
  The VM to be deleted and the libvirt domain to be destroyed and undefined.
  "virsh list --all" should return:

  virsh list --all
   Id    Name                           State
  ----------------------------------------------------

  Actual Results:
  The VM is deleted but the domain was not undefined and still appears on the KVM using "virsh list --all".
  "virsh list --all" returned:

  virsh list --all
   Id    Name                                                    State
  -----------------------------------------------------------------------
  22    test-vm-5334ead7-00000016      running


  Version of libvirt: libvirtd (libvirt) 1.2.16
  Version of Nova: 13.0.0

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


References