Revision history [back]

click to hide/show revision 1
initial version

Cinder: Volume Creation Error - iscsi

I followed official gizzy installation guide. link: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 = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
debug=True

auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes

sql_connection = mysql://cinder:pass@localhost/cinder
rabbit_password =pass

cat /etc/cinder/api-paste.ini

#############
# OpenStack #
#############

[composite:osapi_volume]
use = call:cinder.api:root_app_factory
/: apiversions
/v1: openstack_volume_api_v1
/v2: openstack_volume_api_v2

[composite:openstack_volume_api_v1]
use = call:cinder.api.middleware.auth:pipeline_factory
noauth = faultwrap sizelimit noauth apiv1
keystone = faultwrap sizelimit authtoken keystonecontext apiv1
keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv1

[composite:openstack_volume_api_v2]
use = call:cinder.api.middleware.auth:pipeline_factory
noauth = faultwrap sizelimit noauth apiv2
keystone = faultwrap sizelimit authtoken keystonecontext apiv2
keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv2

[filter:faultwrap]
paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory

[filter:noauth]
paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory

[filter:sizelimit]
paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory

[app:apiv1]
paste.app_factory = cinder.api.v1.router:APIRouter.factory

[app:apiv2]
paste.app_factory = cinder.api.v2.router:APIRouter.factory

[pipeline:apiversions]
pipeline = faultwrap osvolumeversionapp

[app:osvolumeversionapp]
paste.app_factory = cinder.api.versions:Versions.factory

##########
# Shared #
##########

[filter:keystonecontext]
paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
service_protocol = http
service_host = localhost
service_port = 5000
auth_host = localhost
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = pass
signing_dir = /var/lib/cinder

Cinder: Volume Creation Error - iscsi

I followed official gizzy installation guide. link: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 = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
debug=True

auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes

sql_connection = mysql://cinder:pass@localhost/cinder
rabbit_password =pass

cat /etc/cinder/api-paste.ini

#############
# OpenStack #
#############

[composite:osapi_volume]
use = call:cinder.api:root_app_factory
/: apiversions
/v1: openstack_volume_api_v1
/v2: openstack_volume_api_v2

[composite:openstack_volume_api_v1]
use = call:cinder.api.middleware.auth:pipeline_factory
noauth = faultwrap sizelimit noauth apiv1
keystone = faultwrap sizelimit authtoken keystonecontext apiv1
keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv1

[composite:openstack_volume_api_v2]
use = call:cinder.api.middleware.auth:pipeline_factory
noauth = faultwrap sizelimit noauth apiv2
keystone = faultwrap sizelimit authtoken keystonecontext apiv2
keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv2

[filter:faultwrap]
paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory

[filter:noauth]
paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory

[filter:sizelimit]
paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory

[app:apiv1]
paste.app_factory = cinder.api.v1.router:APIRouter.factory

[app:apiv2]
paste.app_factory = cinder.api.v2.router:APIRouter.factory

[pipeline:apiversions]
pipeline = faultwrap osvolumeversionapp

[app:osvolumeversionapp]
paste.app_factory = cinder.api.versions:Versions.factory

##########
# Shared #
##########

[filter:keystonecontext]
paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
service_protocol = http
service_host = localhost
service_port = 5000
auth_host = localhost
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = pass
signing_dir = /var/lib/cinder