Stop publishing deprecated ZInfoDevice.Network#5283
Conversation
|
Keeping this as Draft while we continue testing end-to-end against the commercial controller... |
|
Tested end-to-end, no issues found, marking as ready for review. |
|
I need to make a few small changes in Eden, which is currently using and depending on that obsolete network information. Until those changes are made, some tests (actually just |
|
Keeping this in the draft state until #5299 is merged. |
ZInfoDevice.Network (ZInfoNetwork) was deprecated more than five years ago in favour of ZInfoDevice.SystemAdapter (SystemAdapterInfo). Since the deprecation, most newly added network fields have been placed in SystemAdapterInfo. Some fields were duplicated into ZInfoNetwork for backwards compatibility, but a number of newer fields exist only in SystemAdapterInfo. The API explicitly states: ``` // OBSOLETE. The information will be provided by DevicePort instead. // Newer versions will not fill in this information. Controller needs // to check if this is empty - if yes, use the DevicePortStatus instead. repeated ZInfoNetwork network = 13; ``` The commercial controller implementation follows this guidance: if ZInfoDevice.Network is non-empty, it uses it **instead of** reading SystemAdapterInfo. As a result, publishing a non-nil ZInfoNetwork can cause controllers to miss fields present only in SystemAdapterInfo. To ensure controllers observe the up-to-date network information, stop publishing ZInfoDevice.Network. This forces controllers to read SystemAdapterInfo (where current fields live) rather than relying on the deprecated ZInfoNetwork. Signed-off-by: Milan Lenco <[email protected]>
e0b9299 to
6fa6c8c
Compare
|
Returning back to ready-for-merge state, eden tests should now pass... |
|
@milan-zededa , did we bump Eden version in EVE repo? edit: found PR |
|
Yetus mumbles something useless again: |
Description
ZInfoDevice.Network (
ZInfoNetwork) was deprecated more than five years ago in favour of ZInfoDevice.SystemAdapter (SystemAdapterInfo).Since the deprecation, most newly added network fields have been placed in
SystemAdapterInfo. Some fields were duplicated intoZInfoNetworkfor backwards compatibility, but a number of newer fields exist only inSystemAdapterInfo.The API explicitly states:
The commercial controller implementation follows this guidance: as long as the deprecated
ZInfoDevice.Networkis published non-empty, it uses it instead of reading the preferredSystemAdapterInfo. As a result, publishing a non-nilZInfoNetworkcan cause controllers to miss fields present only inSystemAdapterInfo(config_source,mtu,domainname).To ensure controllers observe the up-to-date network information, stop publishing
ZInfoDevice.Network. This forces controllers to readSystemAdapterInfo(where current fields live) rather than relying on the deprecatedZInfoNetwork.How to test and validate this PR
Deploy an edge node and verify that the controller correctly reports (via its API and UI) all network adapter status fields, including IP addresses assigned, MAC address, MTU, configuration source, and DNS information. Ideally, perform this check across all types of network adapters: Ethernet, cellular, Wi-Fi, and VLAN.
Changelog notes
Stop publishing deprecated
ZInfoDevice.Network, forcing the controller to switch toSystemAdapterInfo, which contains additional network fields added after the deprecation.PR Backports
This change is required only for the upcoming LTS release to ensure that the recently added config_source field in SystemAdapterInfo is correctly processed by the controller. For older LTS versions, it is preferable to keep the existing EVE behavior for network info publishing unchanged.
Checklist