cobbler buildiso assumed that eth0 was the only place to get network information from. If you use bonding this isn't true. Here is the fix.

Also noticed gateway wasn't being set so fixed that as well.

Daveh

PS - can you push this into 1.4 as well as devel  as I use this a lot?


>From e10986fe1fbeef40b30fd2b012ecd995952fcc6a Mon Sep 17 00:00:00 2001
From: Dave Hatton <[email protected]>
Date: Thu, 22 Jan 2009 17:41:15 +0000
Subject: [PATCH] Fix network configuration broken by addation of bonding support

---
 cobbler/action_buildiso.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cobbler/action_buildiso.py b/cobbler/action_buildiso.py
index a6fa735..8fe7470 100644
--- a/cobbler/action_buildiso.py
+++ b/cobbler/action_buildiso.py
@@ -236,12 +236,18 @@ class BuildIso:
 
                    # add network info to avoid DHCP only if it is available
 
+                   if data.has_key("ip_address_bond0") and 
data["ip_address_bond0"] != "":
+                       append_line = append_line + " ip=%s" % 
data["ip_address_bond0"]
                    if data.has_key("ip_address_eth0") and 
data["ip_address_eth0"] != "":
                        append_line = append_line + " ip=%s" % 
data["ip_address_eth0"]
+
+                   if data.has_key("subnet_bond0") and data["subnet_bond0"] != 
"":
+                       append_line = append_line + " netmask=%s" % 
data["subnet_bond0"]
                    if data.has_key("subnet_eth0") and data["subnet_eth0"] != 
"":
                        append_line = append_line + " netmask=%s" % 
data["subnet_eth0"]
-                   if data.has_key("gateway_eth0") and data["gateway_eth0"] != 
"":
-                       append_line = append_line + " gateway=%s\n" % 
data["gateway_eth0"]
+
+                   if data.has_key("gateway") and data["gateway"] != "":
+                       append_line = append_line + " gateway=%s\n" % 
data["gateway"]
 
                    length=len(append_line)
                    if length > 254:
-- 
1.5.5.6

_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to