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

conf-parse: make config_parse_many() optionally save 'struct stat' for each file #21114

Merged
merged 1 commit into from Oct 27, 2021

Conversation

yuwata
Copy link
Member

@yuwata yuwata commented Oct 25, 2021

Fixes #21113.

@wak-google
Copy link

This works as a resolution for #21113

geissonator pushed a commit to openbmc/openbmc that referenced this pull request Oct 25, 2021
Currently, systemd only uses the timestamp of the most recent file for
tracking changes to configurations. With multiple drop-in files this
results in reloads not picking up changes to older files. This patch
fixes the reload behavior.

Issue: systemd/systemd#21113
In-Review: systemd/systemd#21114
Change-Id: I9b92995e0d7faa612b51bfd45dd33803cd566441
Signed-off-by: William A. Kennington III <wak@google.com>
Copy link
Member

@poettering poettering left a comment

Choose a reason for hiding this comment

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

lgtm, just some nitpicking about a function name

@@ -580,6 +580,28 @@ int network_load(Manager *manager, OrderedHashmap **networks) {
return 0;
}

static bool stats_by_path_equal(Hashmap *a, Hashmap *b) {
Copy link
Member

Choose a reason for hiding this comment

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

is "equal" really the right name for this? maybe "_unmodified"?

Copy link
Member Author

Choose a reason for hiding this comment

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

For me, "equal" sounds suitable for "stats", and "unmodified" sounds suitable for "file" (or "path").
So, I prefer "equal" here. But not strong opinion. If you or others prefer "unmodified", then I will rename it.

@yuwata
Copy link
Member Author

yuwata commented Oct 27, 2021

@poettering Thank you for you review. I'd like to keep the function name at least in this PR. I am planning the Hashmap introduced in this PR make also used in PID1. So, I will re-consider the function name if it can be reused and moved to e.g. stat-util.[ch]. Merging.

@yuwata yuwata merged commit 8524db5 into systemd:main Oct 27, 2021
@yuwata yuwata deleted the conf-parse-stat branch October 27, 2021 10:50
jamin-aspeed pushed a commit to AspeedTech-BMC/openbmc that referenced this pull request Jan 24, 2022
Currently, systemd only uses the timestamp of the most recent file for
tracking changes to configurations. With multiple drop-in files this
results in reloads not picking up changes to older files. This patch
fixes the reload behavior.

Issue: systemd/systemd#21113
In-Review: systemd/systemd#21114
Change-Id: I9b92995e0d7faa612b51bfd45dd33803cd566441
Signed-off-by: William A. Kennington III <wak@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

networkd not reloading / reconfiguring new addresses on interface
3 participants