redis_ippool.renew is not able to update lease time
I am seeing below issue with redis_ippool.renew for dhcp-request. IP is offered(discover-offer phase) by redis_ippool.allocate: Debug : (3) Received Discover XID 18c39c7b from 127.0.0.1:6768 to 127.0.0.1:6767 via lo Debug : (3) Opcode = Client-Message Debug : (3) Hardware-Type = Ethernet Debug : (3) Hardware-Address-Length = 6 Debug : (3) Hop-Count = 0 Debug : (3) Transaction-Id = 415472763 Debug : (3) Number-of-Seconds = 0 Debug : (3) Flags = 0 Debug : (3) Client-IP-Address = 0.0.0.0 Debug : (3) Your-IP-Address = 0.0.0.0 Debug : (3) Server-IP-Address = 0.0.0.0 Debug : (3) Gateway-IP-Address = 0.0.0.0 Debug : (3) Client-Hardware-Address = 01:01:bc:11:22:33 Debug : (3) Message-Type = Discover Debug : (3) Client-Identifier = 0x0101bc112233 Debug : (3) Parameter-Request-List = Vendor Debug : (3) Parameter-Request-List = NIS-Servers Debug : (3) Parameter-Request-List = Subnet-Mask Debug : (3) Parameter-Request-List = Router-Address Debug : (3) Parameter-Request-List = Domain-Name-Server Debug : (3) Maximum-Msg-Size = 1500 Debug : (3) Vendor-Class-Identifier = 0x766961736174312e30 Debug : (3) Relay-Agent-Information { Debug : (3) Subscriber-Id = 0101bc112233@aut.res.viasat.com<mailto:0101bc112233@aut.res.viasat.com> Debug : (3) Remote-Id = 0x0101bc112233 Debug : (3) Circuit-Id = 0x00a0bc332211 Debug : (3) } Debug : (3) Network-Subnet = 0.0.0.0/32 Debug : (3) Packet-Type = Discover Debug : (3) Running 'recv Discover' from file /etc/raddb/sites-enabled/dhcp Debug : (3) recv Discover { ... ... Debug : (3) redis_ippool - Allocating lease from pool "naw01_healthcheck_VSAT-UT", to "01:01:bc:11:22:33_01:01:bc:11:22:33_0x0101bc112233", expires in 120s Debug : (3) redis_ippool - Reserved connection (0) Debug : (3) redis_ippool - [1] >>> Sending command(s) to 10.43.16.101:6379 Debug : (3) redis_ippool - [1] <<< Returned: success Debug : (3) redis_ippool - Released connection (0) Debug : (3) redis_ippool - &reply.Your-IP-Address := 169.254.0.224 Debug : (3) redis_ippool - &reply.IP-Address-Lease-Time := 120 Debug : (3) redis_ippool - IP address lease allocated Debug : (3) redis_ippool.allocate (updated) But during request-ack phase, getting "requested ip not in the pool error" for redis_ippool.renew/redis_ippool.update: Debug : (4) dhcp { Debug : (4) Received Request XID 0805ae2e from 127.0.0.1:6768 to 127.0.0.1:6767 via lo Debug : (4) Opcode = Client-Message Debug : (4) Hardware-Type = Ethernet Debug : (4) Hardware-Address-Length = 6 Debug : (4) Hop-Count = 0 Debug : (4) Transaction-Id = 134589998 Debug : (4) Number-of-Seconds = 0 Debug : (4) Flags = 0 Debug : (4) Client-IP-Address = 0.0.0.0 Debug : (4) Your-IP-Address = 0.0.0.0 Debug : (4) Server-IP-Address = 0.0.0.0 Debug : (4) Gateway-IP-Address = 0.0.0.0 Debug : (4) Client-Hardware-Address = 01:01:bc:11:22:33 Debug : (4) Message-Type = Request Debug : (4) Client-Identifier = 0x0101bc112233 Debug : (4) Parameter-Request-List = Vendor Debug : (4) Parameter-Request-List = NIS-Servers Debug : (4) Parameter-Request-List = Subnet-Mask Debug : (4) Parameter-Request-List = Router-Address Debug : (4) Parameter-Request-List = Domain-Name-Server Debug : (4) Maximum-Msg-Size = 1500 Debug : (4) Vendor-Class-Identifier = 0x766961736174312e30 Debug : (4) Relay-Agent-Information { Debug : (4) Subscriber-Id = 0101bc112233@aut.res.viasat.com<mailto:0101bc112233@aut.res.viasat.com> Debug : (4) Remote-Id = 0x0101bc112233 Debug : (4) Circuit-Id = 0x00a0bc223344 Debug : (4) } Debug : (4) Requested-IP-Address = 169.254.0.224 Debug : (4) Server-Identifier = 10.43.18.51 Debug : (4) Network-Subnet = 0.0.0.0/32 Debug : (4) Packet-Type = Request Debug : (4) Running 'recv Request' from file /etc/raddb/sites-enabled/dhcp Debug : (4) recv Request { ... ... Debug : (4) redis_ippool - Updating 169.254.0.224 in pool "naw01_healthcheck_VSAT-UT", device "01:01:bc:11:22:33_01:01:bc:11:22:33_0x0101bc112233", expires in 900s Debug : (4) redis_ippool - Reserved connection (0) Debug : (4) redis_ippool - [1] >>> Sending command(s) to 10.43.16.101:6379 Debug : (4) redis_ippool - [1] <<< Returned: success Debug : (4) redis_ippool - Released connection (0) ERROR : (4) redis_ippool - ERROR: Requested IP address "169.254.0.224" is not a member of the specified pool Debug : (4) redis_ippool.renew (notfound) But that pool has that IP address in redis-db:
zscore {naw01_healthcheck_VSAT-UT}:pool 169.254.0.224
1704264141.0 I am using latest master(4.x) branch(dated Dec 17 2023. #104f1d2422f6dadc5526c92666a285cc01519907). Regards, Nagamani Chinnapaiyan
On 03/01/2024 06:53, Chinnapaiyan, Nagamani wrote:
Debug : (4) redis_ippool - Updating 169.254.0.224 in pool "naw01_healthcheck_VSAT-UT", device "01:01:bc:11:22:33_01:01:bc:11:22:33_0x0101bc112233", expires in 900s
Debug : (4) redis_ippool - Reserved connection (0)
Debug : (4) redis_ippool - [1] >>> Sending command(s) to 10.43.16.101:6379
Debug : (4) redis_ippool - [1] <<< Returned: success
Debug : (4) redis_ippool - Released connection (0)
ERROR : (4) redis_ippool - ERROR: Requested IP address "169.254.0.224" is not a member of the specified pool
Debug : (4) redis_ippool.renew (notfound)
But that pool has that IP address in redis-db:
zscore {naw01_healthcheck_VSAT-UT}:pool 169.254.0.224 1704264141.0
Check your redis_ippool module configuration. As your redis query shows, the IPv4 address is stored as a string. There is a module option "ipv4_integer" which will cause IPv4 addresses to be cast to integers during updates. Setting that to "yes" when your addresses are stored as strings will result in the error you are seeing. Either set the option to "no" or remove it - the default is "no" Nick -- Nick Porter
Thanks Nick. When I comment ipv4_integer in the module, I see ‘cast’ error. But lease is updated in the db. Debug : (21) redis_ippool - Updating 169.254.0.91 in pool "naw01_healthcheck_VSAT-UT", device "01:01:bc:11:22:33_01:01:bc:11:22:33_0x0101bc112233", expires in 900s Debug : (21) redis_ippool - Reserved connection (0) Debug : (21) redis_ippool - [1] >>> Sending command(s) to 10.43.16.101:6379 Debug : (21) redis_ippool - [1] <<< Returned: success Debug : (21) redis_ippool - Released connection (0) Debug : (21) redis_ippool - &reply.IP-Address-Lease-Time := 900 Debug : (21) redis_ippool - Requested IP address' "169.254.0.91" lease updated ERROR : (21) redis_ippool - ERROR: Implicit cast failed: Invalid cast from combo-ip to ipaddr. Unsupported Debug : (21) redis_ippool.renew (fail) Regards, Nagamani Chinnapaiyan
participants (3)
-
Alan DeKok -
Chinnapaiyan, Nagamani -
Nick Porter