ScaleIO driver init fails if no pools configured

Bug #1497413 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Eric Harney

Bug Description

If cinder.conf doesn't set sio_storage_pools, loading the driver results in:

AttributeError: 'NoneType' object has no attribute 'split'

2015-09-18 14:58:04.083 TRACE cinder Traceback (most recent call last):
2015-09-18 14:58:04.083 TRACE cinder File "/usr/bin/cinder-volume", line 10, in <module>
2015-09-18 14:58:04.083 TRACE cinder sys.exit(main())
2015-09-18 14:58:04.083 TRACE cinder File "/opt/stack/cinder/cinder/cmd/volume.py", line 72, in main
2015-09-18 14:58:04.083 TRACE cinder binary='cinder-volume')
2015-09-18 14:58:04.083 TRACE cinder File "/opt/stack/cinder/cinder/service.py", line 251, in create
2015-09-18 14:58:04.083 TRACE cinder service_name=service_name)
2015-09-18 14:58:04.083 TRACE cinder File "/opt/stack/cinder/cinder/service.py", line 130, in __init__
2015-09-18 14:58:04.083 TRACE cinder *args, **kwargs)
2015-09-18 14:58:04.083 TRACE cinder File "/opt/stack/cinder/cinder/volume/manager.py", line 224, in __init__
2015-09-18 14:58:04.083 TRACE cinder is_vol_db_empty=vol_db_empty)
2015-09-18 14:58:04.083 TRACE cinder File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 38, in import_object
2015-09-18 14:58:04.083 TRACE cinder return import_class(import_str)(*args, **kwargs)
2015-09-18 14:58:04.083 TRACE cinder File "/opt/stack/cinder/cinder/volume/drivers/emc/scaleio.py", line 128, in __init__
2015-09-18 14:58:04.083 TRACE cinder self.configuration.sio_storage_pools.split(',')]
2015-09-18 14:58:04.083 TRACE cinder AttributeError: 'NoneType' object has no attribute 'split'
2015-09-18 14:58:04.083 TRACE cinder

This should be fixed so that the driver module still loads successfully, but is uninitialized. check_for_setup_error should ensure that pools are specified if they are required to use the driver.

Eric Harney (eharney)
tags: added: drivers emc scaleio
Xing Yang (xing-yang)
Changed in cinder:
assignee: nobody → Xing Yang (xing-yang)
importance: Undecided → Low
status: New → In Progress
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/225982

Changed in cinder:
assignee: Xing Yang (xing-yang) → Eric Harney (eharney)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 8e69447d7b9efc23a0695edbbb55bfbd845a99d8
Author: Eric Harney <email address hidden>
Date: Mon Sep 21 14:29:19 2015 -0400

    Allow c-vol backends to start when some backends fail to load

    Currently, if a c-vol backend fails to load due to an error in
    the module startup process (like a volume driver's __init__ or
    dependency import failure), the c-vol process halts completely.

    Instead, catch that backend failure, log it, and allow other
    backends in enabled_backends to still start up and run.

    Note that this is not applicable for failures that allow
    drivers to load and remain "uninitialized" -- this is for
    failures that occur prior to that point.

    Closes-Bug: #1497413

    Change-Id: If183b9e3d21777cddf713c2dc88dc80ae7cfe01d

Changed in cinder:
status: In Progress → Fix Committed
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/227028

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit ce575378da90ee3772438095b81a004ed7553102
Author: Xing Yang <email address hidden>
Date: Sat Aug 22 06:28:32 2015 -0400

    Check sio_storage_pools in check_for_setup_error

    The ScaleIO driver fails to load if sio_storage_pools is not
    specified in cinder.conf. This patch checks it in check_for_setup_error
    and also check it in __init__.

    Change-Id: I0fed70848ad2ecf3899b07058fabfa68df07edbd
    Closes-Bug: #1497413

Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-rc1 → 7.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/237755

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/liberty)

Reviewed: https://review.openstack.org/237755
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=4bbf59cd06cd92031525c738e83c67823a882ff2
Submitter: Jenkins
Branch: stable/liberty

commit 4bbf59cd06cd92031525c738e83c67823a882ff2
Author: Xing Yang <email address hidden>
Date: Sat Aug 22 06:28:32 2015 -0400

    Check sio_storage_pools in check_for_setup_error

    The ScaleIO driver fails to load if sio_storage_pools is not
    specified in cinder.conf. This patch checks it in check_for_setup_error
    and also check it in __init__.

    Change-Id: I0fed70848ad2ecf3899b07058fabfa68df07edbd
    Closes-Bug: #1497413
    (cherry picked from commit ce575378da90ee3772438095b81a004ed7553102)

tags: added: in-stable-liberty
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/cinder 8.0.0.0b1

This issue was fixed in the openstack/cinder 8.0.0.0b1 development milestone.

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in cinder 7.0.1

This issue was fixed in the cinder 7.0.1 release (liberty).

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.