aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/deploy_host.sh
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2016-01-30 18:43:30 +0800
committerJustin chi <chigang@huawei.com>2016-01-31 00:37:35 +0000
commit104a2934a54d7113cf4c3eb76b29377c4b3a8425 (patch)
treeefbe7e83af182e4333b60853e4cc7d275568c7c2 /deploy/deploy_host.sh
parent5c31226684c85448f69ece611ffefbf9a3bacf23 (diff)
bugfix: rename nic based on mac
Change-Id: I2771a87a41ab884dbda1fcffa8ab0833489fb5ef Signed-off-by: carey.xu <carey.xuhan@huawei.com>
Diffstat (limited to 'deploy/deploy_host.sh')
-rwxr-xr-xdeploy/deploy_host.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/deploy/deploy_host.sh b/deploy/deploy_host.sh
index 1b03f043..9617b241 100755
--- a/deploy/deploy_host.sh
+++ b/deploy/deploy_host.sh
@@ -8,14 +8,18 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
rsa_file=$compass_vm_dir/boot.rsa
+
+function rename_nics(){
+ python $COMPASS_DIR/deploy/rename_nics.py $DHA $rsa_file $MGMT_IP
+}
+
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
# avoid nodes reboot to fast, cobbler can not give response
- (sleep 20;reboot_hosts) &
-
+ (sleep 20; rename_nics; reboot_hosts) &
if [[ "$REDEPLOY_HOST" == true ]]; then
deploy_flag="redeploy"
else