AZ list API fails if there are disabled services

Bug #1160841 reported by Phil Day
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Phil Day

Bug Description

Trying to list availability zones when there is a disabled services fails with a 500 error:

2013-03-27 09:02:40.096 13400 TRACE nova.api.openstack File "/usr/lib/python2.7/dist-packages/nova/availability_zones.py", line 84, in get_availability_zones
2013-03-27 09:02:40.096 13400 TRACE nova.api.openstack if service['available_zones'] not in available_zones]
2013-03-27 09:02:40.096 13400 TRACE nova.api.openstack KeyError: 'available_zones'
2013-03-27 09:02:40.096 13400 TRACE nova.api.openstack
2013-03-27 09:02:40.098 INFO nova.api.openstack [req-2b246b00-5bce-4341-8f52-aaa5a09a3e37 41498787087465 75228465009852] http://compute.rnde.aw1.hpcloud.net/v1.1/75228465009852/os-availability-zone/detail returned with HTTP 500

The code in get_availability_zones() for handling disabled services is broken, as it looks for "service['available_zones']" instead of service['availability_zone']

Phil Day (philip-day)
Changed in nova:
assignee: nobody → Phil Day (philip-day)
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/25514

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

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

commit ea663f3627ff11eea90e457c3b53432d640c63b2
Author: Phil Day <email address hidden>
Date: Wed Mar 27 12:01:01 2013 +0000

    List AZs fails if there are disabled services

    Trying to list availability zones when there is a disabled
    services fails with a 500 error

    Fixes bug #1160841

    Change-Id: Ibdb639f0d6a1a69a6a6331ee053c75449a16fc8f

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
importance: Undecided → Medium
milestone: none → grizzly-rc2
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/25570

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

Reviewed: https://review.openstack.org/25570
Committed: http://github.com/openstack/nova/commit/7e4fec64130afdb3bf7e3c2f0adffbc1869b0d0f
Submitter: Jenkins
Branch: milestone-proposed

commit 7e4fec64130afdb3bf7e3c2f0adffbc1869b0d0f
Author: Phil Day <email address hidden>
Date: Wed Mar 27 12:01:01 2013 +0000

    List AZs fails if there are disabled services

    Trying to list availability zones when there is a disabled
    services fails with a 500 error

    Fixes bug #1160841

    Change-Id: Ibdb639f0d6a1a69a6a6331ee053c75449a16fc8f
    (cherry picked from commit ea663f3627ff11eea90e457c3b53432d640c63b2)

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc2 → 2013.1
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.