[et-mgmt-tools] COBBLER patch for DHCP host creation/deletion without restarting ISC DHCP

Pablo Iranzo Gómez Pablo.Iranzo at redhat.com
Tue Apr 29 13:58:47 UTC 2008


	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
-- 

Pablo Iranzo Gómez (Pablo.Iranzo at redhat.com)
RHCE/Global Profesional Services Consultant Spain
Phone: +34 645 01 01 49 (CET/CEST)
GnuPG KeyID: 0xFAD3CF0D
---
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3ºD, 28016 Madrid, Spain
Dirección Registrada: Red Hat S.L., C/ Velazquez 63, Madrid 28001, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omshell.diff
Type: text/x-patch
Size: 5833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20080429/a27ef890/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje est? firmada	digitalmente
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20080429/a27ef890/attachment.sig>


More information about the et-mgmt-tools mailing list