Bug 1020226

Summary: nova rebuild $VM_ID $IMG_ID --poll waits forever when VM SHUTOFF
Product: Red Hat OpenStack Reporter: Jaroslav Henner <jhenner>
Component: python-novaclientAssignee: Jakub Ruzicka <jruzicka>
Status: CLOSED EOL QA Contact: yeylon <yeylon>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0CC: jruzicka, ndipanov, sferdjao, sgordon, srevivo, yeylon
Target Milestone: ---Keywords: Automation, MoveUpstream, ZStream
Target Release: 6.0 (Juno)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-16 14:59:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jaroslav Henner 2013-10-17 10:22:16 UTC
Description of problem:
When VM is in SHUTOFF state and one tries to rebuild it, the client waits for ACTIVE. It should wait for transition to REBUILIDING and then 
 * probably for transition from REBUILIDING
 * or to transition to previous state

Version-Release number of selected component (if applicable):
python-novaclient-2.13.0-2.el6ost.noarch

How reproducible:
always

Steps to Reproduce:
1. nova boot
2. ssh to it, halt, wait for SHUTOFF
3. nova rebuild --poll $VM_ID $IMG_ID

Actual results:
Instance rebuilding... 0%
Traceback (most recent call last):
  File "/usr/bin/nova", line 9, in <module>
    load_entry_point('python-novaclient==2.13.0', 'console_scripts', 'nova')()
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 765, in main
    OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 701, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/novaclient/v1_1/shell.py", line 1008, in do_rebuild
    _poll_for_status(cs.servers.get, server.id, 'rebuilding', ['active'])
  File "/usr/lib/python2.7/site-packages/novaclient/v1_1/shell.py", line 370, in _poll_for_status
    time.sleep(poll_period)
KeyboardInterrupt


Expected results:
After rebuild complete instance either in ACTIVE or in previous state. Client exits.

Additional info:

Comment 5 Sahid Ferdjaoui 2015-12-16 14:59:40 UTC
This issue has been reported on a EOL versio n of OSP. Please feel free to reopen whether you think this issue is still happening on current release.

Thanks,
s.