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

Fixed a typo in what order drop-ins are being parsed. #125

Closed
wants to merge 1 commit into from

Conversation

ipanova
Copy link
Contributor

@ipanova ipanova commented Oct 25, 2024

No description provided.

* drop-ins have precedence over main config
* /etc has precedence over /usr

Signed-off-by: Ina Panova <[email protected]>
Copy link
Member

@keszybz keszybz left a comment

Choose a reason for hiding this comment

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

No. The point of the original text is that b.conf is after a.conf, even when one is under /etc and the other one under /usr/lib.

@keszybz keszybz closed this Oct 25, 2024
@ipanova
Copy link
Contributor Author

ipanova commented Oct 25, 2024

@keszybz These specs contradict to what is being written. It says /etc takes precedence over /usr so tell me how this is right then?
For example, in addition to parsing /etc/foo/bar.conf, /etc/foo/bar.conf.d/a.conf and /usr/lib/foo/bar.conf.d/b.conf must also be parsed, in this order.

@keszybz
Copy link
Member

keszybz commented Oct 25, 2024

"/etc over /usr" is the general principle, but there are various extensions/overrides. Drop-ins as a whole are used to override other configuration, so drop-ins are ordered after the main configuration file, no matter where it resides. The paragraph about dropin ordering describes how they are ordered, and this example matches that.

@ipanova
Copy link
Contributor Author

ipanova commented Oct 25, 2024

@keszybz You are saying that if i have also have these configs /usr/lib/foo/bar.conf and /usr/lib/foo/bar.conf.d/a.conf
It will go in the following order?

/usr/lib/foo/bar.conf
/etc/foo/bar.conf
/usr/lib/foo/bar.conf.d/a.conf
/etc/foo/bar.conf.d/a.conf
/usr/lib/foo/bar.conf.d/b.conf

@keszybz
Copy link
Member

keszybz commented Oct 25, 2024

Not exactly. The files with the same name override each other. So the order is as you listed, but the crossed out files are ignored:

/usr/lib/foo/bar.conf
/etc/foo/bar.conf
/usr/lib/foo/bar.conf.d/a.conf
/etc/foo/bar.conf.d/a.conf
/usr/lib/foo/bar.conf.d/b.conf

@ipanova
Copy link
Contributor Author

ipanova commented Oct 25, 2024

If you find it useful I could add this example ( since it's more versatile) to the docs in the drop-ins section. Lmk.

@keszybz
Copy link
Member

keszybz commented Oct 25, 2024

Yes, please do.

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

Successfully merging this pull request may close these issues.

2 participants