Get MAC addresses to help daisy to distinguish the discovered hosts 87/38387/1
authorAlex Yang <yangyang1@zte.com.cn>
Mon, 31 Jul 2017 00:52:31 +0000 (08:52 +0800)
committerAlex Yang <yangyang1@zte.com.cn>
Mon, 31 Jul 2017 00:52:31 +0000 (08:52 +0800)
JIRA: DAISY-42
JIRA: DAISY-56

Now the deploy script cannot distinguish the discovered hosts, then
the roles are assigned to hosts randomly. The MAC addresses of hosts
can help daisy to assign roles correctly.

Change-Id: If413ad776706eb4e25db5223917a7518d856ba8e
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
installers/daisy/pod_config.yaml.j2

index af24b2a..5df66ee 100644 (file)
@@ -6,30 +6,40 @@ hosts:
   ipmi_ip: {{ conf['nodes'][0]['remote_mangement']['address'] }}
   ipmi_user: {{ conf['nodes'][0]['remote_mangement']['user'] }}
   ipmi_pass: {{ conf['nodes'][0]['remote_mangement']['pass'] }}
+  mac_addresses:{% for nic in conf['nodes'][0]['interfaces'] %}
+    - {{ nic['mac_address'] }}{% endfor %}
 - name: 'controller02'
   roles:
     - 'CONTROLLER_LB'
   ipmi_ip: {{ conf['nodes'][1]['remote_mangement']['address'] }}
   ipmi_user: {{ conf['nodes'][1]['remote_mangement']['user'] }}
   ipmi_pass: {{ conf['nodes'][1]['remote_mangement']['pass'] }}
+  mac_addresses:{% for nic in conf['nodes'][1]['interfaces'] %}
+    - {{ nic['mac_address'] }}{% endfor %}
 - name: 'controller03'
   roles:
     - 'CONTROLLER_LB'
   ipmi_ip: {{ conf['nodes'][2]['remote_mangement']['address'] }}
   ipmi_user: {{ conf['nodes'][2]['remote_mangement']['user'] }}
   ipmi_pass: {{ conf['nodes'][2]['remote_mangement']['pass'] }}
+  mac_addresses:{% for nic in conf['nodes'][2]['interfaces'] %}
+    - {{ nic['mac_address'] }}{% endfor %}
 - name: 'computer01'
   roles:
     - 'COMPUTER'
   ipmi_ip: {{ conf['nodes'][3]['remote_mangement']['address'] }}
   ipmi_user: {{ conf['nodes'][3]['remote_mangement']['user'] }}
   ipmi_pass: {{ conf['nodes'][3]['remote_mangement']['pass'] }}
+  mac_addresses:{% for nic in conf['nodes'][3]['interfaces'] %}
+    - {{ nic['mac_address'] }}{% endfor %}
 - name: 'computer02'
   roles:
     - 'COMPUTER'
   ipmi_ip: {{ conf['nodes'][4]['remote_mangement']['address'] }}
   ipmi_user: {{ conf['nodes'][4]['remote_mangement']['user'] }}
   ipmi_pass: {{ conf['nodes'][4]['remote_mangement']['pass'] }}
+  mac_addresses:{% for nic in conf['nodes'][4]['interfaces'] %}
+    - {{ nic['mac_address'] }}{% endfor %}
 disks:
   daisy: 50
 daisy_passwd: 'r00tme'