Testing compass-ci

and fixing it...

Change-Id: I97400827d35db3c9a1f00a266d89373015633e88
This commit is contained in:
Xicheng Chang 2016-02-25 11:03:09 -08:00
parent 59eee063a9
commit 94457e68dc
4 changed files with 22 additions and 9 deletions

View File

@ -25,10 +25,11 @@ sudo cp -rn /var/ansible/* /root/backup/ansible/
for i in `ls $ADAPTERS_HOME/ansible/ | grep "openstack_"`; do
mkdir -p /var/ansible/$i
cp -rf $ADAPTERS_HOME/ansible/openstack/* /var/ansible/$i
# cp -rf $ADAPTERS_HOME/ansible/openstack/* /var/ansible/$i
cp -rf $ADAPTERS_HOME/ansible/$i /var/ansible/
done
cp -rf $ADAPTERS_HOME/ansible/roles /var/ansible/
rm -rf /opt/openstack-ansible-modules
git clone $OPENSTACK_ANSIBLE_MODULE /opt/`basename $OPENSTACK_ANSIBLE_MODULE | sed 's/\.git//g'`

View File

@ -24,9 +24,15 @@ export SUPPORT_CENTOS_7_2=${SUPPORT_CENTOS_7_2:-"y"}
export SUPPORT_UBUNTU_14_04_03=${SUPPORT_UBUNTU_14_04_03:-"y"}
# DHCP config
export IPADDR=`ifconfig $NIC | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
# export IPADDR=`ip addr show $NIC | grep "inet " | sed 's/^[ \t]*//g' | cut -d' ' -f 2 | cut -d'/' -f 1`
export NETMASK=$(ifconfig $NIC |grep Mask | cut -f 4 -d ':')
export IPADDR=$(ifconfig $NIC | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
if [ -z "$IPADDR" ]; then
export IPADDR=$(ifconfig $NIC | grep 'inet ' | sed 's/^[ \t]*//g' | sed 's/[ \t]\+/ /g' | cut -d' ' -f2)
fi
# export IPADDR=`ip addr show $NIC | grep "inet " | sed 's/^[ \t]*//g' | sed 's/[ \t]\+/ /g' | cut -d' ' -f 2 | cut -d'/' -f 1`
export NETMASK=$(ifconfig $NIC | grep Mask | cut -f 4 -d ':')
if [ -z "$NETMASK" ]; then
export NETMASK=$(ifconfig $NIC | grep netmask | sed 's/^[ \t]*//g' | sed 's/[ \t]\+/ /g' | cut -d' ' -f4)
fi
# export NETMASK=$(ipcalc `ip addr show $NIC | grep "inet " | sed 's/^[ \t]*//g' | cut -d' ' -f 2` -m | grep NETMASK | cut -d '=' -f 2)
# DHCP option router address(Default is your management interface IP address )"
# export OPTION_ROUTER=`ifconfig $NIC | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`

View File

@ -178,7 +178,10 @@ if [ $? -ne 0 ]; then
fi
export ipaddr=$(ifconfig $NIC | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
# export ipaddr=$(ifconfig $NIC | grep 'inet ' | cut -d' ' -f10)
echo " this line "
if [ -z "$ipaddr" ]; then
export ipaddr=$(ifconfig $NIC | grep 'inet ' | sed 's/^[ \t]*//g' | sed 's/[ \t]\+/ /g' | cut -d' ' -f2)
fi
loadvars IPADDR ${ipaddr}
ipcalc $IPADDR -c
if [ $? -ne 0 ]; then
@ -186,6 +189,9 @@ if [ $? -ne 0 ]; then
exit 1
fi
export netmask=$(ifconfig $NIC | grep Mask | cut -d: -f4)
if [ -z "$netmask" ]; then
export netmask=$(ifconfig $NIC | grep netmask | sed 's/^[ \t]*//g' | sed 's/[ \t]\+/ /g' | cut -d' ' -f4)
fi
loadvars NETMASK ${netmask}
export netaddr=$(ipcalc $IPADDR $NETMASK -n |cut -f 2 -d '=')
export netprefix=$(ipcalc $IPADDR $NETMASK -p |cut -f 2 -d '=')

View File

@ -16,7 +16,7 @@ ifconfig eth1 up
killall dnsmasq
source compass-core/install/install.conf.template
/bin/bash -x compass-core/install/install.sh || exit $?
echo "cache_peer 10.145.81.137 parent 3128 3130 default" >> /etc/squid/squid.conf
service squid restart
service squid status |grep running || exit $?
sleep 5
# echo "cache_peer 10.145.81.137 parent 3128 3130 default" >> /etc/squid/squid.conf
# service squid restart
# service squid status |grep running || exit $?
# sleep 5