[et-mgmt-tools] Cobbler Triggers

Michael DeHaan mdehaan at redhat.com
Fri Oct 12 14:29:45 UTC 2007


Tim Verhoeven wrote:
> Hello,
>
> Let me first try to explain what I would like to setup. I'm building a
> central repo/installation server using Cobbler. We also (already) have
> a central DHCP and DNS server (ISC dhcpd and bind). The idea is that I
> let the Cobbler server generate pieces of configfile for these
> services and then copy the files over to the DHCP and DNS server and
> use them through includes so that I do not have to touch the main
> configfiles.
>
> For the DHCP part my idea was to let Cobbler to it's thing like it
> does now (when manage_dhcp is set to 1). But it think there are 2
> issues with this setup. First, there is no trigger for the sync
> action, and that is (as far as I can see) the place where the
> dhcp.conf file get created/updated by Cobbler.
> Secondly, when manage_dhcp is set to 1 it will also try to restart
> dhcpd. In my setup I don't need this since my trigger will do that on
> the remote side.
>   
Adding a sync trigger is fairly simple.  We could also add a setting for 
sync_restarts_dhcp.

I'm thinking that might be useful anyway because then you could update 
cobbler all  you like
but you'd get to choose when to update DHCP.   (ISC has live-update 
capabilities, I've been
referred to OMAPI/omshell before, but it seems rather over-complicated 
for not a lot of gain).

> IMHO there are 2 ways to make this work. First is to add another
> option that tell Cobbler to create all the necessary configfiles but
> to not try to start any daemon itself. And then also add a trigger on
> the sync action (which would be a good idea anyway, I think that can
> be used for other things too).
>   

Making the dhcp restart a sync-trigger itself seems like a good idea.   
We could
ship it by default, and the trigger could be written to only run when 
DHCP management
was enabled.

> The second idea is to add "remote" functionality to Cobbler itself.
> Meaning when the remote option is set Cobbler will scp files over to
> another system and restart any daemons there using ssh. This last part
> should be not that invasive using a set of well written functions for
> this.
>
> So what is the prefered option here ?
>   
Well, if we do the trigger system above, you could modify the "sync" 
trigger to
rsync the bits over, instead of doing the DHCP restart.    That seems 
like a win to me.

> Then for the DNS part. With the triggers for add and delete system it
> should not be that hard to write something that creates part of a
> zonefile and copy that over to the DNS server, increments the serial
> and reloads bind. But I've seen in the code that Cobbler already
> generates something simular (although simpler) for dnsmasq. What is
> the feeling to add bind type zonefiles output to Cobbler ? Then the
> trigger only needs to copy it and reload bind.
>   

Seems reasonable.   Does anyone want to take a shot at adding it?

Ideally the dnsmasq/ISC code should be a bit more modular, though that 
is something
that could be cleaned up later -- or at the same time as adding this.

> Anyway, if someone else has working trigger scripts that he or she is
> willing to share as examplecode, I would appreciate it.
>
> Regards,
> Tim
>
>
>   




More information about the et-mgmt-tools mailing list