bugfix for jumpserver on ubuntu 14.04.3 23/7423/5
authorcarey.xu <carey.xuhan@huawei.com>
Wed, 20 Jan 2016 10:00:46 +0000 (18:00 +0800)
committerJustin chi <chigang@huawei.com>
Thu, 21 Jan 2016 13:04:06 +0000 (13:04 +0000)
Change-Id: I59a41ca1ec2c0e576b590d5de39c04cd19273614
Signed-off-by: carey.xu <carey.xuhan@huawei.com>
deploy.sh
deploy/deploy_host.sh
deploy/prepare.sh

index 5b315c5..95c3276 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -8,11 +8,9 @@ if [[ -z $DEPLOY_COMPASS && -z $DEPLOY_HOST && -z $REDEPLOY_HOST ]]; then
     export DEPLOY_HOST="true"
 fi
 
-for i in python-cheetah python-yaml; do
-    if [[ `dpkg-query -l $i` == 0 ]]; then
-        continue
-    fi
-    sudo apt-get install -y --force-yes  $i
-done
+sudo apt-get install -y --force-yes python-pip
+sudo pip install --upgrade pip
+sudo pip install --upgrade cheetah
+sudo pip install --upgrade pyyaml
 
 $COMPASS_DIR/deploy/launch.sh $*
index f8feacb..b7859d3 100755 (executable)
@@ -5,7 +5,8 @@ function deploy_host(){
     ssh $ssh_args root@${MGMT_IP} mkdir -p /opt/compass/bin/ansible_callbacks
     scp $ssh_args -r ${COMPASS_DIR}/deploy/status_callback.py root@${MGMT_IP}:/opt/compass/bin/ansible_callbacks/status_callback.py
 
-    reboot_hosts
+    # avoid nodes reboot to fast, cobbler can not give response
+    nohup bash -c "sleep 20;reboot_hosts" &
 
     if [[ "$REDEPLOY_HOST" == true ]]; then
         deploy_flag="redeploy"
index 77c71c5..db41091 100755 (executable)
@@ -31,13 +31,12 @@ function prepare_env() {
     export PYTHONPATH=/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
     sudo apt-get update -y
     sudo apt-get install -y --force-yes mkisofs bc curl ipmitool openvswitch-switch
-    sudo apt-get install -y --force-yes git python-pip python-dev
+    sudo apt-get install -y --force-yes git python-dev
     sudo apt-get install -y --force-yes libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev
-    sudo pip install --upgrade pip
     sudo pip install --upgrade ansible==1.9.4
     sudo pip install --upgrade virtualenv
     sudo pip install --upgrade netaddr
-    sudo pip install --upgrade oslo.config
+    sudo apt-get install python-oslo.config
     sudo service libvirt-bin restart
 
     # prepare work dir