cinder creating volume raise error

Bug #1069927 reported by Rongze Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Unassigned

Bug Description

1. I use devstack and default setting
zhu@zrz-dev:~/git/devstack$ cinder create 1
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| created_at | 2012-10-22T17:10:06.033684 |
| display_description | None |
| display_name | None |
| id | 679d9e62-26f4-4f2c-a3c0-24d5217dc565 |
| metadata | {} |
| size | 1 |
| snapshot_id | None |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+
zhu@zrz-dev:~/git/devstack$ cinder list
+--------------------------------------+--------+--------------+------+-------------+-------------+
| ID | Status | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+--------+--------------+------+-------------+-------------+
| 679d9e62-26f4-4f2c-a3c0-24d5217dc565 | error | None | 1 | None | |
+--------------------------------------+--------+--------------+------+-------------+-------------+

cinder-volume log:
2012-10-22 17:10:06 ERROR cinder.volume.iscsi [req-fb047733-dfb0-4a8f-9dfc-7088c6cf4ae7 e9208f4cbdf64e54875a12d2a39709a4 8ef44aaaa2314e8e8061e18637ac05c5] Failed to create iscsi target for volume id:volume-679d9e62-26f4-4f2c-a3c0-24d5217dc565.
2012-10-22 17:10:06 ERROR cinder.openstack.common.rpc.amqp [-] Exception during message handling
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/amqp.py", line 276, in _process_data
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp rval = self.proxy.dispatch(ctxt, version, method, **args)
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/dispatcher.py", line 145, in dispatch
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/manager.py", line 163, in create_volume
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp volume_ref['id'], {'status': 'error'})
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/manager.py", line 156, in create_volume
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp model_update = self.driver.create_export(context, volume_ref)
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/driver.py", line 376, in create_export
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp volume_path)
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/iscsi.py", line 140, in create_iscsi_target
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-679d9e62-26f4-4f2c-a3c0-24d5217dc565.
2012-10-22 17:10:06 TRACE cinder.openstack.common.rpc.amqp

2. I add "print e" in cinder/volume/iscsi.py line 137 and try again, it raise the same error and print the detail of exception.

cinder-volume log:
1e18637ac05c5] Failed to create iscsi target for volume id:volume-db1c260b-81a2-4a0c-9e5b-45d537549589.
Unexpected error while running command.
Command: sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf tgt-admin --update iqn.2010-10.org.openstack:volume-db1c260b-81a2-4a0c-9e5b-45d537549589
Exit code: 2
Stdout: ''
Stderr: 'Config::General The file "/opt/stack/cinder/volumes/*" does not exist within ConfigPath: /etc/tgt! at /usr/sbin/tgt-admin line 172\n'
2012-10-22 17:20:17 ERROR cinder.openstack.common.rpc.amqp [-] Exception during message handling
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/amqp.py", line 276, in _process_data
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp rval = self.proxy.dispatch(ctxt, version, method, **args)
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/dispatcher.py", line 145, in dispatch
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/manager.py", line 163, in create_volume
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp volume_ref['id'], {'status': 'error'})
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/manager.py", line 156, in create_volume
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp model_update = self.driver.create_export(context, volume_ref)
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/driver.py", line 376, in create_export
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp volume_path)
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/iscsi.py", line 141, in create_iscsi_target
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-db1c260b-81a2-4a0c-9e5b-45d537549589.
2012-10-22 17:20:17 TRACE cinder.openstack.common.rpc.amqp

3. I redo the command
zhu@zrz-dev:/opt/stack/cinder$ sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf tgt-admin --update iqn.2010-10.org.openstack:volume-db1c260b-81a2-4a0c-9e5b-45d537549589
Config::General The file "/opt/stack/cinder/volumes/*" does not exist within ConfigPath: /etc/tgt! at /usr/sbin/tgt-admin line 172
zhu@zrz-dev:/opt/stack/cinder$

Revision history for this message
Vish Ishaya (vishvananda) wrote :

Which os is this? It looks like tgt-admin is limiting conf values differently than it does on most installs.

affects: cinder → devstack
Revision history for this message
John Griffith (john-griffith) wrote :

I'm also a bit confused as to the path it's trying to get (/opt/stack/cinder/volumes/*), It's missing "data" (/opt/stack/data/cinder/volumes/*) ???

Revision history for this message
Rongze Zhu (zrzhit) wrote :

The newest devstack (commit 92c964f92a7460ecf37d0fb10e7d006bb203779c).
Ubuntu 12.04 Server 64bit
tgtadm 1.0.17

Revision history for this message
Rongze Zhu (zrzhit) wrote :

After I change "include /opt/stack/cinder/volumes/*" to "include /opt/stack/data/cinder/volumes/*" in /etc/tgt/conf.d/cinder.conf, it is ok :).

Changed in devstack:
status: New → Invalid
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.