Hi.
I've encountered very strange problem.
I want to set up the following network configuration:
eth0+eth1 = bond0
vlan10 => bond0.10
vlan11 => bond0.11
Also, for the purpose of PXE installation my network staff can set the
native vlan of eth0 to vlan 10.
Problem is that cobbler doesn't manage ISC DHCP very well in this case.
Address has to be set on bond0 also, and I didn't test how would that
affect final configuration of installed system...
This is the file I think that's culprit:
/usr/lib/python2.6/site-packages/cobbler/modules/manage_isc.py
And this is the code snippet:
if interface["interface_type"] in
("slave","bond_slave","bridge_slave"):
if interface["interface_master"] not in system.interfaces:
# Can't write DHCP entry; master interface does not
# exist
continue
ip =
system.interfaces[interface["interface_master"]]["ip_address"]
interface["ip_address"] = ip
host =
system.interfaces[interface["interface_master"]]["dns_name"]
else:
ip = interface["ip_address"]
host = interface["dns_name"]
After cobbler sync, i get this in /etc/dhcp/dhcpd.conf:
host generic8 {
hardware ethernet 00:11:5c:34:29:ff;
option host-name "myhost.mydomain";
option routers 192.168.1.1;
filename "/pxelinux.0";
next-server 192.168.1.2;
}
If you can notice, it misses the "fixed-address <IP>;" line in there, so
PXE won't boot it because the machine doesn't get the IP assigned...
What happens is that the snippet of python code checks if the interface
is slave, and if it is, then checks for the IP of the master interface.
In my case, bond0 is master interafce, but it does not have IP address
assigned because I do VLAN tagging over the bond.
And if I manually set the IP address on eth0, code again doesn't set the
IP because eth0 is flagged as slave, and because of that it checks the
IP of the master interface :D
Only viable solution is to set same IP address on bond0 and bond0.10,
and after the initial boot remove the IPADDR/NETMASK/NETWORK settings
from ifcfg-bond0 file and reboot again...
Is there any better way to achieve this? Can manage_isc.py be hacked in
someway, or some new option added?
I've tried with --interface=eth0 --managed=yes, but it doesn't help.
Ty and sorry for long post
Show replies by date