aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2016-02-03 18:03:03 +0800
committerJustin chi <chigang@huawei.com>2016-02-06 01:05:20 +0000
commit03d7f1228d82d43cd5def8db0c525cef740b97d2 (patch)
treefc4970e9d8600827b3b40014b4f9bbd9c6afadd5
parent212413d961e46e88fbd128d34dc933650c2863c7 (diff)
bugfix: fix rename nic bug
Change-Id: Ideb729dc857ed00b337c977e7dd1ae46d3ced5ec Signed-off-by: carey.xu <carey.xuhan@huawei.com> (cherry picked from commit dc2f70258de443c90c6d422fec77d433e746b4fa)
-rw-r--r--deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-nosdn-nofeature-ha.yml10
-rw-r--r--deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml10
-rw-r--r--deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-odl_l2-nofeature-ha.yml10
-rw-r--r--deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-onos-nofeature-ha.yml10
-rwxr-xr-xdeploy/deploy_host.sh2
-rw-r--r--deploy/rename_nics.py4
6 files changed, 38 insertions, 8 deletions
diff --git a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-nosdn-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-nosdn-nofeature-ha.yml
index 18b9f07..64d6793 100644
--- a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-nosdn-nofeature-ha.yml
+++ b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-nosdn-nofeature-ha.yml
@@ -10,7 +10,7 @@ hosts:
- name: host1
mac: 'F8:4A:BF:55:A2:8D'
interfaces:
- eth1: 'F8:4A:BF:55:A2:8E'
+ - eth1: 'F8:4A:BF:55:A2:8E'
ipmiIp: 172.16.130.26
ipmiPass: Huawei@123
roles:
@@ -20,7 +20,7 @@ hosts:
- name: host2
mac: 'D8:49:0B:DA:5A:B7'
interfaces:
- eth1: 'D8:49:0B:DA:5A:B8'
+ - eth1: 'D8:49:0B:DA:5A:B8'
ipmiIp: 172.16.130.27
ipmiPass: huawei@123
roles:
@@ -30,7 +30,7 @@ hosts:
- name: host3
mac: 'D8:49:0B:DA:2A:28'
interfaces:
- eth1: 'D8:49:0B:DA:2A:29'
+ - eth1: 'D8:49:0B:DA:2A:29'
ipmiIp: 172.16.130.29
ipmiPass: Huawei@123
roles:
@@ -40,7 +40,7 @@ hosts:
- name: host4
mac: 'D8:49:0B:DA:5B:5D'
interfaces:
- eth1: 'D8:49:0B:DA:5B:5E'
+ - eth1: 'D8:49:0B:DA:5B:5E'
ipmiIp: 172.16.130.30
ipmiPass: Huawei@123
roles:
@@ -49,7 +49,7 @@ hosts:
- name: host5
mac: 'D8:49:0B:DA:56:85'
interfaces:
- eth1: 'D8:49:0B:DA:56:86'
+ - eth1: 'D8:49:0B:DA:56:86'
ipmiIp: 172.16.130.31
ipmiPass: Huawei@123
roles:
diff --git a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml
index baa12c9..7606687 100644
--- a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml
+++ b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml
@@ -9,6 +9,8 @@ ipmiVer: '2.0'
hosts:
- name: host1
mac: 'F8:4A:BF:55:A2:8D'
+ interfaces:
+ - eth1: 'F8:4A:BF:55:A2:8E'
ipmiIp: 172.16.130.26
ipmiPass: Huawei@123
roles:
@@ -18,6 +20,8 @@ hosts:
- name: host2
mac: 'D8:49:0B:DA:5A:B7'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:5A:B8'
ipmiIp: 172.16.130.27
ipmiPass: huawei@123
roles:
@@ -27,6 +31,8 @@ hosts:
- name: host3
mac: 'D8:49:0B:DA:2A:28'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:2A:29'
ipmiIp: 172.16.130.29
ipmiPass: Huawei@123
roles:
@@ -36,6 +42,8 @@ hosts:
- name: host4
mac: 'D8:49:0B:DA:5B:5D'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:5B:5E'
ipmiIp: 172.16.130.30
ipmiPass: Huawei@123
roles:
@@ -44,6 +52,8 @@ hosts:
- name: host5
mac: 'D8:49:0B:DA:56:85'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:56:86'
ipmiIp: 172.16.130.31
ipmiPass: Huawei@123
roles:
diff --git a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-odl_l2-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-odl_l2-nofeature-ha.yml
index 67e7061..ce10bab 100644
--- a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-odl_l2-nofeature-ha.yml
+++ b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-odl_l2-nofeature-ha.yml
@@ -9,6 +9,8 @@ ipmiVer: '2.0'
hosts:
- name: host1
mac: 'F8:4A:BF:55:A2:8D'
+ interfaces:
+ - eth1: 'F8:4A:BF:55:A2:8E'
ipmiIp: 172.16.130.26
ipmiPass: Huawei@123
roles:
@@ -18,6 +20,8 @@ hosts:
- name: host2
mac: 'D8:49:0B:DA:5A:B7'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:5A:B8'
ipmiIp: 172.16.130.27
ipmiPass: huawei@123
roles:
@@ -27,6 +31,8 @@ hosts:
- name: host3
mac: 'D8:49:0B:DA:2A:28'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:2A:29'
ipmiIp: 172.16.130.29
ipmiPass: Huawei@123
roles:
@@ -36,6 +42,8 @@ hosts:
- name: host4
mac: 'D8:49:0B:DA:5B:5D'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:5B:5E'
ipmiIp: 172.16.130.30
ipmiPass: Huawei@123
roles:
@@ -43,6 +51,8 @@ hosts:
- name: host5
mac: 'D8:49:0B:DA:56:85'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:56:86'
ipmiIp: 172.16.130.31
ipmiPass: Huawei@123
roles:
diff --git a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-onos-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-onos-nofeature-ha.yml
index 93770bb..9b05ade 100644
--- a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-onos-nofeature-ha.yml
+++ b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-onos-nofeature-ha.yml
@@ -9,6 +9,8 @@ ipmiVer: '2.0'
hosts:
- name: host1
mac: 'F8:4A:BF:55:A2:8D'
+ interfaces:
+ - eth1: 'F8:4A:BF:55:A2:8E'
ipmiIp: 172.16.130.26
ipmiPass: Huawei@123
roles:
@@ -18,6 +20,8 @@ hosts:
- name: host2
mac: 'D8:49:0B:DA:5A:B7'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:5A:B8'
ipmiIp: 172.16.130.27
ipmiPass: huawei@123
roles:
@@ -27,6 +31,8 @@ hosts:
- name: host3
mac: 'D8:49:0B:DA:2A:28'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:2A:29'
ipmiIp: 172.16.130.29
ipmiPass: Huawei@123
roles:
@@ -36,6 +42,8 @@ hosts:
- name: host4
mac: 'D8:49:0B:DA:5B:5D'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:5B:5E'
ipmiIp: 172.16.130.30
ipmiPass: Huawei@123
roles:
@@ -43,6 +51,8 @@ hosts:
- name: host5
mac: 'D8:49:0B:DA:56:85'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:56:86'
ipmiIp: 172.16.130.31
ipmiPass: Huawei@123
roles:
diff --git a/deploy/deploy_host.sh b/deploy/deploy_host.sh
index 1753866..8274874 100755
--- a/deploy/deploy_host.sh
+++ b/deploy/deploy_host.sh
@@ -14,7 +14,7 @@ function rename_nics(){
}
function deploy_host(){
- AYNC_TIMEOUT = 20
+ export AYNC_TIMEOUT=20
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
diff --git a/deploy/rename_nics.py b/deploy/rename_nics.py
index ef52d63..505d6bc 100644
--- a/deploy/rename_nics.py
+++ b/deploy/rename_nics.py
@@ -12,8 +12,8 @@ def rename_nics(dha_info, rsa_file, compass_ip):
interfaces = host.get('interfaces')
if interfaces:
for interface in interfaces:
- nic_name = interfaces.keys()[0]
- mac = interfaces.values()[0]
+ nic_name = interface.keys()[0]
+ mac = interface.values()[0]
exec_cmd("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
-i %s root@%s \