LVM with another driver

asked 2014-08-12 01:22:01 -0600

San thosh gravatar image

updated 2014-08-12 01:39:02 -0600

Anand TS gravatar image

I set up block service (Cinder) on Ubuntu machine by following the OpenStack guide for it ( http://docs.openstack.org/icehouse/in... ). As part of cinder-volume package installation, it asked to install lvm and set up an additional disk for its use.

apt-get install lvm2

pvcreate /dev/sdb

vgcreate cinder-volumes /dev/sdb

apt-get install cinder-volume

.

And then I installed another driver which went through fine. Cinder.conf file is populated correctly with volume backend name, enabled_backends, etc. I created a volume type and linked it to this driver via volume_backend_name. When I run volume create command by specifying volume_type id, cinder-api and cinder-volume logs shows that the volume has been created successfully and volume status is available. But cinder-scheduler log shows that ''the volume service is down or disabled. (host: HOSTNAME)''. Also there are no log lines in cinder-volume log indicating that it is contacting the backend array to create the volume and the volume is not created on the array as suspected.

cinder service-list
+------------------+-----------------------------------------------------------------+------+---------+-------+------------------------+
|      Binary      |                        Host                              | Zone |  Status | State |         Updated_at         |
+------------------+-----------------------------------------------------------------+------+---------+-------+------------------------+

| cinder-scheduler |                HOSTNAME                     | nova | enabled |   up  | 2014-08-07T07:17:06.000000 |

|  cinder-volume   |                HOSTNAME                     | nova | enabled |  down | 2014-08-07T06:54:47.000000 |

|  cinder-volume   |                HOSTNAME@my_driver    | nova | enabled |   up  | 2014-08-07T07:17:01.000000 |

From above command, I observed that service is down. But I don’t understand why it is picking that cinder-volume service instead of selecting the driver one's. I manually disabled it so that scheduler might pick the second one.

cinder service-list
+------------------+-----------------------------------------------------------------+------+---------+-------+------------------------+
|      Binary      |                        Host                              | Zone |  Status | State |         Updated_at         |
+------------------+-----------------------------------------------------------------+------+---------+-------+------------------------+

| cinder-scheduler |                HOSTNAME                     | nova | enabled |   up  | 2014-08-07T07:17:06.000000 |

|  cinder-volume   |                HOSTNAME                     | nova | disabled |  down | 2014-08-07T06:54:47.000000 |

|  cinder-volume   |                HOSTNAME@my_driver    | nova | enabled |   up  | 2014-08-07T07:17:01.000000 |

But this time, I don’t see any error at all in scheduler log and the volume status is available. It does not look like it is using my driver to create volume even though I have specified the correct volume_type id. So, it is not selecting the proper volume service.

My question is :

Do we actually see two cinder-volume services in this case ?

Why cinder-scheduler is not picking the correct one even when specified with volume_type id.?

Please help me resolve this!

.

cinder.conf file :

[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
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = cinder.openstack.common.rpc.impl_kombu
rabbit_host = controller
rabbit_port = 5672
rabbit_userid = guest
rabbit_password = password

enabled_backends = my_driver


[database]

connection = mysql://cinder:CINDER_DBPASS@controller/cinder


[keystone_authtoken]

auth_uri = http://controller:5000
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = password


[my_driver]

volume_driver = cinder.volume.drivers.my_driver
volume_backend_name = VOLUME_BACKEND_NAME
OTHER CONNECTION INFO NEEDED BY DRIVER
edit retag flag offensive close merge delete