The cinder volume is not successfully created in the newly installed Devstack environment, and the volume status created is error:
See the failed log in Cinder Scheduler:
2015-10-15 14:12:22.057 ERROR Cinder.scheduler.flows.create_volume [req-14f77cef-6ee9-463c-b9ce-2ffd40b4076b BA152F9F637C4BC2810F35CF3D3696DD 0d777ab85d9949c6ab961c6a883f3f40] Failed to run task Cinder.scheduler.flows.create_ Volume. Schedulecreatevolumetask;volume:create:no valid host was found. No weighed hosts available
Why not cinder host?
See the error in the Cinder volume service:
2015-10-15 14:02:37.786 ERROR Cinder.volume.manager [req-bccbf6c1-26c7-4503-88aa-090c1fc6501d None None] Failed to Initialize driver.
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager Traceback (most recent call last):
2015-10-15 14:02:37.786 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/manager.py", line 322, in INI T_host
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager self.driver.check_for_setup_error ()
2015-10-15 14:02:37.786 TRACE cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/osprofiler/ profiler.py ", line, in wrapper
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager return F (*args, **kwargs)
2015-10-15 14:02:37.786 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/lvm.py", line 268, In Check_for_setup_error
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager lvm_conf=lvm_conf_file)
2015-10-15 14:02:37.786 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/brick/local_dev/lvm.py", line 86, In __init__
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager if Self._vg_exists () is False:
2015-10-15 14:02:37.786 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/brick/local_dev/lvm.py", line 123, In _vg_exists
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager run_as_root=true)
2015-10-15 14:02:37.786 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/utils.py", line 155, in Execute
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager return Processutils.execute (*cmd, **kwargs)
2015-10-15 14:02:37.786 TRACE cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/ processutils.py ", line 275, in Execute
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager cmd=sanitized_cmd)
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager processexecutionerror:unexpected Error while running command.
2015-10-15 14:02:37.786 TRACE cinder.volume.manager command:sudo cinder-rootwrap/etc/cinder/rootwrap.conf env lc_all= C VGS--noheadings-o name stack-volumes-lvmdriver-1
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager Exit code:5
2015-10-15 14:02:37.786 TRACE Cinder.volume.manager stdout:u "
2015-10-15 14:02:37.786 TRACE cinder.volume.manager stderr:u ' volume group ' stack-volumes-lvmdriver-1 ' not found
Originally the VG was not created in the Devstack installation, and then manually created VG:
See the default VG creation process in the Devstack script
Lib/lvm
function _create_lvm_volume_group
$ truncate-s 15G Vg_file
[Email protected]:/opt/stack/data/cinder$ sudo losetup-f--show vg_file
/dev/loop0
[Email protected]:/opt/stack/data/cinder$ sudo vgcreate stack-volumes-lvmdriver-1/dev/loop0
No Physical Volume label Read from/dev/loop0
Physical volume "/dev/loop0" successfully created
Volume Group "Stack-volumes-lvmdriver-1" successfully created
Restart the Cinder-volume to create it.
Cannot create cinder volume in devstack environment