From Fedora Project Wiki

No edit summary
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description=Setup required for the OpenStack Volumes.
|description=Setup required for the OpenStack Volumes.
In the Folsom release of OpenStack, the nova-volume service
was deprecated by the split out cinder service.


|actions=
|actions=
In the Folsom release of OpenStack, the nova-volume service
was deprecated by the split out cinder service.


To create the cinder-volumes Volume Group for the openstack-cinder-volume service
To create the cinder-volumes Volume Group for the openstack-cinder-volume service
Line 11: Line 10:
  sudo truncate -s20G /var/lib/cinder/cinder-volumes.img
  sudo truncate -s20G /var/lib/cinder/cinder-volumes.img
  sudo vgcreate cinder-volumes $(sudo losetup --show -f /var/lib/cinder/cinder-volumes.img)
  sudo vgcreate cinder-volumes $(sudo losetup --show -f /var/lib/cinder/cinder-volumes.img)


Because the volume service is dependent on the volume group being available,
Because the volume service is dependent on the volume group being available,
it's not started by default, so to do that:
it's not started by default, so to do that:


  sudo service openstack-cinder-volume start
  sudo systemctl start openstack-cinder-volume.service
 
== Actions after each reboot ==
 
The above commands are not persistent across reboots,
so please rerun these commands after reboot:
 
sudo losetup -f /var/lib/cinder/cinder-volumes.img
sudo systemctl start openstack-cinder-volume.service


<span style="color:red;">Note!</span> None of the above commands are persistent across reboots,
If you intend to make them persist automatically, then enable the service to start in the standard manner,
so please rerun them after reboot, or configure them to run automatically on reboot.
but ensure that the losetup is run early in the boot process, or instead, use an implicitly persistent
block device/partition.


Also note that in Folsom, the iSCSI target configuration files are dropped into /var/lib/nova/volumes, so we need to ensure that these are picked up by the tgt daemon.
== Integration with tgtd ==


Prepend that directory to the tgt target configuration file:
In RHEL based systems the config files in /etc/tgt/conf.d/ don't honor globbing.
Only the main /etc/tgt/targets.conf seems does.
So to avoid that issue causing tgtd to not start:


  sudo sed -i '1iinclude /var/lib/nova/volumes/*' /etc/tgt/targets.conf
  sudo sed -i '1iinclude /etc/nova/volumes/*' /etc/tgt/targets.conf
sudo sed -i '1iinclude /etc/cinder/volumes/*' /etc/tgt/targets.conf


then restart tgtd:
then restart tgtd:
Line 31: Line 43:


|results=
|results=
Check the volume group is listed by this command
sudo vgs
Check that no errors are reported in /var/log/cinder/* or by this command:
Check that no errors are reported in /var/log/cinder/* or by this command:
  sudo service openstack-cinder-volume status
  sudo systemctl status openstack-cinder-volume.service
}}
}}


[[Category:OpenStack Test Cases]]
[[Category:OpenStack Test Cases]]

Latest revision as of 14:22, 19 November 2012

Description

Setup required for the OpenStack Volumes. In the Folsom release of OpenStack, the nova-volume service was deprecated by the split out cinder service.


How to test

To create the cinder-volumes Volume Group for the openstack-cinder-volume service

sudo truncate -s20G /var/lib/cinder/cinder-volumes.img
sudo vgcreate cinder-volumes $(sudo losetup --show -f /var/lib/cinder/cinder-volumes.img)


Because the volume service is dependent on the volume group being available, it's not started by default, so to do that:

sudo systemctl start openstack-cinder-volume.service

Actions after each reboot

The above commands are not persistent across reboots, so please rerun these commands after reboot:

sudo losetup -f /var/lib/cinder/cinder-volumes.img
sudo systemctl start openstack-cinder-volume.service

If you intend to make them persist automatically, then enable the service to start in the standard manner, but ensure that the losetup is run early in the boot process, or instead, use an implicitly persistent block device/partition.

Integration with tgtd

In RHEL based systems the config files in /etc/tgt/conf.d/ don't honor globbing. Only the main /etc/tgt/targets.conf seems does. So to avoid that issue causing tgtd to not start:

sudo sed -i '1iinclude /etc/nova/volumes/*' /etc/tgt/targets.conf
sudo sed -i '1iinclude /etc/cinder/volumes/*' /etc/tgt/targets.conf

then restart tgtd:

sudo service tgtd restart

Expected Results

Check the volume group is listed by this command

sudo vgs

Check that no errors are reported in /var/log/cinder/* or by this command:

sudo systemctl status openstack-cinder-volume.service