Re-injecting dhcp leases for all managed interfaces

Hi, is there a way to have foreman go through all managed interfaces (bmc
and front-end) and re-inject (delete, then add) leases for each one? I'm
using foreman 1.11.4 with smart proxy 1.11.4 with isc dhcpd and it seems
that leases get lost on a regular basis (restarting dhcpd?) so we're
frequently using this procedure to re-inject a lease for bmc for instance
when a host goes down and we discover the bmc is not responding on the
network:

edit host -> interfaces -> edit BMC -> change IP address -> OK -> Save ->
edit host -> interfaces -> edit BMC -> change IP address back -> OK -> Save
-> Overwrite

Then since the bmc likely picked up the 'wrong' address, need to reset it
back to the correct address.

It'd be great if there was a button to re-create all leases (or even just
the leases for a particular host or interface) but I don't see one.

Thanks,
Brian

Via the host list, tick the checkbox next to one or more hosts, then
choose "Rebuild Config" from the Select Action dropdown menu.

See the 1.10 release notes for more details:
https://theforeman.org/manuals/1.10/index.html#Headlinefeatures

··· On 20/12/16 16:24, Brian Witt wrote: > Hi, is there a way to have foreman go through all managed interfaces > (bmc and front-end) and re-inject (delete, then add) leases for each > one? I'm using foreman 1.11.4 with smart proxy 1.11.4 with isc dhcpd > and it seems that leases get lost on a regular basis (restarting dhcpd?) > so we're frequently using this procedure to re-inject a lease for bmc > for instance when a host goes down and we discover the bmc is not > responding on the network: > > edit host -> interfaces -> edit BMC -> change IP address -> OK -> Save > -> edit host -> interfaces -> edit BMC -> change IP address back -> OK > -> Save -> Overwrite > > Then since the bmc likely picked up the 'wrong' address, need to reset > it back to the correct address. > > It'd be great if there was a button to re-create all leases (or even > just the leases for a particular host or interface) but I don't see one.


Dominic Cleal
dominic@cleal.org

That's exactly what I wanted! Thanks!

Brian

··· On Wednesday, December 21, 2016 at 1:16:53 AM UTC-8, Dominic Cleal wrote: > > Via the host list, tick the checkbox next to one or more hosts, then > choose "Rebuild Config" from the Select Action dropdown menu. > > See the 1.10 release notes for more details: > https://theforeman.org/manuals/1.10/index.html#Headlinefeatures > >