Merge "Updates cinder-group-active script to work on Ubuntu"
This commit is contained in:
@@ -113,6 +113,7 @@ when 'cinder.volume.drivers.lvm.LVMISCSIDriver'
|
|||||||
source 'cinder-group-active.erb'
|
source 'cinder-group-active.erb'
|
||||||
mode '755'
|
mode '755'
|
||||||
variables(
|
variables(
|
||||||
|
volume_name: vg_name,
|
||||||
volume_file: vg_file
|
volume_file: vg_file
|
||||||
)
|
)
|
||||||
notifies :start, 'service[cinder-group-active]', :immediately
|
notifies :start, 'service[cinder-group-active]', :immediately
|
||||||
|
|||||||
@@ -13,14 +13,23 @@
|
|||||||
# Short-Description: cinder volume group active script
|
# Short-Description: cinder volume group active script
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
<% if platform?(%w{centos redhat amazon scientific}) %>
|
||||||
. /etc/rc.d/init.d/functions
|
. /etc/rc.d/init.d/functions
|
||||||
|
<% end %>
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
echo -n "Activing cinder volume group ..."
|
vgs <%= @volume_name %> > /dev/null 2>&1
|
||||||
vgcreate cinder-volumes $(losetup --show -f <%= @volume_file %>)
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -n "Activating cinder volume group ..."
|
||||||
|
vgcreate <%= @volume_name %> $(losetup --show -f <%= @volume_file %>)
|
||||||
|
<% if platform?(%w{centos redhat amazon scientific}) %>
|
||||||
success
|
success
|
||||||
echo
|
echo
|
||||||
|
<% elsif platform?(%w{debian ubuntu}) %>
|
||||||
|
echo "SUCCESS"
|
||||||
|
<% end %>
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|||||||
Reference in New Issue
Block a user