Ask Your Question
0

Cinder fails to attach volume to instance

asked 2014-12-09 04:13:17 -0500

Alvin gravatar image

updated 2014-12-09 21:40:11 -0500

New finding:

cinder-rtstool returns the following error when it creates the volume for the first time:

Stderr: u'Traceback (most recent call last):\n  File "/usr/bin/cinder-rtstool", line 238, in <module>\n    sys.exit(main())\n  File "/usr/bin/cinder-rtstool", line 203, in main\n    create(backing_device, name, userid, password, initiator_iqns)\n  File "/usr/bin/cinder-rtstool", line 52, in create\n    target_new = rtslib.Target(rtslib.FabricModule(\'iscsi\'), name, \'create\')\n  File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 1263, in __init__\n    fabric_module._check_self()\n  File "/usr/lib/python2.6/site-packages/rtslib/target.py", line 75, in _check_self\n    modprobe(self.spec[\'kernel_module\'])\n  File "/usr/lib/python2.6/site-packages/rtslib/utils.py", line 543, in modprobe\n    raise RTSLibError(stderrdata)\nrtslib.utils.RTSLibError: FATAL: Module iscsi_target_mod not found.\n\n'

Subequent call to "cinder-rtstool create" will not show this error because the entry is already added to rtsroot.storage_objects.

I am new to OpenStack and trying out the block storage service. I'm running the icehouse version and deploying the "Three-node" architecture as described in the icehouse installation guide, with an extra node hosting the block storage service.

I get the following error when trying to attach a volume to an instance:

2014-12-09 17:28:11.987 4770 WARNING cinder.context [-] Arguments dropped when creating context: {'user': u'6f770c6ac24c4bd1bae9a4fc7534eb50', 'tenant': u'af40959dc2a24e77bce91496142cbebd', 'user_identity': u'6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -'}
2014-12-09 17:28:12.013 4770 DEBUG cinder.volume.manager [req-b8ccea5a-06cb-4a5f-8bc9-db21934f259e 6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -] Volume ed5859b5-d0f7-49a9-a1be-9be25b9e50cb: creating export initialize_connection /usr/lib/python2.6/site-packages/cinder/volume/manager.py:788
2014-12-09 17:28:12.074 4770 INFO cinder.brick.iscsi.iscsi [req-b8ccea5a-06cb-4a5f-8bc9-db21934f259e 6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -] Creating iscsi_target for volume: volume-ed5859b5-d0f7-49a9-a1be-9be25b9e50cb
2014-12-09 17:28:12.075 4770 DEBUG cinder.openstack.common.processutils [req-b8ccea5a-06cb-4a5f-8bc9-db21934f259e 6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool create /dev/cinder-volumes/volume-ed5859b5-d0f7-49a9-a1be-9be25b9e50cb iqn.2010-10.org.openstack:volume-ed5859b5-d0f7-49a9-a1be-9be25b9e50cb B5BHcArjTT672iFKLdPb ZnRdQu36sqQahJhVob37 execute /usr/lib/python2.6/site-packages/cinder/openstack/common/processutils.py:147
2014-12-09 17:28:12.317 4770 DEBUG cinder.openstack.common.processutils [req-b8ccea5a-06cb-4a5f-8bc9-db21934f259e 6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -] Result was 0 execute /usr/lib/python2.6/site-packages/cinder/openstack/common/processutils.py:171
2014-12-09 17:28:12.318 4770 DEBUG cinder.openstack.common.processutils [req-b8ccea5a-06cb-4a5f-8bc9-db21934f259e 6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool get-targets execute /usr/lib/python2.6/site-packages/cinder/openstack/common/processutils.py:147
2014-12-09 17:28:12.514 4770 DEBUG cinder.openstack.common.processutils [req-b8ccea5a-06cb-4a5f-8bc9-db21934f259e 6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -] Result was 0 execute /usr/lib/python2.6/site-packages/cinder/openstack/common/processutils.py:171
2014-12-09 17:28:12.515 4770 ERROR cinder.brick.iscsi.iscsi [req-b8ccea5a-06cb-4a5f-8bc9-db21934f259e 6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -] Failed to create iscsi target for volume id:volume-ed5859b5-d0f7-49a9-a1be-9be25b9e50cb.
2014-12-09 17:28:12.516 4770 ERROR oslo.messaging.rpc.dispatcher [req-b8ccea5a-06cb-4a5f-8bc9-db21934f259e 6f770c6ac24c4bd1bae9a4fc7534eb50 af40959dc2a24e77bce91496142cbebd - - -] Exception during message handling: Resource could not befound.
2014-12-09 17:28:12.516 4770 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-12-09 17:28:12.516 4770 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-12-09 10:55:52 -0500

yatin gravatar image

updated 2014-12-09 10:57:23 -0500

You need to verify tgt service is configured properly, check /etc/tgt/targets.conf for entries which looks like:

include /etc/tgt/conf.d/*.conf
include /etc/tgt/stack.d/*

and in file /etc/tgt/conf.d/cinder_tgt.conf

include /opt/stack/data/cinder/volumes/*

This may be different in your case, if the cinder_tgt.conf doesn't exist then create and add path to your cinder volumes directory. restart tgt service using:

sudo service tgt restart
edit flag offensive delete link more

Comments

My configuration is not exactly like this, but I've added the following line to /etc/tgt/targets.conf as suggested by the installation guide:

include /etc/cinder/volumes/*

But I also tried your suggested configuration but the result is the same.

Alvin gravatar imageAlvin ( 2014-12-09 20:26:21 -0500 )edit
0

answered 2014-12-09 12:48:30 -0500

pcaruana gravatar image

updated 2014-12-09 12:51:47 -0500

If you can share with us what is the linux distro and version are you running as if you are using any specific backend or multinodes for cinder, we can be more specific about commands and file locations. Did you find something additional on nova logs? Also if can share more details like ll /etc/cinder/volumes/ :; grep -v ^# /etc/cinder/cinder.conf ; nova list; cinder list: ls -l /var/lib/iscsi/nodes/; ls -l /var/lib/cinder/volumes; vgdisplay; pvdisplay; pvscan output lvs; iscsiadm -m session

edit flag offensive delete link more

Comments

More information are provided. Any idea?

Alvin gravatar imageAlvin ( 2014-12-09 20:22:56 -0500 )edit

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

2 followers

Stats

Asked: 2014-12-09 04:13:17 -0500

Seen: 1,401 times

Last updated: Dec 09 '14