[Kea-users] Stork does not see new dhcp4 subnet

Marcin Siodelski marcin at isc.org
Wed Sep 6 19:52:30 UTC 2023


This log is only an evidence that the new subnet hasn't been pulled from 
the Kea server into the Stork database. The stats periodically returned 
to Stork contain the stats for this subnet but Stork doesn't seem to 
know that this subnet exists, and logs this error.

This is, however, a result rather than the cause of the issue. Without 
looking into the Stork logs from the time when this subnet was added to 
Kea, we don't know what went wrong with it.

The subnet definition snippet below looks correct. I took this snippet 
and put into the local Kea instance configuration on my system. My Stork 
instance correctly pulled the subnet information from Kea.

As I earlier suggested, it would be good to verify that this subnet is 
visible in Stork when you navigate to the Raw JSON configuration view 
for that Kea server. Then, check the logs from the time when the subnet 
was pulled from Kea to Stork. If it is hard to find in the historic 
logs, perhaps you could reconfigure your Kea server without changing the 
effective configuration (e.g., it should suffice to add or remove 
whitespace into the pool definition string "10.16.0.2-10.16.0.3" and 
restart Kea). Stork should treat it as a configuration change and try to 
pull the subnets again. Observe the Stork server logs and check if there 
are any errors or warnings when the subnets are fetched after Kea 
reconfiguration.

Marcin

On 5.09.2023 19:57, Apu wrote:
> Stork is reporting
> 
> Sep  5 11:42:33 ip1-mc stork-server[1045]: time="2023-09-05 11:42:33" 
> level="error" msg="cannot find LocalSubnet for app: 1, local subnet ID: 
> 16, family: 4" file="      statspuller.go:249  "
> 
> Sep  5 11:42:33 ip1-mc stork-server[1045]: time="2023-09-05 11:42:33" 
> level="error" msg="Error handling stat-lease4-get response: cannot find 
> LocalSubnet for app: 1, local subnet ID: 16, family: 
> 4\nisc.org/stork/server/apps/kea.(*StatsPuller).storeDaemonStats\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:248\nisc.org/stork/server/apps/kea.(*StatsPuller).processAppResponses\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:374\nisc.org/stork/server/apps/kea.(*StatsPuller).getStatsFromApp\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:348\nisc.org/stork/server/apps/kea.(*StatsPuller).pullStats\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:63\nisc.org/stork/server/agentcomm.NewPeriodicPuller.func1\n\t/builds/isc-projects/stork/backend/server/agentcomm/puller.go:42\nisc.org/stork/util.(*PeriodicExecutor).executorLoop\n\t/builds/isc-projects/stork/backend/util/periodicexecutor.go:167\nruntime.goexit\n\t/builds/isc-projects/stork/tools/golang/go/src/runtime/asm_amd64.s:1594" file="      statspuller.go:376  "
> 
> Sep  5 11:42:33 ip1-mc stork-server[1045]: time="2023-09-05 11:42:33" 
> level="error" msg="Error occurred while getting stats from app 1: cannot 
> find LocalSubnet for app: 1, local subnet ID: 16, family: 
> 4\nisc.org/stork/server/apps/kea.(*StatsPuller).storeDaemonStats\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:248\nisc.org/stork/server/apps/kea.(*StatsPuller).processAppResponses\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:374\nisc.org/stork/server/apps/kea.(*StatsPuller).getStatsFromApp\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:348\nisc.org/stork/server/apps/kea.(*StatsPuller).pullStats\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:63\nisc.org/stork/server/agentcomm.NewPeriodicPuller.func1\n\t/builds/isc-projects/stork/backend/server/agentcomm/puller.go:42\nisc.org/stork/util.(*PeriodicExecutor).executorLoop\n\t/builds/isc-projects/stork/backend/util/periodicexecutor.go:167\nruntime.goexit\n\t/builds/isc-projects/stork/tools/golang/go/src/runtime/asm_amd64.s:1594" file="      statspuller.go:66   "
> 
> Sep  5 11:42:33 ip1-mc stork-server[1045]: time="2023-09-05 11:42:33" 
> level="error" msg="Errors were encountered while pulling data from apps: 
> cannot find LocalSubnet for app: 1, local subnet ID: 16, family: 
> 4\nisc.org/stork/server/apps/kea.(*StatsPuller).storeDaemonStats\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:248\nisc.org/stork/server/apps/kea.(*StatsPuller).processAppResponses\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:374\nisc.org/stork/server/apps/kea.(*StatsPuller).getStatsFromApp\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:348\nisc.org/stork/server/apps/kea.(*StatsPuller).pullStats\n\t/builds/isc-projects/stork/backend/server/apps/kea/statspuller.go:63\nisc.org/stork/server/agentcomm.NewPeriodicPuller.func1\n\t/builds/isc-projects/stork/backend/server/agentcomm/puller.go:42\nisc.org/stork/util.(*PeriodicExecutor).executorLoop\n\t/builds/isc-projects/stork/backend/util/periodicexecutor.go:167\nruntime.goexit\n\t/builds/isc-projects/stork/tools/golang/go/src/runtime/asm_amd64.s:1594" file=" periodicexecutor.go:170  "
> 
> 
> 
> 
> This is the subnet declaration we added which is handing out IP 
> addresses and grafana is happy to graph.  Just a small test pool for 
> starters until everything is working and we swap out the "ip 
> helper-address" statements to point away from the ISC DHCP servers. 
> (Full config attached, with some redactions.)
> 
>        {
>          "id": 16,
>          "subnet": "10.16.0.0/24",
>          "option-data": [
>            {
>              "space": "dhcp4",
>              "name": "routers",
>              "code": 3,
>              "data": "10.16.1.1"
>            },
>            {
>              "space": "dhcp4",
>              "name": "subnet-mask",
>              "code": 1,
>              "data": "255.255.0.0"
>            },
>            {
>              "space": "dhcp4",
>              "name": "broadcast-address",
>              "code": 28,
>              "data": "10.16.255.255"
>            }
>      ],
>          "pools": [
>            {
>              "pool": "10.16.0.2 - 10.16.0.3"
>            }
>      ]
>        },
> 
> 
> 



More information about the Kea-users mailing list