agroup/instack-undercloud — pull request #15 by marios (2014-09-11 14:31:40+00:00)
Title: WIP: Adds a discovery-dhcp element

This element adds a systemd service that spawns a dnsmasq process.
TODO: add configuration - interface and dhcp alloc. range.

This dnsmasq process is intended to serve only new and undiscovered
machines. Already enrolled hardware continues to be served by the
neutron-dhcp-agent spawned dnsmasq process(es) (and this/ese is/are
already explicitly told not to answer calls from unknown machines).

The element uses iptables to block dhcp/bootp requests from already
enrolled hardware (by querying ironic), in pretty much exactly the
same way as the older bm-dnsmasq element, with a cronjob setup to
periodically update the chain (to include for example recently
discovered machines).

One drawback of this approach is the limit with which the MAC
filter can be invoked by cron (x>=1minute integer value). An
alternative is to have a bash script managed by the systemd service
that loops forever (and updates every x seconds). Regardless of the
time interval an alternative to using iptables is to use a dhcp
hostfile (passed to dnsmasq when invoked) and update that with 'MAC,
ignore' entries (and then sighup dnsmasq) as a means of filtering.