← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1480514] Re: Remove error instance fail when enable serial_consol

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => liberty-rc1

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

Title:
  Remove error instance fail when enable serial_consol

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  When I fixed https://bugs.launchpad.net/nova/+bug/1478607
  I found I can't remove those error instances which was failed when config xml.

  This is because of following block:
  https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L894

  When nova try to destroy instance, it will cleanup relative resources.
  if we enable serial console, nova will try to find ports, which was assigned to it, and release them.
  But the instance was created failed, therefore nova will throw nova instance not found.
  Yes, the block looks like it had handle instance not found exception.
  But the function of "_get_serial_ports_from_instance" has yield keyword.
  It will not raise exception immediately instead of raise exception when program try to iterator yielded items.
  Therefore instance not found exception will been raised at L894 instead of L889.
  You can checkout following sample code.
  http://www.tutorialspoint.com/execute_python_online.php?PID=0Bw_CjBb95KQMU05ycERQdUFfcms

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


References