Scheduler stats unavailable until after a volume is created

Bug #1402790 reported by Gary W. Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Gary W. Smith

Bug Description

After the scheduler is started or restarted, the scheduler stats API will return an empty list of stats, despite the fact that many volume services are running and many volumes have been created in the past. Creating a new volume triggers the stats to be available.

Steps to reproduce:
1. Restart the scheduler, and wait for messages about "Received volume service update" to appear. This ensures that the scheduler has received volume stats from the volume service(s)
2. curl -s -H "X-Auth-Token: $OS_TOKEN" $CINDER_URL/scheduler-stats/get_pools
will return {"pools": []}.
3. Create a volume: cinder create 1
4. curl -s -H "X-Auth-Token: $OS_TOKEN" $CINDER_URL/scheduler-stats/get_pools now returns a structure with all of the backends listed: {"pools": [{"name": "host@backend#pool"}, {"name": "host@backend2#pool2"}, {"name": "host@backend3#poole"}]}

The problem is in host_manager.py: The HostState.get_pools function is driven off of a dictionary, host_state_map, that is created as a side-effect to the call to get_all_host_states, which is only called by the FilterSchduler at volume creation time.

Changed in cinder:
assignee: nobody → Gary W. Smith (gary-w-smith)
Changed in cinder:
status: New → Confirmed
Changed in cinder:
importance: Undecided → Medium
summary: - Scheduler stats unavailable after until a volume is created
+ Scheduler stats unavailable until after a volume is created
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/142361

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

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

commit b0d99edf3a241cdb87a3b4ab7b588e2aff236be5
Author: Gary W. Smith <email address hidden>
Date: Mon Dec 15 14:38:26 2014 -0800

    Uncouple scheduler stats from volume creation

    Capture and report scheduler stats independently from volume creation.
    Without this scheduler stats were not reported until the first volume
    creation and were subsequently only updated each time a volume was
    created.

    Change-Id: Ia1a809ba10e0595e6c255fde683f7c252377ac09
    Fixes-bug: 1402790
    Fixes-bug: 1402806

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