On 11.06.2012 [20:11:38 -0700], Nishanth Aravamudan wrote: > On 11.06.2012 [14:12:58 -0500], Dan Rao wrote: > > On 06/09/2012 10:29 AM, James Cammarata wrote: > > > On Sat, Jun 9, 2012 at 9:17 AM, James Cammarata <j...@sngx.net> wrote: > > >>>> Dan and Nishanth, > > >>>> > > >>>> Did you try out the different conditional logic to see if it meets you > > >>>> needs? > > >>> > > >>> I'm testing it now in my environment, need to run a few more jobs, but > > >>> it seems fine here. > > >> > > >> What I was actually thinking of doing to correct this is to not set > > >> the next-server line if netboot-enabled=false. So basically we'd > > >> revert Nishanth's change and then modify the dhcpd template: > > >> > > >> #if $iface.netboot_enabled: > > >> next-server $next_server; > > >> #end if > > >> > > >> This is already being set in modules/manage_isc.py: > > >> > > >> interface["netboot_enabled"] = blended_system["netboot_enabled"] > > >> > > >> So it should be a nice easy fix. Regardless, whatever we do I'll get > > >> this pushed out as 2.2.3-2, as I didn't think through the impact this > > >> might have to users that manage dhcpd with cobbler. > > > > > > Give this a try: > > > > > > https://github.com/jimi1283/cobbler/tree/dhcp_fix > > > > Works for me. Thanks! > > I will have to test this out -- the issue for PowerPC is that a DHCP > response (which perhaps won't get sent if next-server is not set?) > caused the SMS menus to assume netbooting was the boot method and there > didn't seem to be any failover (fallback, perhaps) to disk if that > failed. But, like I said, I will test the patch and let you know, > hopefully tomorrow.
So this change on its own is insufficient in my environment. Here is the resulting bootlog: TFTP BOOT --------------------------------------------------- Server IP.....................9.3.191.134 Client IP.....................9.3.192.209 Gateway IP....................9.3.192.1 Subnet Mask...................255.255.255.0 ( 1 ) Filename................./yaboot TFTP Retries..................5 Block Size....................512 FINAL PACKET COUNT = 388 FINAL FILE SIZE = 198376 BYTES Elapsed time since release of system processors: 18709 mins 13 secs ipv6 = <0> siaddr = <9.3.191.134> file = <> ciaddr = <9.3.192.209> giaddr = <9.3.192.1> bootp_retries = <5> tftp_retries = <5> addl_params = <512> dhcpv6 = <<NULL>> blksize = <<NULL>> Try to netboot TFTP BOOT --------------------------------------------------- Server IP.....................9.3.191.134 Client IP.....................9.3.192.209 Gateway IP....................9.3.192.1 Subnet Mask...................255.255.255.0 ( 1 ) Filename.................\etc\01-82-5c-60-4a-67-04 TFTP Retries..................5 Block Size....................512 1 2 3 !BA017021 ! Error, can't read config file ... It tries a few other config file locations, but then eventually drops to yaboot's prompt, with no kernels available, and if you hit enter there, it just tries to load the conf file again. FWIW, here was the generated stanza: host generic7 { hardware ethernet <AA:BB:CC:DD:EE:FF>; fixed-address <ip>; option host-name "<hostname>"; option subnet-mask 255.255.255.0; option routers <gw>; filename "/yaboot"; } If I change your commit slightly, I do get what I need: Do not generate either the next-server or filename sections of the DHCP stanza if a server is not setup to netboot. This allows DHCP environments to obtain IP addresses, but prevents netboot cycles on PowerPC. Signed-off-by: Nishanth Aravamudan <n...@us.ibm.com> diff --git a/templates/etc/dhcp.template b/templates/etc/dhcp.template index d7a28ef..58926ab 100644 --- a/templates/etc/dhcp.template +++ b/templates/etc/dhcp.template @@ -50,6 +50,7 @@ group { #if $iface.gateway: option routers $iface.gateway; #end if + #if $iface.netboot_enabled: #if $iface.enable_gpxe: if exists user-class and option user-class = "gPXE" { filename "http://$cobbler_server/cblr/svc/op/gpxe/system/$iface.owner"; @@ -61,7 +62,6 @@ group { #end if ## Cobbler defaults to $next_server, but some users ## may like to use $iface.system.server for proxied setups - #if $iface.netboot_enabled: next-server $next_server; #end if ## next-server $iface.next_server; -- Nishanth Aravamudan <n...@us.ibm.com> IBM Linux Technology Center _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler