Problems with cinder-volume installation

Asked by Mohan

Hi All,

I am facing problems while installing cinder-volume. Will be grateful for any help in solving the same.

I am trying to install cinder-volume on a separate machine. I also have compute node installed on this machine.

I have the cinder-api, cinder-scheduler on the controller with other services. I also have issues with the connection from the controller with the cinder-volume, for which i have raised a question. (https://answers.launchpad.net/cinder/+question/229938)

This is regarding the cinder-volume installation. I list down the steps that i have done, and the error message that i get. Please let me know how to solve this problem

Controller ip address: 10.0.0.11 and cinder-volume ip address 10.0.0.15

1. Installed cinder-volume iscsitarget iscsitarget-dkms
2. Configure the iscsi services

Edited /etc/cinder/cinder.conf.
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
sql_connection = mysql://cinderUser:cinderPass@10.0.0.11/cinder
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
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
iscsi_helper=tgtadm
api_paste_confg = /etc/cinder/api-paste.ini

rabbit_host=10.0.0.11
rabbit_password=guest
rabbit_port=5672
rabbit_userid=guest
rabbit_virtual_host=/

Edited /etc/cinder/api-paste.ini
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
service_protocol = http
service_host = 10.0.0.11
service_port = 5000
auth_host = 10.0.0.11
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = service_pass
signing_dir = /var/lib/cinder

I restart
cd /etc/init.d/; for i in $( ls cinder-* ); do sudo service $i restart; done

VG display output:
$vgdisplay
  --- Volume group ---
  VG Name cinder-volumes
  System ID
  Format lvm2
  Metadata Areas 1
  Metadata Sequence No 1
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 0
  Open LV 0
  Max PV 0
  Cur PV 1
  Act PV 1
  VG Size 1.82 TiB
  PE Size 4.00 MiB
  Total PE 476671
  Alloc PE / Size 0 / 0
  Free PE / Size 476671 / 1.82 TiB
  VG UUID A0LGS0-4DP6-GF63-rpaH-V188-hTVH-Say2bI

When i check the state of cinder-volume, i get the below message.
$cd /etc/init.d/; for i in $( ls cinder-* ); do sudo service $i status; done
-> cinder-volume stop/waiting

Is this okay?

In /var/log/cinder/cinder-volume.log, i see the below error message

2013-06-09 13:24:13 10039 CRITICAL cinder [-] No module named drivers.lvm
2013-06-09 13:24:13 10039 TRACE cinder Traceback (most recent call last):
2013-06-09 13:24:13 10039 TRACE cinder File "/usr/bin/cinder-volume", line 46, in <module>
2013-06-09 13:24:13 10039 TRACE cinder server = service.Service.create(binary='cinder-volume')
2013-06-09 13:24:13 10039 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 251, in create
2013-06-09 13:24:13 10039 TRACE cinder periodic_fuzzy_delay=periodic_fuzzy_delay)
2013-06-09 13:24:13 10039 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 147, in __init__
2013-06-09 13:24:13 10039 TRACE cinder self.manager = manager_class(host=self.host, *args, **kwargs)
2013-06-09 13:24:13 10039 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 81, in __init__
2013-06-09 13:24:13 10039 TRACE cinder self.driver = importutils.import_object(volume_driver)
2013-06-09 13:24:13 10039 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/importutils.py", line 40, in import_object
2013-06-09 13:24:13 10039 TRACE cinder return import_class(import_str)(*args, **kwargs)
2013-06-09 13:24:13 10039 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/importutils.py", line 30, in import_class
2013-06-09 13:24:13 10039 TRACE cinder __import__(mod_str)
2013-06-09 13:24:13 10039 TRACE cinder ImportError: No module named drivers.lvm

Can someone please let me know the reason for this error and the solution for the same.

Regards
Mohan

Question information

Language:
English Edit question
Status:
Solved
For:
Cinder Edit question
Assignee:
No assignee Edit question
Solved by:
Patrick Vinas
Solved:
Last query:
Last reply:
Revision history for this message
Mohan (v-mohan) said :
#1

After going through other q&a pages, i have made the following changes:

Edited api-paste.ini
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_host = 10.0.0.15

earlier, the values were keystoneclient.middleware.auth_token:filter_factory and 10.0.0.11(this is the ip address of the controller, auth_host still refers to the same ip address. 10.0.0.15 is the cinder-volume ip address)

when i restart and check the status of the cinder-* services, i get the below message

root@compute-2:/etc/cinder# cd /etc/init.d/; for i in $( ls cinder-* ); do sudo service $i restart; done
stop: Unknown instance:
cinder-volume start/running, process 21961
root@compute-2:/etc/init.d# cd /etc/init.d/; for i in $( ls cinder-* ); do sudo service $i status; done
cinder-volume stop/waiting
root@compute-2:/etc/init.d# cd /etc/init.d/; for i in $( ls cinder-* ); do sudo service $i restart; done
stop: Unknown instance:
cinder-volume start/running, process 21983

And the cinder-volume.log shows the same error message.

Please help
Regards
Mohan

Revision history for this message
Best Patrick Vinas (patrickvinas) said :
#2

A few things to check:
1) 2013-06-09 13:24:13 10039 TRACE cinder ImportError: No module named drivers.lvm is complaining about this line in your cinder.conf: volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver. I'd comment out that line, since the install doc doesn't mention it for a basic iSCSI on LVM install (only for more esoteric hardware)

2) Your cinder.conf includes the line
iscsi_helper=tgtadm
but you specify that you have installed iscsitarget and iscsitarget-dkms. tgtadm is, I believe, provided by the tgt package, not the iscsitarget package. You should either remove iscsitarget and iscsitarget-dkms and install tgt, or change the iscsi_helper to the relevant executable from iscsitarget (which, IIRC, is ietadm). My preference is for open-iscsi on the controller node and tgt on the cinder node, but it's really up to you which you choose.

3) service_host should be wherever the cinder api is installed, as that is where the cinder service will be listening. In the case of my installation, the controller node is running the cinder service, so on my compute/cinder node I have configured service_host = <ip of compute node>.

Revision history for this message
Mohan (v-mohan) said :
#3

Hi Patrick,

Thank you for the pointers. Appreciate your response.

I have done the above 3 points that you have mentioned along with the following.
1. cinder-api/cinder scheduler packages were installed on the controller, now i install it on the same machine as the cinder-volume.
2. I do not use iscsitarget and open-iscsi. I just use tgt. Initially i could start iscsitarget service, but later on i faced problems.

All 3 services run on the cinder node.

Now i am able to create volumes from the controller and attach them to the active nova instance

Cheers
Mohan

Revision history for this message
Mohan (v-mohan) said :
#4

Thanks Patrick Vinas, that solved my question.