Cinder can't handle changed {volume,snapshot,backup}_name_template configuration

Bug #1602644 reported by Turbo Fredriksson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

Creating an instance from Horizon, specifying to create a volume from an image results in the following:

----- s n i p -----
==> /var/log/cinder/cinder-volume.log <==
2016-07-13 12:44:10.235 22376 DEBUG oslo_messaging._drivers.amqpdriver [-] received message msg_id: 6cbd0e473e114cbc9c24ed7a9851f79d reply to reply_5c545f147ac84d8b87e6fdb45918ba3d __call__ /usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py:201
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher [req-c4b35328-0f2f-4fbb-8c39-04d2538a80eb 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Exception during message handling: list index out of range
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 138, in _dispatch_and_reply
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher incoming.message))
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 185, in _dispatch
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 127, in _do_dispatch
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1441, in initialize_connection
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher volume, connector)
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 760, in create_export
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher volume_path)
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 195, in create_export
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher chap_auth = self._get_target_chap_auth(context, iscsi_name)
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 328, in _get_target_chap_auth
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher vol_id = iscsi_name.split(':volume-')[1]
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher IndexError: list index out of range
2016-07-13 12:44:10.316 22376 ERROR oslo_messaging.rpc.dispatcher
2016-07-13 12:44:10.321 22376 ERROR oslo_messaging._drivers.common [req-c4b35328-0f2f-4fbb-8c39-04d2538a80eb 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Returning exception list index out of range to caller
----- s n i p -----

This is Cinder v2:8.0.0-4 from Debian GNU/Linux Sid/Unstable.

My cinder.conf (at the time of the tests): https://github.com/FransUrbo/openstack_bladecenter/blob/63fe97399bdd0a49fcf30dcf670cf40e25b4306c/configs-control/etc/cinder/cinder.conf

description: updated
Revision history for this message
Turbo Fredriksson (turbo-bayour) wrote :
Download full text (4.1 KiB)

The question mark in the title of the issue is because some time earlier to this, I get:

----- s n i p -----
==> /var/log/cinder/cinder-api.log <==
2016-07-13 12:41:19.825 21657 INFO cinder.volume.api [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Volume created successfully.

==> /var/log/cinder/cinder-volume.log <==
2016-07-13 12:44:05.914 22376 INFO cinder.image.image_utils [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Converted 8192.00 MB image at 57.62 MB/s
2016-07-13 12:44:05.916 22376 DEBUG oslo_concurrency.processutils [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C qemu-img info /dev/mapper/blade_center-18e456ab--f71e--476e--aeb7--f5f1c87cca3b execute /usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:344
2016-07-13 12:44:06.068 22376 DEBUG oslo_concurrency.processutils [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] CMD "sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C qemu-img info /dev/mapper/blade_center-18e456ab--f71e--476e--aeb7--f5f1c87cca3b" returned: 0 in 0.153s execute /usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:374
2016-07-13 12:44:06.070 22376 DEBUG cinder.volume.flows.manager.create_volume [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Downloaded image e6b5d0b2-50ad-4f98-b4df-4b78386090bb ((None, None)) to volume 18e456ab-f71e-476e-aeb7-f5f1c87cca3b successfully. _copy_image_to_volume /usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py:546
2016-07-13 12:44:06.241 22376 DEBUG cinder.image.image_utils [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Temporary image e6b5d0b2-50ad-4f98-b4df-4b78386090bb for user 4b0e25c70d2b4ad6ba4c50250f2f0b0b is deleted. fetch /usr/lib/python2.7/dist-packages/cinder/image/image_utils.py:543
2016-07-13 12:44:06.243 22376 DEBUG cinder.volume.flows.manager.create_volume [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Marking volume 18e456ab-f71e-476e-aeb7-f5f1c87cca3b as bootable. _enable_bootable_flag /usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py:468
2016-07-13 12:44:06.334 22376 DEBUG cinder.volume.flows.manager.create_volume [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca89 - - -] Copying metadata from image e6b5d0b2-50ad-4f98-b4df-4b78386090bb to 18e456ab-f71e-476e-aeb7-f5f1c87cca3b. _handle_bootable_volume_glance_meta /usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py:425
2016-07-13 12:44:06.335 22376 DEBUG cinder.volume.flows.manager.create_volume [req-49a10918-82a2-4bec-97fb-9de89ae34cb4 4b0e25c70d2b4ad6ba4c50250f2f0b0b 04ee0e71babe4fd7aa16c3f64a8fca...

Read more...

Revision history for this message
Turbo Fredriksson (turbo-bayour) wrote :

Found the problem is (was) this part of my configuration:

----- s n i p -----
# Template string to be used to generate volume names (string value)
volume_name_template = %s

# Template string to be used to generate snapshot names (string value)
snapshot_name_template = %s.snap

# Template string to be used to generate backup names (string value)
backup_name_template = %s.back
----- s n i p -----

Putting that back to the default:

----- s n i p -----
# Template string to be used to generate volume names (string value)
volume_name_template = volume-%s

# Template string to be used to generate snapshot names (string value)
snapshot_name_template = snapshot-%s

# Template string to be used to generate backup names (string value)
backup_name_template = backup-%s
----- s n i p -----

It now works. I'm updating the issue title..

summary: - Cinder fails in create/share (?) volume
+ Cinder can't handle changed {volume,snapshot,backup}_name_template
+ configuration
Cao ShuFeng (caosf-fnst)
Changed in cinder:
assignee: nobody → Cao ShuFeng (caosf-fnst)
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: Cao ShuFeng (caosf-fnst) → nobody
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.