LVM volume clone fails with NoSuchOptError volume_name_template

Bug #1199909 reported by Eric Harney on 2013-07-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
John Griffith

Bug Description

On master, July 10 2f5e26a2

$ cinder create --source-volid 52e073e7-06f1-44d9-b404-0b7f86bff759 --volume-type lvm2 1

2013-07-10 12:57:35.929 INFO cinder.volume.drivers.lvm [req-eb8e1a75-1fba-4b92-9409-c1d26da6b2d7 323cc6ce2a154d92a99a9166530b8fa9 861d5a0ba6964f2bba82968bf0da34ca] Creating clone of volume: 52e073e7-06f1-44d9-b404-0b7f86bff759
2013-07-10 12:57:36.047 ERROR cinder.volume.manager [req-eb8e1a75-1fba-4b92-9409-c1d26da6b2d7 323cc6ce2a154d92a99a9166530b8fa9 861d5a0ba6964f2bba82968bf0da34ca] volume volume-916aac1a-0ef3-4a0b-8676-52d5199d1863: create failed
2013-07-10 12:57:36.048 ERROR cinder.openstack.common.rpc.amqp [req-eb8e1a75-1fba-4b92-9409-c1d26da6b2d7 323cc6ce2a154d92a99a9166530b8fa9 861d5a0ba6964f2bba82968bf0da34ca] Exception during message handling
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/amqp.py", line 433, in _process_data
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp **args)
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/dispatcher.py", line 148, in dispatch
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/manager.py", line 328, in create_volume
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp "create.end")
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/manager.py", line 266, in create_volume
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp image_location)
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/manager.py", line 181, in _create_volume
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp srcvol_ref)
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/drivers/lvm.py", line 303, in create_cloned_volume
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp volume_name = self.configuration.volume_name_template % src_vref['id']
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/configuration.py", line 84, in __getattr__
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp return getattr(self.local_conf, value)
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/oslo/config/cfg.py", line 1704, in __getattr__
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp return self._conf._get(name, self._group)
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/oslo/config/cfg.py", line 1509, in _get
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp value = self._substitute(self._do_get(name, group))
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/oslo/config/cfg.py", line 1525, in _do_get
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp info = self._get_opt_info(name, group)
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/oslo/config/cfg.py", line 1625, in _get_opt_info
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp raise NoSuchOptError(opt_name, group)
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp NoSuchOptError: no such option in group lvm1: volume_name_template
2013-07-10 12:57:36.048 TRACE cinder.openstack.common.rpc.amqp

conf contains:

[DEFAULT]
volume_name_template = volume-%s
enabled_backends=lvm1,lvm2

[lvm1]
volume_group=cinder-vg-1
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
volume_backend_name=lvm1

[lvm2]
volume_group=cinder-vg-2
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
volume_backend_name=lvm2

Eric Harney (eharney) on 2013-07-10
Changed in cinder:
importance: Undecided → High
Changed in cinder:
assignee: nobody → Rongze Zhu (zrzhit)
status: New → In Progress
John Griffith (john-griffith) wrote :

This fails because evertyhing wsa switched to self.configuration options in the driver and in this case the volume_template_name option is not included in the import optoins.

Simple fix to keep the global template name is:
http://paste.openstack.org/show/39979/

Rongze Zhu (zrzhit) on 2013-07-10
Changed in cinder:
assignee: Rongze Zhu (zrzhit) → nobody

Fix proposed to branch: master
Review: https://review.openstack.org/36538

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
Changed in cinder:
milestone: none → havana-2

Reviewed: https://review.openstack.org/36538
Committed: http://github.com/openstack/cinder/commit/488fe5e8605dabf22914a99d3c57bb249ef9c36a
Submitter: Jenkins
Branch: master

commit 488fe5e8605dabf22914a99d3c57bb249ef9c36a
Author: John Griffith <email address hidden>
Date: Wed Jul 10 13:41:10 2013 -0600

    Fix missing volume_name_template flag.

    volume_template_name was converted to a self.configuration option,
    however we don't import that opt in the self.configuration changes.

    This patch switches the specifier back to the global CONF

    Fixes bug: 1199909

    Change-Id: I1431ba8a46b3a86ed77c02646a1c5fd1f62ae010

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-07-17
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers