Unhandled exception on update_volume_group when vg is None

Bug #1221874 reported by John Griffith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
John Griffith

Bug Description

There's a possibility of the cinder-scheduler issuing a get_volume_stats() call before the volume-service/driver is properly initialized and ready. The result is an rpc Error and corresponding stack-trace in the cinder-volume logs.

We should check to make sure the VG is initialized and ready before attempting to update the stats, if it's not just return the empty stats dict and let the schedulers periodic update things when it's finally ready.

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/45484

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

Reviewed: https://review.openstack.org/45484
Committed: http://github.com/openstack/cinder/commit/d552220a83052daabe19682b531bc6b8e685a834
Submitter: Jenkins
Branch: master

commit d552220a83052daabe19682b531bc6b8e685a834
Author: John Griffith <email address hidden>
Date: Fri Sep 6 13:55:39 2013 -0600

    Do not attempt vg.update on uninitialized vg

    It's possible for the scheduler to send the periodic
    stats update request *before* the volume service/driver
    has finished initializing, resulting in an exception trace
    being logged.

    This change adds a check to verify that the vg is actually
    initialized (completed check_for_setup_error) and it also
    removes all of the duplication of each LVM class driver.

    To deal with other drivers that may have similar issues,
    add initialized member to base driver, that member is
    set False on __init__ and is updated by the manager
    after running check_for_setup_error. We also skip
    update_stats if initialization isn't set True.

    Rather than have a separate copy of update_stats in every
    driver, we have one in the base LVM class and we set the two
    unique variables as member parameters.

    Fixes bug 1221874

    Change-Id: I159e98a77782b8b2c85a8dd956b150828358fd25

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