Repository navigation
Management warns at every start about peer update interval variables that are optional and undocumented #8197
Unanswered
chad-loder
asked this question in
Issue Triage
Replies: 1 comment
|
Confirmed on
If you just want clean logs now, set both: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before posting
Affected area
Management service / API, Self-hosting / Deployment
Deployment type
Self-hosted - advanced/custom deployment
Operating system or environment
Linux, Docker
NetBird version and upgrade status
management/internals/controllers/network_map/controller/controller.go,StartWarmup).Did this work before?
Not sure
Regression details
No response
Summary
StartWarmupparsesNB_PEER_UPDATE_INTERVAL_MSandNB_PEER_UPDATE_STARTUP_PERIOD_Swithstrconv.Atoiand logs a parse warning whenever that fails, including when the variable is simply not set. Neither variable appears in the docs or the setup files, so a default deployment logs a warning on every start for a setting it has no reason to know about.Current behavior
NB_PEER_UPDATE_INTERVAL_MSunset:failed to parse peer update interval, using default value 1ms: strconv.Atoi: parsing "": invalid syntax, and the update buffer stays at 1 ms.NB_PEER_UPDATE_INTERVAL_MSset (for example to 1000) andNB_PEER_UPDATE_STARTUP_PERIOD_Sunset: on every start,failed to parse peer update startup period, using default value 1s: strconv.Atoi: parsing "": invalid syntax(levelwarning,controller.go:898in 0.77.0).Expected behavior
An unset optional variable takes its default without a warning; a warning only when the variable is set to something that does not parse. And the two variables documented for self-hosters, with their defaults (1 ms buffer, 1 s startup period) and what the startup period does (the buffer starts at ten times the interval and drops to the interval once the period ends).
Steps to reproduce
NB_PEER_UPDATE_INTERVAL_MS=1000set: the startup period warning appears once per start.Environment and topology
Management in its own container with a PostgreSQL store. The behavior does not depend on topology.
Self-hosted details, if available
No response
Logs, status output, or debug evidence
The two warning lines above, from the management log (JSON format).
Related issues or discussions
None found.
Possible change
If the direction is agreed: in
StartWarmup, read each variable withos.LookupEnvand warn only when it is present and fails to parse; no other behavior change. I'd be happy to put up a PR for this, along with a docs note for the two variables, once the approach is accepted.All reactions