Bug 1212777

Summary: [doc] Issue in "Creating drop-in files"
Product: [openSUSE] PUBLIC SUSE Linux Enterprise Server 15 SP5 Reporter: Michal Koutný <mkoutny>
Component: DocumentationAssignee: Tomáš Bažant <tbazant>
Status: RESOLVED FIXED QA Contact: Frank Sundermeyer <fs>
Severity: Normal    
Priority: P5 - None CC: fbui, mkoutny
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: https://jira.suse.com/browse/DOCTEAM-1031
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Michal Koutný 2023-06-27 14:47:15 UTC
Creating drop-in files:

https://documentation.suse.com/sles/15-SP5/html/SLES-all/cha-systemd.html#sec-boot-systemd-custom-drop-in

The section currently talks about unit files but the concept of drop-in files generalizes to systemd config files too. (I.e. files like /etc/systemd/system.conf that configure systemd itself and not individual units).

1)
To make it more useful to readers it should mention usage of `systemd-analyze cat-config` as a way to inspect what drop-ins and in what order are applied for given config file. (Caveat: current version (249.16-150400.8.25.7) of systemd-analyze will show early drop-ins in wrong order. More on them below.)

2)
It should mention that SUSE ships systemd-default-settings (and others?) branding packages that modify the defaults. (Corollary: default value may divert from what systemd manpages say.)

3)
It may mention special treating of early drop-ins -- drop-in files whose name starts with double underscore and their purpose is to be of lower priority than "fragment" config files (e.g. /etc/systemd/system.conf) that are meant for site-local config values.

4)
The docs may discourage usage of "fragment" config files in favor of proper drop-in files for local modifications.
Comment 3 Franck Bui 2023-06-27 15:31:08 UTC
(In reply to Michal Koutný from comment #0)
> 3)
> It may mention special treating of early drop-ins -- drop-in files whose
> name starts with double underscore and their purpose is to be of lower
> priority than "fragment" config files (e.g. /etc/systemd/system.conf) that
> are meant for site-local config values.

If we document early drop-ins then we should emphasize that they're strictly reserved for SUSE usage only and SUSE reserves the right to drop their support at any time.
Comment 4 Franck Bui 2023-06-27 15:33:08 UTC
(In reply to Michal Koutný from comment #0)
> priority than "fragment" config files (e.g. /etc/systemd/system.conf) that
> are meant for site-local config values.

Not sure whether "fragment" is better than "main". The only place where I see the term "fragment" is in the source code of systemd.
Comment 5 Tomáš Bažant 2023-06-28 08:55:41 UTC
Thank you for reporting this bug!
It is being tracked and processed as part of our queue.
Comment 6 Franck Bui 2023-08-30 08:17:54 UTC
Tomas, I wrote a similar document and added it to the opensuse wiki: https://en.opensuse.org/Systemd#Configuration.

Feel free to reuse it for the SLE documentation.

Also I think that it shouldn't be tied to SP5+ but should apply to any older SPs too.
Comment 7 Franck Bui 2023-08-30 08:21:03 UTC
(In reply to Michal Koutný from comment #0)
> 3)
> It may mention special treating of early drop-ins -- drop-in files whose
> name starts with double underscore and their purpose is to be of lower
> priority than "fragment" config files (e.g. /etc/systemd/system.conf) that
> are meant for site-local config values.

Please do not mention early drop-ins. These have been introduced for the sole purpose of SUSE and they're going to removed anyways. I don't want to give to the customers the impression that keeping using main config files is safe.
Comment 8 Tomáš Bažant 2023-09-20 15:42:47 UTC
Progress is tracked in https://github.com/SUSE/doc-sle/pull/1595
@Franck @Michal, can you review pls?
Comment 9 Franck Bui 2023-09-21 12:51:58 UTC
(In reply to Tomáš Bažant from comment #8)
> Progress is tracked in https://github.com/SUSE/doc-sle/pull/1595
> @Franck @Michal, can you review pls?

Done.
Comment 10 Tomáš Bažant 2023-09-25 17:51:20 UTC
fixed by https://github.com/SUSE/doc-sle/tree/main