rm old volume create scripts and update conf parameters

Change-Id: If60f238143db710da4929460c308878791dc4231
This commit is contained in:
SamSu 2014-03-11 16:11:20 -07:00
parent 32ec3a1a05
commit c8df6f9c96
5 changed files with 7 additions and 54 deletions

View File

@ -99,7 +99,7 @@ case node["openstack"]["block-storage"]["volume"]["driver"]
when "cinder.volume.drivers.lvm.LVMISCSIDriver"
package "bc" do
action :install
action :upgrade
end
openstack_block_storage_volume node["openstack"]["volume"]["disk"] do
@ -109,24 +109,6 @@ case node["openstack"]["block-storage"]["volume"]["driver"]
openstack_block_storage_volume node["openstack"]["volume"]["disk"] do
action :mk_cinder_vol
end
# template "/tmp/cinder_volumes.sh" do
# source "cinder_volumes.sh.erb"
# owner "root"
# group "root"
# mode 00755
# variables(
# :volumesize => node["openstack"]["volume"]["size"]
# )
# notifies :run, "execute[create_cinder_volumes]", :immediately
# only_if { node["openstack"]["volume"]["mode"] == "loopfile" }
# end
# execute "create_cinder_volumes" do
# command "sh /tmp/cinder_volumes.sh"
# action :run
# only_if { node["openstack"]["volume"]["mode"] == "loopfile" }
# end
end
service "cinder-volume" do

View File

@ -1,30 +0,0 @@
#!/bin/bash
# This file is going to create a loop file as volume disk.
#
ERRTRAP()
{
echo "[FILE: "$PWD/$(basename "$(test -L "$0" && readlink "$0" || echo "$0")")", LINE: $1] Error: Command or function exited with status $?"
}
trap 'ERRTRAP $LINENO' ERR
vgdisplay |grep cinder-volumes
if [ $? -ne 0 ]; then
SPACESIZE=$(df -P |grep -vE "^tmpfs|cdrom|tmp" | sed '1d' | awk '{print $4}' | sort -nr | sed -n -e '1{p;q}')
MOUNTPOINT=$(df -P |grep -vE "^tmpfs|cdrom|tmp" | sed '1d' | awk '{print $6}' | sort -nr | sed -n -e '1{p;q}')
G_SPACESIZE=$(echo "$SPACESIZE/1000/1000/2" | bc -l)
echo $G_SPACESIZE
VOLSIZE=${G_SPACESIZE/.*}
echo $VOLSIZE
if [ $VOLSIZE -ge "1" ]; then
dd if=/dev/zero of=$MOUNTPOINT/cinder-volumes bs=1 count=0 seek="$VOLSIZE"G
losetup /dev/loop0 $MOUNTPOINT/cinder-volumes
pvcreate /dev/loop0
vgcreate cinder-volumes /dev/loop0
else
echo "The current spare disk space only $SPACESIZE < 1G, no enough disk space is available for the cinder-volume"
exit 0
fi
fi

View File

@ -17,7 +17,7 @@ lock_path=/var/lock/nova
##### RABBITMQ #####
rabbit_userid=<%= node['openstack']['mq']['user'] %>
rabbit_password=<%= node['openstack']['mq']['password'] %>
rabbit_virtual_host=<%= node["openstack"]["compute"]["rabbit"]["vhost"] %>
# rabbit_virtual_host=<%= node["openstack"]["compute"]["rabbit"]["vhost"] %>
<% if node["openstack"]["compute"]["rabbit"]["ha"] -%>
rabbit_hosts=<%= @rabbit_hosts %>
rabbit_ha_queues=True

View File

@ -18,10 +18,12 @@ reconnect_interval = 2
# Minimum number of SQL connections to keep open in a pool
# sql_min_pool_size = 1
# Maximum number of SQL connections to keep open in a pool
sql_max_pool_size = 30
sql_max_pool_size = 100
# Timeout in seconds before idle sql connections are reaped
# sql_idle_timeout = 3600
sqlalchemy_pool_size = 100
[OVS]
# (StrOpt) Type of network to allocate for tenant networks. The
# default value 'local' is useful only for single-box testing and

View File

@ -329,6 +329,5 @@ signing_dir = <%= node["openstack"]["network"]["api"]["agent"]["signing_dir"] %>
# =========== end of items for agent management extension =====
[database]
sql_max_pool_size=30
#sqlalchemy_pool_size = 30
#sql_max_pool_size=100
#sqlalchemy_pool_size = 100