-
-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Summary: A client in a vlan/subnet first requests and gets a dhcp lease from the correct scope, but eventually Gravity says the client "changed request scope" and assigns a dhcp lease from another scope.
Client MAC address: 00:50:56:81:be:50
Correct scope: "container-dev", CIDR 192.168.212.0/23
Incorrect scope: "container", CIDR 192.168.210.0/23
Before the first request, the client has a reservation in "container-dev". The entire chain of events below.
Ubuntu 22 dhcp client releases lease and requests a new one, dhclient -r && dhclient -v, Gravity assigns a lease in the correct scope (yourIPAddr=192.168.212.89)
INF ts=1730316456.3392339 logger=role.dhcp msg=DHCP packet instance=gravity-ipm01 version=0.13.3-c083d3e3 request=18b18d8e-6fff-4b2f-87cb-27ad16257dd7-0x7cb6fc70 deviceIdentifier=00:50:56:81:be:50 opCode=BootRequest hopCount=1 transactionID=0x7cb6fc70 flagsToString=Unicast clientIPAddr=0.0.0.0 yourIPAddr=0.0.0.0 serverIPAddr=0.0.0.0 gatewayIPAddr=192.168.212.1 hostname=k8stestworker01 clientIdentifier= messageType=DISCOVER client=192.168.212.1:67
INF ts=1730316456.3393786 logger=role.dhcp msg=DHCP packet instance=gravity-ipm01 version=0.13.3-c083d3e3 request=18b18d8e-6fff-4b2f-87cb-27ad16257dd7-0x7cb6fc70 deviceIdentifier=00:50:56:81:be:50 opCode=BootReply hopCount=0 transactionID=0x7cb6fc70 flagsToString=Unicast clientIPAddr=0.0.0.0 yourIPAddr=192.168.212.89 serverIPAddr=192.168.210.2 gatewayIPAddr=192.168.212.1 hostname=k8stestworker01 clientIdentifier= messageType=OFFER
INF ts=1730316456.3406374 logger=role.dhcp msg=DHCP packet instance=gravity-ipm01 version=0.13.3-c083d3e3 request=84fe3508-1d43-4619-9abe-d79eda1f7ceb-0x7cb6fc70 deviceIdentifier=00:50:56:81:be:50 opCode=BootRequest hopCount=1 transactionID=0x7cb6fc70 flagsToString=Unicast clientIPAddr=0.0.0.0 yourIPAddr=0.0.0.0 serverIPAddr=0.0.0.0 gatewayIPAddr=192.168.212.1 hostname=k8stestworker01 clientIdentifier= messageType=REQUEST client=192.168.212.1:67
INF ts=1730316456.35251 logger=role.dhcp msg=DHCP packet instance=gravity-ipm01 version=0.13.3-c083d3e3 request=84fe3508-1d43-4619-9abe-d79eda1f7ceb-0x7cb6fc70 deviceIdentifier=00:50:56:81:be:50 opCode=BootReply hopCount=0 transactionID=0x7cb6fc70 flagsToString=Unicast clientIPAddr=0.0.0.0 yourIPAddr=192.168.212.89 serverIPAddr=192.168.210.2 gatewayIPAddr=192.168.212.1 hostname=k8stestworker01 clientIdentifier= messageType=ACK
After a few minutes, I've done absolutely nothing on the client or in Gravity, this is logged (looks like a request renewal). Still gets the same lease in the correct scope
INF ts=1730317044.966854 logger=role.dhcp msg=DHCP packet instance=gravity-ipm01 version=0.13.3-c083d3e3 request=e87109a9-0cd8-4cf3-8026-6add791a2130-0x3a2e2f6f deviceIdentifier=00:50:56:81:be:50 opCode=BootRequest hopCount=1 transactionID=0x3a2e2f6f flagsToString=Unicast clientIPAddr=192.168.212.84 yourIPAddr=0.0.0.0 serverIPAddr=0.0.0.0 gatewayIPAddr=192.168.212.1 hostname=k8stestworker01 clientIdentifier=ff9f6e852400020000ab11a4750df60700c351 messageType=REQUEST client=192.168.212.1:67
INF ts=1730317044.9784868 logger=role.dhcp msg=DHCP packet instance=gravity-ipm01 version=0.13.3-c083d3e3 request=e87109a9-0cd8-4cf3-8026-6add791a2130-0x3a2e2f6f deviceIdentifier=00:50:56:81:be:50 opCode=BootReply hopCount=0 transactionID=0x3a2e2f6f flagsToString=Unicast clientIPAddr=0.0.0.0 yourIPAddr=192.168.212.89 serverIPAddr=192.168.210.2 gatewayIPAddr=192.168.212.1 hostname=k8stestworker01 clientIdentifier=ff9f6e852400020000ab11a4750df60700c351 messageType=ACK
After a couple of minutes again, now the interesting stuff happens. Still doing nothing on the client or in Gravity. Client appears to renew the request, this time Gravity changes the scope to the incorrect one and leases out (yourIPAddr=192.168.210.86).
INF ts=1730317182.8058558 logger=role.dhcp msg=DHCP packet instance=gravity-ipm01 version=0.13.3-c083d3e3 request=50656f99-aa69-4258-a93c-41037e6e3f07-0xd00c552b deviceIdentifier=00:50:56:81:be:50 opCode=BootRequest hopCount=0 transactionID=0xd00c552b flagsToString=Unicast clientIPAddr=192.168.212.89 yourIPAddr=0.0.0.0 serverIPAddr=0.0.0.0 gatewayIPAddr=0.0.0.0 hostname=k8stestworker01 clientIdentifier= messageType=REQUEST client=192.168.212.89:68
INF ts=1730317182.8063526 logger=role.dhcp msg=Re-assigning address for lease due to changed request scope instance=gravity-ipm01 version=0.13.3-c083d3e3 identifier=00:50:56:81:be:50 newIP=192.168.210.86
INF ts=1730317182.8250089 logger=role.dhcp msg=DHCP packet instance=gravity-ipm01 version=0.13.3-c083d3e3 request=50656f99-aa69-4258-a93c-41037e6e3f07-0xd00c552b deviceIdentifier=00:50:56:81:be:50 opCode=BootReply hopCount=0 transactionID=0xd00c552b flagsToString=Unicast clientIPAddr=0.0.0.0 yourIPAddr=192.168.210.86 serverIPAddr=192.168.210.2 gatewayIPAddr=0.0.0.0 hostname=k8stestworker01 clientIdentifier= messageType=ACK
Refreshing Scope views in Gravity, the reservation for 00:50:56:81:be:50 has now moved from the correct scope "container-dev" to the incorrect one "container". Interesting to see all this is happening automatically, I'm just watching the show.