Skip to content

Commit

Permalink
Fixed the error occurred when service_mac2 doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
guanxiaohua2k6 committed Feb 22, 2012
1 parent 4071ec3 commit f78a689
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nova/virt/dodai/connection.py
Expand Up @@ -253,6 +253,8 @@ def _install_machine(self, context, instance, bmm, cluster_name, vlan_id, update
pxe_mac = bmm["pxe_mac"] or "None"
storage_ip = bmm["storage_ip"] or "None"
storage_mac = bmm["storage_mac"] or "None"
service_mac1 = bmm["service_mac1"] or "None"
service_mac2 = bmm["service_mac2"] or "None"

instance_path = self._get_cobbler_instance_path(instance)
if not os.path.exists(instance_path):
Expand All @@ -269,8 +271,8 @@ def _install_machine(self, context, instance, bmm, cluster_name, vlan_id, update
"STORAGE_MAC": storage_mac,
"PXE_IP": pxe_ip,
"PXE_MAC": pxe_mac,
"SERVICE_MAC1": bmm["service_mac1"],
"SERVICE_MAC2": bmm["service_mac2"],
"SERVICE_MAC1": service_mac1,
"SERVICE_MAC2": service_mac2,
"IMAGE_TYPE": image_type,
"MONITOR_PORT": FLAGS.dodai_monitor_port,
"ROOT_SIZE": FLAGS.dodai_partition_root_gb,
Expand Down

0 comments on commit f78a689

Please sign in to comment.