Ask Your Question
0

Cinder Error Message

asked 2013-08-13 19:57:48 -0500

Mathias Ewald gravatar image

Hi, I am just getting started with OpenStack trying to install all the components on different virtual machines just in order not so screw up 5 services at once ;) I think I set up mysql, rabbitmq, keystone and glance (without switf) successfully and am now working on cinder.

Staring the cinder-volume service, I get the following error message:

root@cinder:~# cat /var/log/cinder/cinder-volume.log
2013-08-13 09:33:13     INFO [cinder.service] Starting 1 workers
2013-08-13 09:33:13     INFO [cinder.service] Started child 4020
2013-08-13 09:33:13    AUDIT [cinder.service] Starting cinder-volume node (version 2013.1.2)
2013-08-13 09:33:13    ERROR [cinder.service] Unhandled exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 227, in _start_child
    self._child_process(wrap.server)
  File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 204, in _child_process
    launcher.run_server(server)
  File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 95, in run_server
    server.start()
  File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 355, in start
    self.manager.init_host()
  File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 143, in init_host
    self.driver.check_for_setup_error()
  File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 76, in check_for_setup_error
    run_as_root=True)
  File "/usr/lib/python2.7/dist-packages/cinder/utils.py", line 174, in execute
    shell=shell)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/subprocess.py", line 25, in __init__
    subprocess_orig.Popen.__init__(self, args, 0, *argss, **kwds)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
2013-08-13 09:33:13     INFO [cinder.service] Child 4020 exited with status 2
2013-08-13 09:33:13     INFO [cinder.service] _wait_child 1
2013-08-13 09:33:13     INFO [cinder.service] wait wrap.failed True
root@cinder:~#

I set up the LVM2 volume group:

root@cinder:~# pvscan
  PV /dev/sdb   VG cinder-volumes   lvm2 [100.00 GiB / 100.00 GiB free]
  Total: 1 [100.00 GiB] / in use: 1 [100.00 GiB] / in no VG: 0 [0   ]
root@cinder:~# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "cinder-volumes" using metadata type lvm2
root@cinder:~#

configured the filter

root@cinder:~# cat /etc/lvm/lvm.conf
...
    filter = [ "a/sdb/" ]
...
root@cinder:~#

and configured cinder like this:

root@cinder:~# cat /etc/cinder/cinder.conf                                                                                                                                
[DEFAULT]                                                                                                                                                                 
scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler                                                                                                        
rootwrap_config = /etc/cinder/rootwrap.conf                                                                                                                               
sql_connection = mysql://cinder:password@10.10.10.3/cinder                                                                                                                
api_paste_confg = /etc/cinder/api-paste.ini                                                                                                                               

iscsi_helper = tgtadm                                                                                                                                                     
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver                                                                                                                    
volume_name_template = volume-%s                                                                                                                                          
volume_group = cinder-volumes                                                                                                                                             

verbose = True                                                                                                                                                            
auth_strategy = keystone                                                                                                                                                  

logdir = /var/log/cinder                                                                                                                                                  
state_path=/var/lib/cinder                                                                                                                                                
lock_path=/var/lock/cinder                                                                                                                                                
volumes_dir = /var/lib/cinder/volumes                                                                                                                                     

rabbit_host = 10.10.10.5                                                                                                                                                  
rabbit_port = 5672                                                                                                                                                        
rabbit_use_ssl = false                                                                                                                                                    
rabbit_userid = guest                                                                                                                                                     
rabbit_password = *****                                                                                                                                                
rabbit_virtual_host = /

Cinder-scheduler starts successfully:

2013-08-13 21:22:50    AUDIT [cinder.service] SIGTERM received
2013-08-13 21:22:50    AUDIT [cinder.service] Starting cinder-scheduler node ...
(more)
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2013-08-14 00:52:13 -0500

Mathias Ewald gravatar image

updated 2013-08-14 23:48:19 -0500

Hi, yes I did - if I didn't I could have created the volume group, could I?

root@cinder:~# apt-get install lvm2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
lvm2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@cinder:~# vgs
  VG             #PV #LV #SN Attr   VSize   VFree  
  cinder-volumes   1   0   0 wz--n- 100.00g 100.00g
root@cinder:~#

cheers Mathias

EDIT: Hi, I just found a possible reason for this:

/etc/init.d/cinder-volume start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder ...

The init scripts starts cinder-volume with the privileges of the cinder user account. Problem is, that the cinder user's $PATH does not include the location of the vgs command:

root@cinder:~# which vgs /sbin/vgs root@cinder:~# su - cinder cinder@cinder:~$ vgs -su: vgs: command not found cinder@cinder:~$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games cinder@cinder:~$

So it seems like

out, err = self._execute('vgs', '--noheadings', '-o', 'name', run_as_root=True)

in line 76 of /usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py does not work properly (run_as_root).

So I added /sbin/ to the PATH for every user in /etc/profile but now the output looks like this:

cinder@cinder:~$ vgs --noheading -o name WARNING: Running as a non-root user. Functionality may be unavailable. cinder-volumes cinder@cinder:~$

I believe the script can probably not parse the output with this WARNING message still there. I tried setting SUID for /sbin/vgs but without luck.

Any ideas?

edit flag offensive delete link more

Comments

I just ran through the Cinder installation as documented on http://docs.openstack.org/grizzly/basic-install/apt/content/basic-install_controller.html#basic-install_controller-cinder from scratch again and get the same error. The OS I am using is debian wheezy.

Mathias Ewald gravatar imageMathias Ewald ( 2013-08-14 21:31:52 -0500 )edit
0

answered 2013-08-14 00:43:53 -0500

fifieldt gravatar image

updated 2013-08-14 00:44:43 -0500

So I think what it's trying to do there is run the 'vgs' command. I'd expect the error you're getting if the package that provides that isn't installed.

78        out, err = self._execute('vgs', '--noheadings', '-o', 'name',
79                                run_as_root=True)

Did you sudo apt-get install lvm2 on your cinder-volume node?

edit flag offensive delete link more

Comments

root@cinder:~# vgs --noheadings -o name cinder-volumes root@cinder:~#

Mathias Ewald gravatar imageMathias Ewald ( 2013-08-14 02:23:52 -0500 )edit
0

answered 2013-08-14 01:07:50 -0500

unmesh-gurjar gravatar image

I guess it is failing in retrieving the information about volume groups on the Cinder volume server! Just to confirm, please try executing the command 'vgs --noheadings -o name' as root user (would err out 'command not found'). You need to install LVM packages to get rid of this issue.

edit flag offensive delete link more

Comments

root@cinder:~# vgs --noheadings -o name cinder-volumes root@cinder:~#

Mathias Ewald gravatar imageMathias Ewald ( 2013-08-14 02:23:25 -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

1 follower

Stats

Asked: 2013-08-13 19:57:48 -0500

Seen: 1,714 times

Last updated: Aug 14 '13