xcat-core
xcat-core copied to clipboard
min-lease-time overrides max-lease-time in pxe class of dhcpd.conf
Please see a sample from dhcpd.conf below. max-lease-time in "pxe" class gets overridden by min-lease-time in subnet blocks. See xCAT_plugin/dhcp.pm
...
class "pxe" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
ddns-updates off;
max-lease-time 600;
}
#shared-network !remote! {
subnet 10.20.1.0 netmask 255.255.255.0 {
authoritative;
max-lease-time 43200;
min-lease-time 43200;
...
@po1vo Is it not how you would want it?
shared-network configuration is more specific than the more general class entries ?
I want leases to PXEClients last no longer than the specified max-lease-time 600, otherwise there's no point in having this class. May be adding min-lease-time 600 to "pxe" will solve the issue, i haven't checked.
You can try modifying the dhcplease attribute in site table to the desired value.
Then running makedhcp -n will update dhcpd.conf with the shared-network block lease times set to your desired value.
dhcplease defines both min and max values, and the min value overrides max-lease-time in "pxe" class. If this is the intended behavior i have nothing else to say.