Skip to content

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christoph-zededa
Copy link
Contributor

@christoph-zededa christoph-zededa commented Aug 18, 2025

Description

pillar: report device name to controller/LOC

a DeviceInfoMsg is used for that

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):

  • 14.5-stable: no
  • 13.4-stable: no

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

And the last but not least:

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

Please, check the boxes above after submitting the PR in interactive mode.

@@ -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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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]>
@christoph-zededa christoph-zededa force-pushed the loc_publish_device_name_in_device_info branch from a549639 to 042062f Compare August 19, 2025 10:30
@github-actions github-actions bot requested a review from milan-zededa August 19, 2025 10:31
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@milan-zededa
Copy link
Contributor

@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.

@christoph-zededa christoph-zededa marked this pull request as draft August 22, 2025 14:24
@christoph-zededa
Copy link
Contributor Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants