← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1581246] Re: Ironic driver: _cleanup_deploy is called with incorrect parameters

 

Reviewed:  https://review.openstack.org/316336
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d2875b78b5746bfcb082a7c5385375d704518581
Submitter: Jenkins
Branch:    master

commit d2875b78b5746bfcb082a7c5385375d704518581
Author: Matt Riedemann <mriedem@xxxxxxxxxx>
Date:   Fri May 13 22:28:24 2016 -0400

    ironic: fix call to _cleanup_deploy on config drive failure
    
    The call to _cleanup_deploy when config drive generation failed
    during spawn didn't match the method signature. This was missed
    in unit testing because the assertion on the mock of that method
    matched the actual call, but not the actual method signature.
    
    This fixes the call and also fixes the test by auto-spec'ing the
    _cleanup_deploy method in the mock so that it validates the actual
    function signature is called correctly.
    
    In order to use autospec properly here, the mock has to be on the
    driver object rather than the class.
    
    Change-Id: Ic2c096ef846f11f94aa828222c927ed7d03051c9
    Closes-Bug: #1581246


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  Ironic driver: _cleanup_deploy is called with incorrect parameters

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) mitaka series:
  New

Bug description:
  stable/mitaka release.
  If error happens in _generate_configdrive Ironic driver fails cleanup  because of

  2016-05-12 22:44:55.295 9282 ERROR nova.compute.manager [instance: 7f8769b3-145a-4b81-8175-e6aa648e1c2a]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2218, in _build_resources
  2016-05-12 22:44:55.295 9282 ERROR nova.compute.manager [instance: 7f8769b3-145a-4b81-8175-e6aa648e1c2a]     yield resources
  2016-05-12 22:44:55.295 9282 ERROR nova.compute.manager [instance: 7f8769b3-145a-4b81-8175-e6aa648e1c2a]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2064, in _build_and_run_instance
  2016-05-12 22:44:55.295 9282 ERROR nova.compute.manager [instance: 7f8769b3-145a-4b81-8175-e6aa648e1c2a]     block_device_info=block_device_info)
  2016-05-12 22:44:55.295 9282 ERROR nova.compute.manager [instance: 7f8769b3-145a-4b81-8175-e6aa648e1c2a]   File "/usr/lib/python2.7/site-packages/nova/virt/ironic/driver.py", line 748, in spawn
  2016-05-12 22:44:55.295 9282 ERROR nova.compute.manager [instance: 7f8769b3-145a-4b81-8175-e6aa648e1c2a]     flavor=flavor)
  2016-05-12 22:44:55.295 9282 ERROR nova.compute.manager [instance: 7f8769b3-145a-4b81-8175-e6aa648e1c2a] TypeError: _cleanup_deploy() takes exactly 4 arguments (6 given)

  Call
  https://github.com/openstack/nova/blob/stable/mitaka/nova/virt/ironic/driver.py#L747
  Function definition
  https://github.com/openstack/nova/blob/stable/mitaka/nova/virt/ironic/driver.py#L374

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


References