service_get_all_by_topic filters out disabled services

Bug #1285673 reported by git-harry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
git-harry

Bug Description

cinder/db/sqlalchemy/api.py

service_get_all_by_topic includes the filter disabled=False. This means it doesn't get all and in fact gets only services that are not disabled.

This method is used four times in the codebase

cinder/backup/api.py: API._is_backup_service_enabled
this method filters out disabled services already so is not affected.

cinder/scheduler/host_manager.py: HostManager.get_all_host_states
this method tries to log messages for disabled services, but can't because they've already been filtered out

cinder/volume/api.py: API.list_availability_zones
list_availability_zones is not able to show disabled services

cinder/volume/api.py: API.migrate_volume
not currently filtering out disabled hosts - would require patching

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

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

Changed in cinder:
assignee: nobody → git-harry (git-harry)
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/76865
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=2e15055eb572b1745e8c4a14b186e5defb7971f0
Submitter: Jenkins
Branch: master

commit 2e15055eb572b1745e8c4a14b186e5defb7971f0
Author: git-harry <email address hidden>
Date: Fri Apr 25 17:03:13 2014 +0100

    Add disabled kwarg to service_get_all_by_topic

    service_get_all_by_topic disabled kwarg allows results to include
    where disabled is True or False or both.

    Updated code where service_get_all_by_topic is used to make use of
    disabled kwarg instead of filtering afterwards.

    Removed logging of disabled services in host_manager.

    Closes-Bug: #1285673
    Change-Id: I748461e64acd4e9563c4016781c5e1d4b116dac8

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-1 → 2014.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.