Ask Your Question
0

cinder "Failed to create iscsi target for volume"

asked 2014-10-30 07:24:40 -0500

M4Rk0 gravatar image

hi,

I have a problem with cinder attaching volume to VMs. The cinder creates the volume (LVM) but the problem is "cinder-rtstool" that has problem with rtslib and the iscsi.spec file. In clean install ther is no iscsi.spec file. When i add the file i got another error (see below).

I create the iscei.spec file from the exmaples: http://paste.openstack.org/show/126991/

Cinder node config: http://paste.openstack.org/show/127003/

System:

  • CentOS 6.6
  • OpenStack Icehouse ( RDO )
  • openstack-cinder-2014.1.3-1.el6.noarch
  • python-rtslib-2.1.fb21-3.el6_4.noarch
  • iscsi-initiator-utils-6.2.0.873-13.el6.x86_64

Logs without the iscis.spec file:

2014-10-30 12:59:06.238 1652 ERROR cinder.brick.iscsi.iscsi [req-00a137e3-ad51-4b1e-8a4d-5d3f1bf0840d 9b060b7964f2417eafa37ec1631d2dd2 0b5e7c47ae784ce9a65d5c9c59fc335b - - -] Failed to create iscsi target for volume id:volume-ab01a7da-b577-41e4-8fbe-2a1278b67509.

2014-10-30 12:59:06.239 1652 ERROR cinder.brick.iscsi.iscsi [req-00a137e3-ad51-4b1e-8a4d-5d3f1bf0840d 9b060b7964f2417eafa37ec1631d2dd2 0b5e7c47ae784ce9a65d5c9c59fc335b - - -] Unexpected error while running command.

Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool create /dev/cinder-volumes/volume-ab01a7da-b577-41e4-8fbe-2a1278b67509 iqn.iscsi.cinder:volume-ab01a7da-b577-41e4-8fbe-2a1278b67509 9w6kGjtyuqj2ZwyaPKQW qedTBFL5Jx7myQXm4iCQ Exit code: 1 Stdout: u'' Stderr: u'Traceback (most recent call last): File "/usr/bin/cinder-rtstool", line 238, in <module> sys.exit(main()) File "/usr/bin/cinder-rtstool", line 203, in main create(backing_device, name, userid, password, initiator_iqns) File "/usr/bin/cinder-rtstool", line 52, in create target_new = rtslib.Target(rtslib.FabricModule(\'iscsi\'), name, \'create\') File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 68, in __init__ self.spec = self._parse_spec(spec_dir+"/"+name+".spec") File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 115, in _parse_spec execfile(spec_file, specfile_funcs, spec)\nIOError: [Errno 2] No such file or directory: \'/var/lib/target/fabric/iscsi.spec\'\n'

2014-10-30 12:59:06.240 1652 ERROR oslo.messaging.rpc.dispatcher [req-00a137e3-ad51-4b1e-8a4d-5d3f1bf0840d 9b060b7964f2417eafa37ec1631d2dd2 0b5e7c47ae784ce9a65d5c9c59fc335b - - -] Exception during message handling: Failed to create iscsi target for volume volume-ab01a7da-b577-41e4-8fbe-2a1278b67509.

Logs with spec file:

2014-10-30 13:14:56.487 1978 ERROR cinder.brick.iscsi.iscsi [req-0a463c18-1eab-48ef-add7-eaf169b7ed21 9b060b7964f2417eafa37ec1631d2dd2 0b5e7c47ae784ce9a65d5c9c59fc335b - - -] Failed to create iscsi target for volume id:volume-e6e4584c-7828-4046-98f6-a524d5cd59a3. 2014-10-30 13:14:56.488 1978 ERROR cinder.brick.iscsi.iscsi [req-0a463c18-1eab-48ef-add7-eaf169b7ed21 9b060b7964f2417eafa37ec1631d2dd2 0b5e7c47ae784ce9a65d5c9c59fc335b - - -] Unexpected error while running command. Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool create /dev/cinder-volumes/volume-e6e4584c-7828-4046-98f6-a524d5cd59a3 iqn.iscsi.cinder:volume-e6e4584c-7828-4046-98f6-a524d5cd59a3 59YD9Lj4ZGvcfjVEqNhn JfBkyoxzqATjC2fM8pJW Exit code: 1 Stdout: u'' Stderr: u'Traceback (most recent call last): File "/usr/bin/cinder-rtstool", line 238, in <module> sys.exit(main())\n File "/usr/bin/cinder-rtstool", line 203, in main create(backing_device, name, userid, password, initiator_iqns) File "/usr/bin/cinder-rtstool", line 52, in create target_new = rtslib.Target(rtslib.FabricModule(\'iscsi\'), name, \'create\') File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 68, in __init__ self.spec = self._parse_spec(spec_dir+"/"+name+".spec") File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 115, in _parse_spec execfile(spec_file, specfile_funcs, spec) File "/var/lib/target/fabric/iscsi.spec", line 5, in <module> features = discovery_auth, acls, acls_auth, acls_tcq_depth, nps, tpgts\nNameError: name \'discovery_auth\' is not defined

2014-10-30 13:14:56.489 1978 ERROR oslo.messaging.rpc.dispatcher [req-0a463c18-1eab-48ef-add7-eaf169b7ed21 9b060b7964f2417eafa37ec1631d2dd2 0b5e7c47ae784ce9a65d5c9c59fc335b - - -] Exception during message handling: Failed to create iscsi target for volume ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-12-10 20:36:39 -0500

Alvin gravatar image

The syntax of the iscsi.spec file should look like this:

# WARNING: This is a draft specfile supplied for demo purposes only.

# The iSCSI fabric module uses the default feature set.
features = ("acls", "acls_auth", "discovery_auth", "nps", "tpgts",)

# Obviously, this module uses IQN strings as WWNs
wwn_type = "iqn"

# The kernel module is default
# kernel_module = iscsi_target_mod

# The configfs group name is default
# configfs_group = iscsi
edit flag offensive delete link more
0

answered 2014-12-11 10:30:50 -0500

http://docs.openstack.org/icehouse/in...

Please read carfefully. This may help. Verify all your cinder and iscsi configs.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-10-30 07:24:40 -0500

Seen: 1,482 times

Last updated: Dec 11 '14