Pablo Iranzo Gómez wrote:
Hi all
Regarding ticket: https://fedorahosted.org/cobbler/ticket/85
I'm submitting a patch that will need extra work from any of you
willing to ;)
This patch introduces two new setting options: omapi and omapi_port
omapi is a protocol spoke by DHCP to perform real-time modification to
entries without restarting the daemon, for doing so, it needs a new
setting in your dhcp.template "omapi port" and restart of the server.
After that, the code for generating the DHCP config just send those
commands directly and avoids final dhcp restart.
Thinks lacking:
- Error checking if dhcp has no omapi enabled and cobbler configuration
says so
- No dhcp started
- no password authentication enabled (described in omshell)
- Port used is 647 as it's defined in SELinux for DHCP, but not sure if
used for any other thing... but for me, it works.
You can check if this works this way:
-creating the entries in /var/lib/cobbler/settings
and /etc/cobbler/dhcp.template.
- Running cobbler sync to write new entry with "omapi port"
for /etc/dhcpd.conf
- Stopping dhcpd
- Editing /etc/dhcpd.conf and remove all host definitions created by
cobbler
- Emptying /var/lib/dhcpd/dhcpd.leases
- Starting dhcpd
After this, you can run cobbler sync and have a look at
"/var/lib/dhcpd/dhcpd.leases" and have a look at the new "host" entries
which will have a "dynamic" stating that have been generated dinamically
with OMAPI.
As the new DHCPD.conf is generated as it was before, in case of a
system restart, the host will be still there.
Please, patches and comments are very welcome :)
Pablo
------------------------------------------------------------------------
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
Very nice!
Does anyone want to take a look at testing this?
I'm looking at applying most of the submitted patches later this week
(this week has been excellent in terms of cobbler contributions, thanks
everyone!) -- when we do it would be nice to have this on the Wiki,
including instructions of what you have to add to
/etc/cobbler/dhcp.template to enable omshell.
Comments on error bits:
- Error checking if dhcp has no omapi enabled and cobbler configuration
says so
This probably generates an error from DHCP, which is probably sufficient given that if you are enabling the omapi
bits that can be part of the instructions.
- No dhcp started
Cobbler check should look for this if manage_dhcp is enabled. So we should be covered there.
- no password authentication enabled (described in omshell)
How do the passwords work?
- Port used is 647 as it's defined in SELinux for DHCP, but not sure if
used for any other thing... but for me, it works.
It appears to be reserved for "DHCP failover" in /etc/services so I
think we're good to go.
Thanks again!
--Michael
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools