-
Notifications
You must be signed in to change notification settings - Fork 173
pillar: report device name to controller/LOC #5186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
pillar: report device name to controller/LOC #5186
Conversation
@@ -885,6 +899,11 @@ func getLatestConfig(getconfigCtx *getconfigContext, iteration int, | |||
url = controllerconn.URLPathString(locURL, ctrlClient.UsingV2API(), | |||
devUUID, "compound-config") | |||
|
|||
// send an initial DeviceInfoMsg to inform LOC about device name, enterprise and project | |||
if !getconfigCtx.sideControllerSentInitialDeviceInfoMsg.Swap(true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? I believe EVE publishes ZInfoDevice fairly often, so LOC should receive it quite early.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It normally only publishes if something changed.
Actually I am thinking whether I should publish more often, in case LOC restarts (f.e. because of a crash).
Btw. it only sends the message to the LOC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If LOC is unconfigured and later reconfigured, sideControllerSentInitialDeviceInfoMsg
is never reset to false
. Regardless, it might make sense to periodically publish device information to LOC instead, for the reasons you pointed out.
a DeviceInfoMsg is used for that Signed-off-by: Christoph Ostarek <[email protected]>
a549639
to
042062f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@christoph-zededa @eriknordmark Unfortunately, my eve-api PR introduced an import cycle that I need to resolve before you can update the eve-api dependency and bring in your changes (that were merged later). I am already testing a fix, but it will only be ready next week. Until then, we need to put this PR on hold. |
Sure, I marked it as draft. |
Description
PR dependencies
lf-edge/eve-api#109
How to test and validate this PR
Check if device name, enterprise and project are set in the DeviceInfoMsg.
Changelog notes
report device name to controller/LOC
PR Backports
For all current LTS branches, please state explicitly if this PR should be
backported or not. This section is used by our scripts to track the backports,
so, please, do not omit it.
Here is the list of current LTS branches (it should be always up to date):
Checklist
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.