Michael DeHaan wrote:
> Christopher Johnston wrote:
>   
>> 0) ran many times -- dhcp trigger kicks off but no file is generated
>> 1) manage_isc is setup in modules.conf
>> 2) yes restarted a few times
>> 3) I have tried 1.2.8-1, 1.3.1-1, 1.3.2-1 
>>
>> Is there any way to enable debuguging with cobbler as to print more 
>> information out in the logs, ie debug statements of what functions are 
>> being called without modifying the code?  I resorted to running an 
>> strace and I noticed a function called write_dhcp_file does indeed get 
>> called.
>>     
>
> There's no "extra heavy" debug mode other than what is already written 
> to the log file.
>
> If you'd like to email me your settings, modules.conf, dhcp.template 
> (all from /etc/cobbler) and /var/lib/cobbler/config/* in a tarball I can 
> perhaps try to see if I can replicate this on my end.
>
> I'd say we would have definitely heard of this on 1.2.8 so it's going to 
> be something specific to your configuration most likely...  though I 
> can't guarantee I can repro it that is the first thing to try.
>
> --Michael
>
>
>   
>> *stat("/usr/lib/python2.4/site-packages/cobbler/modules/manage_dnsmasq", 
>> 0x7fff631cc5c0) = -1 ENOENT (No such file or directory)*
>>
>> *open("/usr/lib/python2.4/site-packages/cobbler/modules/manage_dnsmasq.so", 
>> O_RDONLY) = -1 ENOENT (No such file or directory)*
>>
>> *open("/usr/lib/python2.4/site-packages/cobbler/modules/manage_dnsmasqmodule.so",
>>  
>> O_RDONLY) = -1 ENOENT (No such file or directory)*
>>
>> *open("/usr/lib/python2.4/site-packages/cobbler/modules/manage_dnsmasq.py", 
>> O_RDONLY) = 5*
>>
>> *fstat(5, {st_mode=S_IFREG|0644, st_size=7271, ...}) = 0*
>>
>> *open("/usr/lib/python2.4/site-packages/cobbler/modules/manage_dnsmasq.pyc", 
>> O_RDONLY) = 6*
>>
>> *fstat(6, {st_mode=S_IFREG|0644, st_size=6051, ...}) = 0*
>>
>> *mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
>> 0) = 0x2b844de7c000*
>>
>> *read(6, 
>> "[EMAIL PROTECTED]"..., 
>> 4096) = 4096*
>>
>> *fstat(6, {st_mode=S_IFREG|0644, st_size=6051, ...}) = 0*
>>
>> *read(6, "\0\0write_dhcp_fileM\0\0\0sZ\0\0\0\0\4\0\2\f\1"..., 4096) = 
>> 1955*
>>
>> *read(6, "", 4096)                       = 0*
>>
>> *close(6)                                = 0*
>>
>>
>>
>> On Sun, Nov 30, 2008 at 12:35 PM, Michael DeHaan <[EMAIL PROTECTED] 
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>
>>     Christopher Johnston wrote:
>>     > Unclear on why cobbler is not updating dhcpd.conf, I have omapi
>>     > management disabled and the stock dhcp.template modified slightly to
>>     > support a private subnet in one of my labs.  Cobbler check looks ok,
>>     > cobbler sync obviously fails to restart dhcpd because the file never
>>     > gets written out.  Does my template look correct (its the stock
>>     template)
>>     >
>>     > dhcpd_bin: /usr/sbin/dhcpd
>>     > dhcpd_conf: /etc/dhcpd.conf
>>     > manage_dhcp: 1
>>     > omapi_enabled: 0
>>     > omapi_port: 647
>>     > restart_dhcp: 1
>>     >
>>     >
>>
>>
>>     Some ideas and things to check:
>>
>>     0) You've possibly never run "cobbler sync", as that's needed to
>>     create
>>     and update the file.
>>     1) You might possibly have the dnsmasq module enabled instead in
>>     /etc/cobbler/modules.conf, in which case it won't be generating
>>     /etc/dhcp.conf but instead the configuration file for dnsmasq.  
>>     The ISC
>>     version is the default.
>>     2) You might also have not restarted cobblerd yet after making the
>>     above
>>     changes?
>>     3)  What version of cobbler is installed?  (rpm -q cobbler)
>>
>>     --Michael
>>
>>     >
>>     > # ******************************************************************
>>     > # Cobbler managed dhcpd.conf file
>>     > #
>>     > # generated from cobbler dhcp.conf template ($date)
>>     > # Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes
>>     > # in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be
>>     > # overwritten.
>>     > #
>>     > # ******************************************************************
>>     >
>>     > ddns-update-style interim;
>>     >
>>     > allow booting;
>>     > allow bootp;
>>     > #if $omapi_enabled
>>     > omapi-port $omapi_port;
>>     > #end if
>>     >
>>     > ignore client-updates;
>>     > set vendorclass = option vendor-class-identifier;
>>     >
>>     > subnet 192.168.125.0 <http://192.168.125.0>
>>     <http://192.168.125.0> netmask 255.255.255.0 <http://255.255.255.0>
>>     > <http://255.255.255.0> {
>>     >      option domain-name-servers 192.168.125.32
>>     <http://192.168.125.32> <http://192.168.125.32>;
>>     >      option subnet-mask         255.255.255.0
>>     <http://255.255.255.0> <http://255.255.255.0>;
>>     >      filename                   "/pxelinux.0";
>>     >      default-lease-time         21600;
>>     >      max-lease-time             43200;
>>     >      next-server                $next_server;
>>     > }
>>     >
>>     > #for dhcp_tag in $dhcp_tags.keys():
>>     >     ## group could be subnet if your dhcp tags line up with your
>>     subnets
>>     >     ## or really any valid dhcpd.conf construct ... if you only
>>     use the
>>     >     ## default dhcp tag in cobbler, the group block can be
>>     deleted for a
>>     >     ## flat configuration
>>     > # group for Cobbler DHCP tag: $dhcp_tag
>>     > group {
>>     >         #for mac in $dhcp_tags[$dhcp_tag].keys():
>>     >             #set iface = $dhcp_tags[$dhcp_tag][$mac]
>>     >     host $iface.name <http://iface.name> <http://iface.name> {
>>     >         hardware ethernet $mac;
>>     >         #if $iface.ip_address:
>>     >             fixed-address $iface.ip_address;
>>     >         #end if
>>     >         #if $iface.subnet:
>>     >             option subnet-mask $iface.subnet;
>>     >         #end if
>>     >         #if $iface.gateway:
>>     >             option routers $iface.gateway;
>>     >         #end if
>>     >         #if $iface.system.netboot_enabled:
>>     >             filename "$iface.filename";
>>     >             ## Cobbler defaults to $next_server, but some users
>>     >             ## like to use $iface.system.server for proxied setups
>>     >             next-server $next_server;
>>     >             ## next-server $iface.system.server;
>>     >         #end if
>>     >     }
>>     >         #end for
>>     > }
>>     > #end for
>>     >
>>     >
>>     ------------------------------------------------------------------------
>>     >
>>     > _______________________________________________
>>     > cobbler mailing list
>>     > [email protected]
>>     <mailto:[email protected]>
>>     > https://fedorahosted.org/mailman/listinfo/cobbler
>>     >
>>
>>     _______________________________________________
>>     cobbler mailing list
>>     [email protected] <mailto:[email protected]>
>>     https://fedorahosted.org/mailman/listinfo/cobbler
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> cobbler mailing list
>> [email protected]
>> https://fedorahosted.org/mailman/listinfo/cobbler
>>   
>>     
>
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
>   

We narrowed this down on IRC.

In 1.3.X, the template should contain $gateway not iface.gateway, hence 
the error.

This will be correct for 1.3.X (look out for .rpmnew's when upgrading) 
and I'll look into making the error reporting better.


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

Reply via email to