internal service AZ not hidden for disabled zones

Bug #1167956 reported by Andrea Rosa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Andrea Rosa
Grizzly
Fix Released
Medium
Vish Ishaya

Bug Description

The list of availability zone hidden the internal service availability zone just for available zone but not for not available zone.
If all services in the internal availability zone are disabled, the call to the availability_zone_index (GET V2/os-availability-zone) doesn't hide the internal availability zone.

Changed in nova:
assignee: nobody → Andrea Rosa (andrea-rosa-m)
description: updated
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/26763

Changed in nova:
status: New → In Progress
Revision history for this message
Joe Gordon (jogo) wrote :

I am little unclear on what this bug description is saying. If all services in the internal AZ are disabled nothing will work, as only nova-api and nova-compute aren't in the internal AZ (and nova-api isn't listed as a service at all).

Revision history for this message
Andrea Rosa (andrea-rosa-m) wrote :

Hi Joe

Thanks for your comment. You're right the description is not well done.
My understanding of this API for the call to GET V2/os-availability-zone is that the response reports the list of availability zones skipping the "intenal" zone.
At the moment the code is not filterning the "internal" value for the "not available zones":
        for zone in available_zones:
            # Hide internal_service_availability_zone
            if zone == CONF.internal_service_availability_zone:<<<<<<<<<<<<< This check is done just in the first for loop
                continue
            result.append({'zoneName': zone,
                           'zoneState': {'available': True},
                           "hosts": None})

        for zone in not_available_zones:
            result.append({'zoneName': zone,
                           'zoneState': {'available': False},
                           "hosts": None})

This bug can be seen with different scenario, for example:
1 Scheduelr service is disabled
2 after a migration from one version/configuration to a different one you can have some "old" values in the database: i.e. for nova-network services

It's not a critical bug but just one I spotted while I was looking at the code of this API extensions.
Hope this explanation make the description clearer.
Please let me know.
Thanks

Revision history for this message
Joe Gordon (jogo) wrote :

Thanks for the clarification, you have answered all my questions

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

Reviewed: https://review.openstack.org/26763
Committed: http://github.com/openstack/nova/commit/7172fdc2bf4061039fe34cdb97e442c073a7570a
Submitter: Jenkins
Branch: master

commit 7172fdc2bf4061039fe34cdb97e442c073a7570a
Author: Andrea Rosa <email address hidden>
Date: Thu Apr 11 17:28:51 2013 +0100

    Fix bug in os-availability-zone extension.

    Fixes bug 1167956.
    The call to get the list of availability zones (GET V2/os-availability-zone)
    doesn't hide internal availability zone if all services in that zone are
    disabled.

    Change-Id: I2c49ad68c2ee5ddea0536dfa770f649fbb392b63

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
importance: Undecided → Medium
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/27177

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

Reviewed: https://review.openstack.org/27177
Committed: http://github.com/openstack/nova/commit/1ffab2807f652d52e68f5fc588b76bfb11c5eddc
Submitter: Jenkins
Branch: stable/grizzly

commit 1ffab2807f652d52e68f5fc588b76bfb11c5eddc
Author: Andrea Rosa <email address hidden>
Date: Thu Apr 11 17:28:51 2013 +0100

    Fix bug in os-availability-zone extension.

    Fixes bug 1167956.
    The call to get the list of availability zones (GET V2/os-availability-zone)
    doesn't hide internal availability zone if all services in that zone are
    disabled.

    Change-Id: I2c49ad68c2ee5ddea0536dfa770f649fbb392b63
    (cherry picked from commit 7172fdc2bf4061039fe34cdb97e442c073a7570a)

Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
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.