diff options
-rwxr-xr-x | build.sh | 8 | ||||
-rwxr-xr-x | build/make_repo.sh | 6 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/ext-network/tasks/main.yml | 3 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/neutron-controller/tasks/main.yml | 12 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml | 16 | ||||
-rw-r--r-- | deploy/client.py | 3 | ||||
-rwxr-xr-x | deploy/launch.sh | 2 |
7 files changed, 26 insertions, 24 deletions
@@ -78,7 +78,7 @@ function download_local() function download_packages() { - for i in $CENTOS_BASE $COMPASS_CORE $COMPASS_WEB $COMPASS_INSTALL $TRUSTY_JUNO_PPA $TRUSTY_LIBERTY_PPA $UBUNTU_ISO \ + for i in $CENTOS_BASE $COMPASS_CORE $COMPASS_WEB $COMPASS_INSTALL $TRUSTY_JUNO_PPA $TRUSTY_LIBERTY_PPA $TRUSTY_MITAKA_PPA $UBUNTU_ISO \ $CENTOS_ISO $CENTOS7_JUNO_PPA $CENTOS7_KILO_PPA $CENTOS7_LIBERTY_PPA $LOADERS $CIRROS $APP_PACKAGE $COMPASS_PKG \ $PIP_REPO $ANSIBLE_MODULE; do @@ -120,9 +120,9 @@ function copy_file() cp $CACHE_DIR/`basename $TRUSTY_LIBERTY_PPA` $new/repos/cobbler/ubuntu/ppa/ -rf fi -# if [[ $TRUSTY_MITAKA_PPA ]]; then -# cp $CACHE_DIR/`basename $TRUSTY_MITAKA_PPA` $new/repos/cobbler/ubuntu/ppa/ -rf -# fi + if [[ $TRUSTY_MITAKA_PPA ]]; then + cp $CACHE_DIR/`basename $TRUSTY_MITAKA_PPA` $new/repos/cobbler/ubuntu/ppa/ -rf + fi if [[ $CENTOS_ISO ]]; then cp $CACHE_DIR/`basename $CENTOS_ISO` $new/repos/cobbler/centos/iso/ -rf diff --git a/build/make_repo.sh b/build/make_repo.sh index bebb5060..4299868c 100755 --- a/build/make_repo.sh +++ b/build/make_repo.sh @@ -117,9 +117,9 @@ function make_repo() mkdir -p ${WORK_PATH}/work/tmp echo "${ansible_dir}" cp -rf ${ansible_dir}/roles/ ${WORK_PATH}/work/tmp/ - if [[ -d ${ansible_dir}/openstack_${package_tag} && "`ls ${ansible_dir}/openstack_${package_tag}`" != "" ]]; then - cp -rf ${ansible_dir}/openstack_${package_tag}/* ${WORK_PATH}/work/tmp/roles/ - fi + if [[ -d ${ansible_dir}/openstack_${package_tag}/roles && "`ls ${ansible_dir}/openstack_${package_tag}`" != "" ]]; then + cp -rf ${ansible_dir}/openstack_${package_tag}/roles/* ${WORK_PATH}/work/tmp/roles/ + fi ansible_dir_tmp=${WORK_PATH}/work/tmp/ fi diff --git a/deploy/adapters/ansible/roles/ext-network/tasks/main.yml b/deploy/adapters/ansible/roles/ext-network/tasks/main.yml index 809a8fa0..73fe061b 100644 --- a/deploy/adapters/ansible/roles/ext-network/tasks/main.yml +++ b/deploy/adapters/ansible/roles/ext-network/tasks/main.yml @@ -7,6 +7,9 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --- +- name: restart neutron server + service: name=neutron-server state=restarted enabled=yes + - name: create external net neutron_network: login_username: ADMIN diff --git a/deploy/adapters/ansible/roles/neutron-controller/tasks/main.yml b/deploy/adapters/ansible/roles/neutron-controller/tasks/main.yml index 1aaf91a3..2c6891f3 100644 --- a/deploy/adapters/ansible/roles/neutron-controller/tasks/main.yml +++ b/deploy/adapters/ansible/roles/neutron-controller/tasks/main.yml @@ -20,4 +20,16 @@ - neutron_config - neutron +- name: fix openstack neutron plugin config file + shell: | + sed -i 's,plugins/ml2/openvswitch_agent.ini,plugin.ini,g' /usr/lib/systemd/system/neutron-openvswitch-agent.service + systemctl daemon-reload + when: ansible_os_family == 'RedHat' + +- name: restart first neutron-server + service: name=neutron-server state=restarted enabled=yes + +- name: restart other neutron-server + service: name=neutron-server state=restarted enabled=yes + - meta: flush_handlers diff --git a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml index d07e187c..fd133f37 100644 --- a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml +++ b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml @@ -8,13 +8,7 @@ ############################################################################## --- -- name: fix openstack neutron plugin config file - shell: | - sed -i 's,plugins/ml2/openvswitch_agent.ini,plugin.ini,g' /usr/lib/systemd/system/neutron-openvswitch-agent.service - systemctl daemon-reload - when: ansible_os_family == 'RedHat' - -- name: neutron-db-manage upgrade to Juno +- name: neutron-db-manage upgrade shell: neutron-db-manage --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/ml2/ml2_conf.ini upgrade head register: result run_once: True @@ -23,11 +17,3 @@ delay: 3 notify: - restart neutron control services - -- name: restart first neutron-server - service: name=neutron-server state=restarted enabled=yes - -- name: restart other neutron-server - service: name=neutron-server state=restarted enabled=yes - -- meta: flush_handlers diff --git a/deploy/client.py b/deploy/client.py index a87decc9..8617a56a 100644 --- a/deploy/client.py +++ b/deploy/client.py @@ -913,7 +913,8 @@ class CompassClient(object): def print_ansible_log(): os.system("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i %s root@192.168.200.2 \ - 'while ! tail -f /var/ansible/run/openstack_liberty-opnfv2/ansible.log 2>/dev/null; do :; sleep 1; done'" % CONF.rsa_file) + 'while ! tail -f /var/ansible/run/%s-%s/ansible.log 2>/dev/null; do :; sleep 1; done'" % + (CONF.rsa_file, CONF.adapter_name, CONF.cluster_name)) def kill_print_proc(): os.system("ps aux|grep -v grep|grep -E 'ssh.+root@192.168.200.2'|awk '{print $2}'|xargs kill -9") diff --git a/deploy/launch.sh b/deploy/launch.sh index fbffc98c..9947bd8d 100755 --- a/deploy/launch.sh +++ b/deploy/launch.sh @@ -88,7 +88,7 @@ if [[ "$DEPLOY_HOST" == "true" || $REDEPLOY_HOST == "true" ]]; then externet_cidr=$(sshpass -p 'root' ssh $ssh_options root@$installer_ip 'cat /home/opencontrail2.rc') sudo ip route add $externet_cidr via $vgw_ip dev br-external 2>/dev/null sleep 60 - python ${COMPASS_DIR}/deploy/reset_compute.py $TYPE $DHA + sudo python ${COMPASS_DIR}/deploy/reset_compute.py $TYPE $DHA sleep 600 fi fi |