anti-affinity server boot failure shows stack trace

Bug #1301982 reported by David Patterson
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Balazs Gibizer

Bug Description

If anti-affinity policy is set for two different servers, and only one host is available, a stack trace is shown instead of a error message. Failure is expected, but a message about why it failed would be helpful.

On a single node devstack setup:

nova server-group-create --policy anti-affinity aagroup

nova boot --flavor m1.nano --image cirros-0.3.1-x86_64-uec --nic net-id=ea784f2b-b262-451a-821a-5ee7f69b3d63 --hint group=0f2b71ea-3dc3-423d-a9f4-41ac5d0fff07 server1

nova boot --flavor m1.nano --image cirros-0.3.1-x86_64-uec --nic net-id=ea784f2b-b262-451a-821a-5ee7f69b3d63 --hint group=0f2b71ea-3dc3-423d-a9f4-41ac5d0fff07 server2

server1 boots fine
server2 has Status Error and Power State No State

Horizon shows:

Fault
Message
unsupported operand type(s) for |: 'list' and 'set'
Code
500
Details
File "/opt/stack/nova/nova/scheduler/manager.py", line 140, in run_instance legacy_bdm_in_spec) File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 86, in schedule_run_instance filter_properties, instance_uuids) File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 289, in _schedule filter_properties) File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 275, in _setup_instance_group filter_properties['group_hosts'] = user_hosts | group_hosts
Created
April 3, 2014, 1:58 p.m.

Revision history for this message
David Patterson (david-patterson) wrote :
Changed in nova:
assignee: nobody → Balazs Gibizer (balazs-gibizer)
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/85401

Changed in nova:
status: New → In Progress
Revision history for this message
Akihiro Motoki (amotoki) wrote :

In Horizon we have no way to specify "group" hint in launching an instance.
I am not sure what is a bug in Horizon side.

Changed in horizon:
status: New → Incomplete
Gary Kotton (garyk)
tags: added: icehouse-backport-potential icehouse-rc-potential
Changed in nova:
milestone: none → icehouse-rc2
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 1680cf8cef9bd670306a0ef74803409f60f21f28
Author: Balazs Gibizer <email address hidden>
Date: Fri Apr 4 16:55:01 2014 +0200

    Fix anti-affinity server-group boot failure

    When the second instance is booted to an anti-affinity group
    the scheduler fails with an exception due to a missing type conversion.

    Closes-Bug: #1301982
    Change-Id: I87b2a8d8c7d04b781c789374d6e9c7f4c8567e5d

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/86099

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

Reviewed: https://review.openstack.org/86099
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0614a83e3ccb2c1e891909ffffe6380c8617bee3
Submitter: Jenkins
Branch: milestone-proposed

commit 0614a83e3ccb2c1e891909ffffe6380c8617bee3
Author: Balazs Gibizer <email address hidden>
Date: Fri Apr 4 16:55:01 2014 +0200

    Fix anti-affinity server-group boot failure

    When the second instance is booted to an anti-affinity group
    the scheduler fails with an exception due to a missing type conversion.

    Closes-Bug: #1301982
    Change-Id: I87b2a8d8c7d04b781c789374d6e9c7f4c8567e5d
    (cherry picked from commit 1680cf8cef9bd670306a0ef74803409f60f21f28)

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc2 → 2014.1
Thierry Carrez (ttx)
tags: removed: icehouse-rc-potential
Matthias Runge (mrunge)
no longer affects: horizon
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.