launch index is not right if boot some VMs in one request

Bug #1212648 reported by Guangya Liu (Jay Lau)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Guangya Liu (Jay Lau)
Grizzly
Fix Released
High
Vish Ishaya

Bug Description

root@liugya-ubuntu:~# nova boot --image cirros-0.3.1-x86_64-uec --flavor 1 --num-instances 2 vm
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
+--------------------------------------+-----------------------------------------+
| Property | Value |
+--------------------------------------+-----------------------------------------+
| OS-EXT-STS:task_state | scheduling |
| image | cirros-0.3.1-x86_64-uec |
| OS-EXT-STS:vm_state | building |
| OS-EXT-SRV-ATTR:instance_name | instance-00000001 |
| OS-SRV-USG:launched_at | None |
| flavor | m1.tiny |
| id | b2ba79b5-9d3d-450c-8ba7-c0e33592ad6d |
| security_groups | [{u'name': u'default'}] |
| user_id | 7ed6ad28bc9044688307c45fee43659e |
| OS-DCF:diskConfig | MANUAL |
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-AZ:availability_zone | nova |
| config_drive | |
| status | BUILD |
| updated | 2013-08-15T10:06:52Z |
| hostId | |
| OS-EXT-SRV-ATTR:host | None |
| OS-SRV-USG:terminated_at | None |
| key_name | None |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| name | vm-b2ba79b5-9d3d-450c-8ba7-c0e33592ad6d |
| adminPass | HQ5zL9iRkYBy |
| tenant_id | 2b65d1252efd4cd78d5504d176c01924 |
| created | 2013-08-15T10:06:52Z |
| os-extended-volumes:volumes_attached | [] |
| metadata | {} |
+--------------------------------------+-----------------------------------------+
root@liugya-ubuntu:~# nova-manage vm list
instance node type state launched image kernel ramdisk project user zone index
2013-08-15 19:28:44.588 DEBUG nova.openstack.common.lockutils [req-d85004b1-c033-4ee5-bcf0-2ec607184383 None None] Got semaphore "dbapi_backend" from (pid=27848) lock /opt/stack/nova/nova/openstack/common/lockutils.py:166
2013-08-15 19:28:44.588 DEBUG nova.openstack.common.lockutils [req-d85004b1-c033-4ee5-bcf0-2ec607184383 None None] Got semaphore / lock "__get_backend" from (pid=27848) inner /opt/stack/nova/nova/openstack/common/lockutils.py:245
vm-b2ba79b5-9d3d-450c-8ba7-c0e33592ad6d liugya-ubuntu m1.tiny active 2013-08-15 10:07:11 725c4974-1e25-4f3d-8d41-7c417bea08f2 4146aec1-8a05-4de3-82f2-73773167656d ccd6b22e-96f4-4be8-bbfd-34a6129e722a 2b65d1252efd4cd78d5504d176c01924 7ed6ad28bc9044688307c45fee43659e None 0
vm-98030793-06de-442d-9fb3-114e174d959d liugya-ubuntu m1.tiny active 2013-08-15 10:07:11 725c4974-1e25-4f3d-8d41-7c417bea08f2 4146aec1-8a05-4de3-82f2-73773167656d ccd6b22e-96f4-4be8-bbfd-34a6129e722a 2b65d1252efd4cd78d5504d176c01924 7ed6ad28bc9044688307c45fee43659e None 0

The index for all of the two VMs are both 0, the expected result should be 0 and 1

Changed in nova:
assignee: nobody → Jay Lau (jay-lau-513)
status: New → In Progress
Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

mysql> select launch_index from instances;
+--------------+
| launch_index |
+--------------+
| 0 |
| 0 |

 launch_index for the two VMs are both 0

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

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

Reviewed: https://review.openstack.org/42117
Committed: http://github.com/openstack/nova/commit/c8f0a545bfafdc72bae0a43df78ae51835e35232
Submitter: Jenkins
Branch: master

commit c8f0a545bfafdc72bae0a43df78ae51835e35232
Author: Jay Lau <email address hidden>
Date: Thu Aug 15 20:48:10 2013 +0800

    Set launch_index to right value

    Fix bug 1212648

    When boot multiple instances in one request, the launch_index
    was not increased.

    The fix was increase the launch_index one by one for each instances
    in one request.

    Change-Id: I27dde8cfae52853d33277c3d8e0e65c91bc6280b

Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/42400

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/42400
Committed: http://github.com/openstack/nova/commit/d2cd7164c8e4a09f2926aa8422584503e31764b1
Submitter: Jenkins
Branch: stable/grizzly

commit d2cd7164c8e4a09f2926aa8422584503e31764b1
Author: Jay Lau <email address hidden>
Date: Thu Aug 15 20:48:10 2013 +0800

    Set launch_index to right value

    Fix bug 1212648

    When boot multiple instances in one request, the launch_index
    was not increased.

    The fix was increase the launch_index one by one for each instances
    in one request.

    Conflicts:
     nova/compute/api.py
     nova/tests/compute/test_compute.py

    Change-Id: I27dde8cfae52853d33277c3d8e0e65c91bc6280b
    (cherry picked from commit c8f0a545bfafdc72bae0a43df78ae51835e35232)

tags: added: in-stable-grizzly
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
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.