Ask Your Question
1

Cinder: Volume Creation Error - iscsi

asked 2013-05-30 10:41:31 -0600

TaehongKim gravatar image

updated 2013-06-08 22:27:29 -0600

fifieldt gravatar image

I followed official gizzy installation guide. link:http://docs.openstack.org/grizzly/basic-install/apt/content/basic-install_controller.html#basic-install_controller-cinder (Here)

But I have a problem when I try to create cinder volume. (See Cinder-volume.log/ cinder list below)

In addition, My tgtd is not usual. System didn't recongnize the tgtd service. service tgtd start gives tgtd: unrecognized service So I have to run the service like this "/usr/sbin/tgtd".


Cinder-volume.log

2013-05-30 22:07:43    DEBUG [cinder.utils] Result was 255
2013-05-30 22:07:43    ERROR [cinder.volume.iscsi] Failed to create iscsi target for volume id:volume-99d31b2d-cf62-455c-87f1-c15358672d43.
2013-05-30 22:07:43    ERROR [cinder.volume.manager] volume volume-99d31b2d-cf62-455c-87f1-c15358672d43: create failed
2013-05-30 22:07:43    ERROR [cinder.openstack.common.rpc.amqp] Exception during message handling
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/amqp.py", line 430, in _process_data
    rval = self.proxy.dispatch(ctxt, version, method, **args)
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/dispatcher.py", line 133, in dispatch
    return getattr(proxyobj, method)(ctxt, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 282, in create_volume
    LOG.error(_("volume %s: create failed"), volume_ref['name'])
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 274, in create_volume
    model_update = self.driver.create_export(context, volume_ref)
  File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 484, in create_export
    chap_auth)
  File "/usr/lib/python2.7/dist-packages/cinder/volume/iscsi.py", line 168, in create_iscsi_target
    raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-99d31b2d-cf62-455c-87f1-c15358672d43.

vgs

 VG             #PV #LV #SN Attr   VSize   VFree  
  cinder-volumes   1   5   0 wz--n- 807.02g 802.02g

ls -al /var/lib/cinder/volumes/

total 20
drwxr-x--- 2 cinder cinder       4096 May 30 22:07 .
drwx------ 3 cinder cinder       4096 May 29 18:20 ..
-rw-r--r-- 1 cinder cinder 2147483648 May 29 21:27 cinder-volumes
-rw-r--r-- 1 cinder cinder        307 May 29 18:30 volume-110c50f4-0d49-4e6b-a8d3-c1525ba61b2a
-rw-r--r-- 1 cinder cinder        307 May 30 01:44 volume-427a053b-1920-4cd2-8f27-778a7739b9a5
-rw-r--r-- 1 cinder cinder        307 May 29 18:21 volume-f1fcaab6-8e83-41da-a2b7-b6a124591e8a

cinder list

+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
| 2e413409-fef1-43c1-ab56-0575ee4a7600 | error  |      1       |  1   |     None    |  false   |             |
| 536b667f-c80d-4123-ad86-d146f8594ce9 | error  |     ttt      |  1   |     None    |  false   |             |
| 5f4f6278-264b-4d2d-a672-2f8f78c30727 | error  |      t       |  1   |     None    |  false   |             |
| 99d31b2d-cf62-455c-87f1-c15358672d43 | error  |      TT      |  1   |     None    |  false   |             |
| f3fc2293-3a96-4195-a6d9-531025c45ae3 | error  |      1       |  1   |     None    |  false   |             |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+

ps -ef |grep tgtd

root     12660     1  0 May30 ?        00:00:00 tgtd
root     12661 12660  0 May30 ?        00:00:00 tgtd
root     28822 12112  0 00:15 pts/1    00:00:00 grep --color=auto tgtd

tgtadm --lld iscsi --op show --mode system

System:
    State: ready
iSNS:
    iSNS=Off
    iSNSServerIP=
    iSNSServerPort=3205
    iSNSAccessControl=Off

cat /etc/tgt/targets.conf

include /etc/tgt/conf.d/cinder_tgt.conf
default-driver iscsi

cat /etc/tgt/conf.d/cinder_tgt.conf

include /var/lib/cinder/volumes/*

cat /etc/cinder/cinder.conf

[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper ...
(more)
edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
1

answered 2013-06-18 17:33:36 -0600

jgriffith gravatar image

Change content of the /etc/tgt/targets.conf from "include /etc/tgt/conf.d/*.conf" to: include /etc/tgt/conf.d/cinder_tgt.conf:

include /etc/tgt/conf.d/cinder_tgt.conf
include /etc/tgt/conf.d/cinder.conf
default-driver iscsi

Then restart tgt and cinder-* services so they pick up the new configuration.

I think that might be what you need here.

edit flag offensive delete link more

Comments

Tried this on another controller install and it didn't work. Trying again on my controller now.

Seems to be related to tgt and possible race condition. Restarting tgt runs CPU up to 80>% for >5min, memory goes to >90%.

BTW, my install is on VirtualBox.

tspoone gravatar imagetspoone ( 2013-06-18 18:40:51 -0600 )edit

I made the changes to the /etc/tgt/targets.conf per the suggestion. Still fails. tgt-admin goes into a race condition and eats up all the memory before failing. Cinder times out before then and displays error status. Any ideas on tgt? Am running 1.0.17.

tspoone gravatar imagetspoone ( 2013-06-18 18:49:26 -0600 )edit

OK, got it to work by adding more memory to the controller. I was running with 4GB RAM, bumped it to 10GB and it worked. I would say that there must be something with the way that tgt-admin is working because it consumed 60% of 10GB RAM to complete. tgtadm isn't using the RAM or CPU, tgt-admin is

tspoone gravatar imagetspoone ( 2013-06-18 19:50:23 -0600 )edit
0

answered 2013-08-07 02:21:00 -0600

nishtha gravatar image

I got the same error and got it solved by changing in the configuration file. My tgt service was promting to be an unknown job, but iscsi service was running. So I changed the line iscsi_helper=iscsiadm instead of tgtadm. Try by changing in every configuration file wherever it is specified.

edit flag offensive delete link more
0

answered 2013-08-06 19:32:56 -0600

featloaf gravatar image

updated 2013-08-06 19:54:33 -0600

In /etc/cinder/cinder.conf, add:

[DEFAULT]
...
state_path = /var/lib/cinder

For reference, I am using tgt for the iSCSI service, with the following config files:

/etc/tgt/targets.conf:

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


/etc/tgt/conf.d/cinder_tgt.conf:

include /var/lib/cinder/volumes/*
edit flag offensive delete link more
-1

answered 2013-06-17 20:59:27 -0600

I'm having the same issue. Were you able to get it resolved?

edit flag offensive delete link more
-1

answered 2013-09-30 06:49:59 -0600

sngirame gravatar image

I have followed the steps mentioned above however I am still facing an error ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-5cc533d8-b7ca-4247-91e1-8351e14f2140. while creating a volume.

Any help?

edit flag offensive delete link more

Comments

I was able to resolve the issue using following configurations cat /etc/tgt/targets.conf include /etc/tgt/conf.d/cinder_tgt.conf root@Controller:~# cat /etc/tgt/conf.d/cinder_tgt.conf include /var/lib/cinder/volumes/* Restarted all cinder services and also restarted tgtd

sngirame gravatar imagesngirame ( 2013-10-01 01:48:10 -0600 )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

3 followers

Stats

Asked: 2013-05-30 10:41:31 -0600

Seen: 5,263 times

Last updated: Sep 30 '13