[16.0-stable] LPS Network Endpoint Enhancements and Signaling#5953
Merged
eriknordmark merged 6 commits intoMay 13, 2026
Conversation
See: lf-edge/eve-api#144 Signed-off-by: Milan Lenco <milan@zededa.com>
Mirror the controller-provisioned SystemAdapter.allow_local_modifications flag through dpcToProto so LPS can distinguish ports that accept local configuration from those managed exclusively by the controller, without having to infer it by trial-and-error via error_message. Signed-off-by: Milan Lenco <milan@zededa.com> (cherry picked from commit caca29d)
Open a long-lived GET /api/v1/signal stream to the Local Profile Server and, upon each incoming Signal message, immediately trigger the listed endpoints' pollers -- bypassing the ~1-minute periodic cadence while preserving it as the correctness fallback. This removes the minute-scale delay that operators previously saw between entering a config change in the LPS UI and EVE picking it up. The Signal handler runs as an additional LocalCmdAgent goroutine. Connection open is guarded by the existing startTask/runInterruptible/ endTask pattern used by the other pollers; the long body read runs without the task lock so it cannot block pause(). On URL change, UpdateLpsConfig cancels the in-flight stream and wakes the goroutine, which reconnects against the current LPS address. Dispatches are rate-limited (1 signal / 3s, burst 3). LPS 404 throttles reconnect attempts to once per hour. No watchdog is registered -- a legitimately long blocking Read must not trigger a device reboot. A new controllerconn.Client.OpenLocalStream helper provides the streaming HTTP client (reuses DialerWithResolverCache, adds TCP keepalive for dead-peer detection, disables HTTP keep-alive for clean connection teardown, and drops the per-request timeout that SendLocal applies). The existing triggerProfileGET is exported as TriggerProfileGET for symmetry with the other Trigger*POST helpers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Milan Lenco <milan@zededa.com> (cherry picked from commit 2af0c87)
Fire an immediate LPS Network-endpoint POST whenever a substantive change is detected in either the device port config list (handleDPCLImpl) or the device network status (handleDNSImpl), so the local operator sees the effect of a network config change right away instead of waiting for the next periodic post. A burst of updates during, e.g., DPC verification is naturally coalesced by the networkTicker's size-1 buffered channel: TickNow is a non-blocking send, so excess kicks arriving while a POST is already in flight or pending are dropped. Signed-off-by: Milan Lenco <milan@zededa.com> (cherry picked from commit 762ba1a)
Populate the new NetworkInfo.port_status field from DeviceNetworkStatus when EVE posts to the LPS Network endpoint, giving the local operator a view of the kernel-observed state of each network port (link up/down, MAC address, currently-assigned IP addresses, active default routers, effective DNS servers and search domain, NTP servers in use, and applied MTU) alongside the existing declarative config views. CIDR-formatted IP addresses require the interface's subnet mask, which DeviceNetworkStatus previously did not carry in AddrInfoList. Extend types.AddrInfo with a Mask field and populate it from the netlink address entry in DpcManager.updateDNS. Signed-off-by: Milan Lenco <milan@zededa.com> (cherry picked from commit bf9c56c)
Add timer.lps.<task>.interval config properties (profile, radio, appinfo, devinfo, network, appbootinfo) with defaults matching current hard-coded values, min 3s, max 1h. LocalCmdAgent initializes globalConfig with DefaultConfigItemValueMap() so all tasks use the correct default before the first real config arrives. Interval changes take effect immediately on the next UpdateGlobalConfig call without resetting throttle state. Signed-off-by: Milan Lenco <milan@zededa.com> (cherry picked from commit a307da3)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 16.0-stable #5953 +/- ##
===============================================
+ Coverage 19.52% 23.55% +4.02%
===============================================
Files 19 19
Lines 3021 2509 -512
===============================================
+ Hits 590 591 +1
+ Misses 2310 1787 -523
- Partials 121 131 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rene
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the EVE side of the API additions introduced in
lf-edge/eve-api#144.
Backport of #5904 (see the original PR for more detailed description)
Even though this is strictly speaking a new feature, we have to make an exception here and backport this to 16.0 anyway (for a customer).
How to test and validate this PR
See #5904 for detailed testing instructions.
Changelog notes
Low-latency LPS configuration updates. EVE can now receive near-instant
notifications from the Local Profile Server when new configuration is ready,
reducing the delay from up to 60 seconds to under 2 seconds. LPS
applications must implement the optional
GET /api/v1/signalstreamingendpoint to take advantage of this; existing LPS deployments without the
endpoint continue to work exactly as before.
Richer network status in LPS. EVE now reports the live kernel-observed
state of every network port to LPS on each network POST: link up/down,
assigned IP addresses (with subnet mask), default gateways, DNS and NTP
servers, and MTU. LPS applications can display this information to operators
without needing a separate management channel.
Per-port modification permission flag. LPS now knows which network ports
it is allowed to reconfigure (as provisioned by the controller), so it can
give operators clear feedback instead of a generic error when they attempt to
modify a controller-managed port.
Reactive LPS network updates. EVE now pushes an updated network POST to
LPS immediately when the device's network configuration or link state changes,
rather than waiting for the next periodic tick.
Tunable LPS polling intervals. All six LPS polling intervals (local
profile, radio, app info, device info, network, app boot info) can now be
adjusted via controller config properties. The defaults are unchanged.
Checklist