RBD driver doesn't get volume_backend_name value from configuration file

Bug #1172286 reported by Tomasz Czekajło
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Walt Boring
Grizzly
Fix Released
High
John Griffith

Bug Description

Hi,

I wanted to use multi-backend feature with RBD/Ceph. I prepared configuration but there was still problem when i chose type volume with extra specs. In logs i can see notification that valid host not exist.

After a long search the reasons why my configuration does't work i find in cinder/volume/drivers/rbd.py that my option included in backend configuration in cinder.conf is not taken into account by RBD driver.

root@openstack-1:~# cinder extra-specs-list
+--------------------------------------+------+----------------------------------------+
| ID | Name | extra_specs |
+--------------------------------------+------+----------------------------------------+
| 591caaa5-8de7-4c7d-bf26-8f34a684175f | SAS | {u'volume_backend_name': u'CEPH_SAS'} |
| 68842cdc-34b0-4371-b038-f9c34b231e02 | SATA | {u'volume_backend_name': u'CEPH_SATA'} |
+--------------------------------------+------+----------------------------------------+

My cinder.conf

enabled_backends=storage-sas,storage-sata

[storage-sas]
volume_driver=cinder.volume.driver.RBDDriver
volume_name_template = volume-%s
volume_backend_name=CEPH_SAS
rbd_pool=sas_volumes
rbd_user=volumes
rbd_secret_uuid=xxx

[storage-sata]
volume_name_template = volume-%s
volume_driver=cinder.volume.driver.RBDDriver
volume_backend_name=CEPH_SATA
rbd_pool=sata_volumes
rbd_user=volumes
rbd_secret_uuid=xxx

Below my changes:

*** 55,61 ****
          super(RBDDriver, self).__init__(*args, **kwargs)
          self.configuration.append_config_values(rbd_opts)
          self._stats = dict(
! volume_backend_name='RBD',
              vendor_name='Open Source',
              driver_version=VERSION,
              storage_protocol='ceph',
--- 55,61 ----
          super(RBDDriver, self).__init__(*args, **kwargs)
          self.configuration.append_config_values(rbd_opts)
          self._stats = dict(
! volume_backend_name=self.configuration.volume_backend_name or 'RBD',
              vendor_name='Open Source',
              driver_version=VERSION,
              storage_protocol='ceph',
***************

And now works! Hura!

description: updated
summary: - RBD driver doesn't get volume_backend_name from configuration file
+ RBD driver doesn't get volume_backend_name value from configuration file
Revision history for this message
Josh Durgin (jdurgin) wrote :

The patch looks good, could you propose it via gerrit (https://wiki.openstack.org/wiki/GerritWorkflow)? Thanks!

Changed in cinder:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Tomasz Czekajło (coldgunpl) wrote :

Done.

Revision history for this message
Tomasz Czekajło (coldgunpl) wrote :
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/28208

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/28208
Committed: http://github.com/openstack/cinder/commit/54a2ee48a4dc31cbf116b1e9d5add37efe66bc20
Submitter: Jenkins
Branch: master

commit 54a2ee48a4dc31cbf116b1e9d5add37efe66bc20
Author: Walter A. Boring IV <email address hidden>
Date: Fri May 3 14:36:12 2013 -0700

    Fix ability to add custom volume_backend_name

    This patch fixes the ability to set the volume_backend_name
    for each driver. The original bug was filed against LeftHand
    and 3PAR, but several drivers exhibited a fixed backend name.

    Fixes: bug #1175222
           bug #1172286

    Change-Id: I4197f99bebd6ca8e4969795ae6edb537bc066c90

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/28440

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

Reviewed: https://review.openstack.org/28440
Committed: http://github.com/openstack/cinder/commit/995a3100fcaa7eb445b2838c4b4799a482c817cc
Submitter: Jenkins
Branch: stable/grizzly

commit 995a3100fcaa7eb445b2838c4b4799a482c817cc
Author: Walter A. Boring IV <email address hidden>
Date: Fri May 3 14:36:12 2013 -0700

    Fix ability to add custom volume_backend_name

    This patch fixes the ability to set the volume_backend_name
    for each driver. The original bug was filed against LeftHand
    and 3PAR, but several drivers exhibited a fixed backend name.

    Fixes: bug #1175222
           bug #1172286

    Change-Id: I4197f99bebd6ca8e4969795ae6edb537bc066c90
    (cherry picked from commit 54a2ee48a4dc31cbf116b1e9d5add37efe66bc20)

tags: added: in-stable-grizzly
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-1 → 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.