Drivers dont error out or log message for set up error

Bug #1225897 reported by Navneet
30
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Walt Boring

Bug Description

In volume manager init_host, in response to fix for bug 1221874, the do_setup and check_for_setup_error are enclosed in try/catch block. This causes manager to log a general error message in case of driver set up error and continue running to accept requests. Due to this any driver which has improper set up can result in erroneous or indeterministic behavior in response to requests. This also does not let the admin determine the exact setup error which is sent as par of exception message. It needs to be corrected to fulfill the following:

1. Log the appropriate backend specific error message for admin to determine the exact problem and correct it.
2. Either re raise the exception in the except block to fail driver instantiation or have a mechanism in manager to stop any further requests to be passed to the backend which resulted in set up error.

Navneet (singn)
description: updated
description: updated
Revision history for this message
Eric Harney (eharney) wrote :

Broken by d552220a. This except: should be doing a LOG.exception() at least.

http://git.openstack.org/cgit/openstack/cinder/tree/cinder/volume/manager.py?id=e34ab12fb#n173

Changed in cinder:
importance: Undecided → High
milestone: none → havana-rc1
status: New → Confirmed
Revision history for this message
Walt Boring (walter-boring) wrote :

3. The scheduler needs to check to make sure the driver has been initialized correctly. VolumeDriver.initialized() should return True

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

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

Reviewed: https://review.openstack.org/46843
Committed: http://github.com/openstack/cinder/commit/2177cbbe0692d5dadc22a717d46ae0dd755cedaa
Submitter: Jenkins
Branch: master

commit 2177cbbe0692d5dadc22a717d46ae0dd755cedaa
Author: Walter A. Boring IV <email address hidden>
Date: Mon Sep 16 17:05:27 2013 -0700

    Enforce driver is initialized

    This updates the volume manager and the
    backup manager to enforce that the driver
    has been initialized.

    The managers call the driver in many places
    without ensuring that the driver has been
    properly initialized. When the driver fails
    inside of do_setup(), the managers shouldn't
    call the driver's set_initialized() method.
    The managers now dump out the exception, and
    exit the init_host, leaving the driver in
    an uninitialized state.

    Fixes bug #1225897

    Change-Id: I77b947f2a9fbe1b38f321511dba10fcd2fe1fe90

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.