Scheduler stats reports stale data

Bug #1402806 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

The scheduler stats API reports stale data, despite the fact that it receives updates from the volume drivers.

Steps to reproduce (with a single backend using lvm):
1. Create a volume:
     cinder create 1
2. Query the stats and view the timestamp:
     curl -s -H "X-Auth-Token: $OS_TOKEN" $CINDER_URL/scheduler-stats/get_pools?detail=True | python -mjson.tool | grep timestamp
   It will show the current timestamp
3. Wait for a minute or two (or as long as you want!) to see in the scheduler log that it has "Received volume service update"s from the drivers. During this waiting, avoid creating any volumes.
4. Re-query the stats with the same command as in step 2. Note that the timestamp has not changed

This is due to a problem in the host_manager.py object whereby the scheduler's copy of the stats is only updated as a side-effect of the call to get_all_host_states, which is only done by the filter scheduler at volume creation time.

Changed in cinder:
assignee: nobody → Gary W. Smith (gary-w-smith)
Changed in cinder:
status: New → Confirmed
importance: Undecided → Medium
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.