Skip to content
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

pillar/device-steps.sh: fix global NTPSERVER var initialization #4053

Merged
merged 4 commits into from
Jul 10, 2024

Conversation

rouming
Copy link
Contributor

@rouming rouming commented Jul 3, 2024

A few commits target the following:

  1. On NTP servers restart NTPSERVER variable should be assigned, otherwise chrony will be reloaded with same values.
  2. Handle absence of the DeviceNetworkStatus/global.json correctly and return default pool.
  3. Make NTP servers sorted and uniq
  4. Make error path of the dialUnixWithChronyd() cleaner by moving socket cleanup directly into the function.

@rouming rouming requested a review from eriknordmark as a code owner July 3, 2024 13:19
@rouming rouming requested a review from milan-zededa July 3, 2024 13:50
Copy link
Contributor

@milan-zededa milan-zededa left a comment

Choose a reason for hiding this comment

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

LGTM, but let's wait for #4051 to fix the build, then we will run the tests.

rouming added 2 commits July 4, 2024 15:18
On NTP servers restart NTPSERVER variable should be assigned,
otherwise chrony will be reloaded with same values.

Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
If DeviceNetworkSatus/global.json is absent (race), handle empty string
correctly and replace it with the default NTP pool.

Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
rouming added 2 commits July 4, 2024 17:10
This commit ensures NTP servers are sorted and unique, so
we avoid spurios NTP servers reload and do not try to add
duplicates.

Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Make error path of the `dialUnixWithChronyd()` cleaner by
moving socket cleanup directly into the function.

Also remove socket in case of `chmod()` error.

Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
pkg/pillar/cmd/zedagent/handlentp.go Outdated Show resolved Hide resolved
pkg/pillar/cmd/zedagent/handlentp.go Outdated Show resolved Hide resolved
@rouming rouming added the bug Something isn't working label Jul 8, 2024
@milan-zededa
Copy link
Contributor

Tests passed OK (apart from smoke tests which is fixed in the latest master).

@milan-zededa milan-zededa merged commit 7ad49e3 into lf-edge:master Jul 10, 2024
33 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants