Nova boot returns 0 when VM state is ERROR

Bug #1292669 reported by Ryan Hallisey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Undecided
Ryan Hallisey

Bug Description

When you run nova boot with --poll parameter and the status of VM is ERROR the command has a return value of 0.

For example:
Boot a VM with inappropriate flavor (too small for given image i.e.), and check return value.
1. nova boot --poll ...
2. echo $? --> 0

Expected results:
echo$? --> != 0

Ryan Hallisey (rthall14)
Changed in python-novaclient:
assignee: nobody → Ryan Hallisey (rthall14)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/80667

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/80667
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=d01b3abdb007eb97ebb563801dee7ae9b458805d
Submitter: Jenkins
Branch: master

commit d01b3abdb007eb97ebb563801dee7ae9b458805d
Author: Ryan Hallisey <email address hidden>
Date: Fri Mar 14 15:32:10 2014 -0400

    Raise exception when poll returns error state

    When running nova boot --poll, any error states that occur will be
    seen but, an exit code of 0 will be returned indicating success.
    This would be problematic for scripts looking to see if an
    operation completed successfully.

    To fix this, an exception is raised after the nova api indicates to the
    poll code that the vm is in an error state. The exceptions signals the shell
    main function to exit with code 1.

    Change-Id: I48f6b1c82e2f8b221dda898dcb804b0196018505
    Fixes-Bug: #1292669

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.