resize fail didn't show a correct info when --poll specified

Bug #1297052 reported by jichenjc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
jichenjc

Bug Description

[root@controller ~]# nova resize --poll a9dd1fd6-27fb-4128-92e6-93bcab085a98 100
Instance resizing... 100% complete
Finished

but the instance is not finished yet and error logs in nova log

jichenjc (jichenjc)
Changed in nova:
assignee: nobody → jichencom (jichenjc)
Revision history for this message
Tracy Jones (tjones-i) wrote :

please add logs

tags: added: compute
Changed in nova:
status: New → Incomplete
Revision history for this message
jichenjc (jichenjc) wrote :
Download full text (3.9 KiB)

[root@controller ~]# nova flavor-show 100
+----------------------------+--------+
| Property | Value |
+----------------------------+--------+
| name | jitest |
| ram | 512 |
| OS-FLV-DISABLED:disabled | False |
| vcpus | 2 |
| extra_specs | {} |
| swap | |
| os-flavor-access:is_public | True |
| rxtx_factor | 2.0 |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 2 |
| id | 100 |
+----------------------------+--------+
[root@controller ~]# nova flavor-show 12
+----------------------------+----------+
| Property | Value |
+----------------------------+----------+
| name | m2.test1 |
| ram | 512 |
| OS-FLV-DISABLED:disabled | False |
| vcpus | 2 |
| extra_specs | {} |
| swap | |
| os-flavor-access:is_public | True |
| rxtx_factor | 1.0 |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 1 |
| id | 12 |
+----------------------------+----------+

[root@controller ~]# nova show 959567d4-3ad3-4773-8d58-f95089e604fd
+--------------------------------------+------------------------------------------------------------+
| Property | Value
| flavor | m2.test1 (12)

[root@controller ~]# nova resize --poll 959567d4-3ad3-4773-8d58-f95089e604fd 100
Instance resizing... 100% complete
Finished

after this operation

[root@controller ~]# nova show 959567d4-3ad3-4773-8d58-f95089e604fd
+--------------------------------------+------------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------------+
| status | ACTIVE
| flavor | m2.test1 (12)

conductor.log has following info:

2014-03-26 06:27:47.196 24972 WARNING nova.scheduler.utils [req-d71f5543-51aa-422e-80cc-24b82d654c54 d6779a827003465db2d3c52fe135d926 45210fba73d24dd681dc5c292c6b1e7f] [instance: a9dd1fd6-27fb-4128-92e6-93bcab085a98] Setting instance to ACTIVE state.
2014-03-26 06:27:47.389 24972 WARNING nova.conductor.manager [req-d71f5543-51aa-422e-80cc-24b82d654c54 d6779a827003465db2d3c52fe135d926 45210fba73d24dd681dc5c292c6b1e7f] No valid host found for cold migrate
2014-03-26 06:28:53.739 24972 WARNING nova.scheduler.utils [req-d0d32b3d-c863-4850-9980-c520ab85f8f5 d6779a827003465db2d3c52fe135d926 45210fba73d24dd681dc5c292c6b1e7f] Failed to compute_task_migrate_server: No valid host was found.
Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/common.py", line 420, in catch_client_excep...

Read more...

Revision history for this message
jichenjc (jichenjc) wrote :

The reason is function in conductor/manager.py
def _cold_migrate
        ....
        except exception.NoValidHost as ex:
            vm_state = instance['vm_state']
            if not vm_state:
                vm_state = vm_states.ACTIVE
            updates = {'vm_state': vm_state, 'task_state': None}
            self._set_vm_state_and_notify(context, 'migrate_server',
                                          updates, ex, request_spec)
            if reservations:
                self.quotas.rollback(context, reservations)

            LOG.warning(_("No valid host found for cold migrate"),
                        instance=instance)
            return ----> return without any notification, so upper layer thought it succeed

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit d62fb490b10d9372bd52189d4c688a7c1b495d8b
Author: jichenjc <email address hidden>
Date: Tue Mar 25 14:47:39 2014 +0800

    Make resize raise exception when no valid host found

    When resize operation starts, it will ask conductor to find a
    valid host and try to resize to that host. When there is no valid
    host can be found ,current code return directly without error
    notification, which will make upper layer code (e.g novaclient)
    thinks the execution is succesfully performed and report 'Finished'.
    But actually it isn't due to no valid host was found.

    Change-Id: I3d66dbfc0a7346762b920e802aa3be92c43d93b7
    Closes-Bug: #1297052

Changed in nova:
status: In Progress → Fix Committed
Matt Riedemann (mriedem)
summary: - resize fail didn't should a correct info when --poll specified
+ resize fail didn't show a correct info when --poll specified
tags: added: migrate resize
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/159240

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/icehouse)

Change abandoned by Marian Horban (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/159240

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Jeremy Stanley (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/159240
Reason: This branch has reached end of life and is being deleted.

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.