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:39:00 +0000
commit81752c48ce4674e9084de3303bfb6f088365b30b (patch)
tree9d2d686e44065518ad0b996320ad8ea94a2cc08b /deploy/deploy_host.sh
parent33f158ba8b717531b4f7122f713a6c0eeb4db003 (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