Skip to content

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

Closed
ipanova wants to merge 1 commit into
uapi-group:mainfrom
ipanova:order
Closed

ipanova wants to merge 1 commit into
uapi-group:mainfrom
ipanova:order

Conversation

@ipanova

@ipanova ipanova commented Oct 25, 2024

Copy link
Copy Markdown
Contributor

No description provided.

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

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

@keszybz keszybz left a comment

Copy link
Copy Markdown
Member

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

ipanova commented Oct 25, 2024 •

Copy link
Copy Markdown
Contributor Author

@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

keszybz commented Oct 25, 2024

Copy link
Copy Markdown
Member

"/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

ipanova commented Oct 25, 2024 •

Copy link
Copy Markdown
Contributor Author

@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

keszybz commented Oct 25, 2024

Copy link
Copy Markdown
Member

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

ipanova commented Oct 25, 2024

Copy link
Copy Markdown
Contributor Author

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

keszybz commented Oct 25, 2024

Copy link
Copy Markdown
Member

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