[Bug 1188915] New: dracut does not recognize hostonly="no" setting in /etc/dracut.conf
https://bugzilla.suse.com/show_bug.cgi?id=1188915 Bug ID: 1188915 Summary: dracut does not recognize hostonly="no" setting in /etc/dracut.conf Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: jroedel@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Setting hostonly="no" in /etc/dracut.conf will not overwrite the distribution configuration which is hostonly="yes". To make the change the distribution setting in /usr/lib/dracut/dracut.conf.d/01-dist.conf has to be changed, but this change does not survive a package upgrade. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 Joerg Roedel <jroedel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |dracut-maintainers@suse.de -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c1 --- Comment #1 from Joerg Roedel <jroedel@suse.com> --- The issue is likely here in /usr/bin/dracut: | # source our config file | if [[ -f $conffile ]]; then | check_conf_file "$conffile" | # shellcheck disable=SC1090 | . "$conffile" | fi | | # source our config dir | for f in $(dropindirs_sort ".conf" "$confdir" "$dracutbasedir/dracut.conf.d"); do | check_conf_file "$f" | # shellcheck disable=SC1090 | [[ -e $f ]] && . "$f" | done The config file is sourced before the config directories. The directory which constains 01-dist.conf is even sourced last, so there is no way to overwrite the hostonly default set by the package. I think the dist-defaults belong into /etc/dracut.conf so that users can replace/update them. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c2 Thomas Blume <thomas.blume@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thomas.blume@suse.com --- Comment #2 from Thomas Blume <thomas.blume@suse.com> --- (In reply to Joerg Roedel from comment #1)
The issue is likely here in /usr/bin/dracut:
| # source our config file | if [[ -f $conffile ]]; then | check_conf_file "$conffile" | # shellcheck disable=SC1090 | . "$conffile" | fi | | # source our config dir | for f in $(dropindirs_sort ".conf" "$confdir" "$dracutbasedir/dracut.conf.d"); do | check_conf_file "$f" | # shellcheck disable=SC1090 | [[ -e $f ]] && . "$f" | done
The config file is sourced before the config directories. The directory which constains 01-dist.conf is even sourced last, so there is no way to overwrite the hostonly default set by the package.
I think the dist-defaults belong into /etc/dracut.conf so that users can replace/update them.
Indeed, that order looks wrong, the configs in /etc must be able to overwrite the vendor defaults. But the dist-defaults in /usr/lib/dracut/dracut.conf* is correct. /etc/dracut.conf* is for the admin not for the vendor. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c3 Antonio Feijoo <antonio.feijoo@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |antonio.feijoo@suse.com --- Comment #3 from Antonio Feijoo <antonio.feijoo@suse.com> --- Although this behavior seems wrong, after reading the dracut documentation (https://mirrors.edge.kernel.org/pub/linux/utils/boot/dracut/dracut.html#drac...), it's done on purpose. --> dracut.conf is loaded during the initialisation phase of dracut. Command line parameter will override any values set here. *.conf files are read from /usr/lib/dracut/dracut.conf.d and /etc/dracut.conf.d. Files with the same name in /etc/dracut.conf.d will replace files in /usr/lib/dracut/dracut.conf.d. The files are then read in alphanumerical order and will override parameters set in /etc/dracut.conf. --< So, I think it will not be easy to convince upstream to change this order... -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c4 --- Comment #4 from Joerg Roedel <jroedel@suse.com> --- (In reply to Antonio Feijoo from comment #3)
Although this behavior seems wrong, after reading the dracut documentation (https://mirrors.edge.kernel.org/pub/linux/utils/boot/dracut/dracut. html#dracutconf5), it's done on purpose.
--> dracut.conf is loaded during the initialisation phase of dracut. Command line parameter will override any values set here.
*.conf files are read from /usr/lib/dracut/dracut.conf.d and /etc/dracut.conf.d. Files with the same name in /etc/dracut.conf.d will replace files in /usr/lib/dracut/dracut.conf.d. The files are then read in alphanumerical order and will override parameters set in /etc/dracut.conf. --<
So, I think it will not be easy to convince upstream to change this order...
So I guess the distro default needs to be set in another place? It seems wrong to have no way of opting out of the hostonly setting. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c5 --- Comment #5 from Antonio Feijoo <antonio.feijoo@suse.com> ---
So I guess the distro default needs to be set in another place? It seems wrong to have no way of opting out of the hostonly setting.
Distro defaults can be overwritten using a configuration file with a name alphabetically greater than 01-dist.conf inside /etc/dracut.conf.d E.g.: $ cat /etc/dracut.conf.d/99-custom.conf hostonly="no" hostonly_cmdline="no" -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c6 --- Comment #6 from Joerg Roedel <jroedel@suse.com> --- (In reply to Antonio Feijoo from comment #5)
So I guess the distro default needs to be set in another place? It seems wrong to have no way of opting out of the hostonly setting.
Distro defaults can be overwritten using a configuration file with a name alphabetically greater than 01-dist.conf inside /etc/dracut.conf.d
E.g.:
$ cat /etc/dracut.conf.d/99-custom.conf hostonly="no" hostonly_cmdline="no"
Can you document that in /etc/dracut.conf? I find this behaviour not really intuitive. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c7 --- Comment #7 from Antonio Feijoo <antonio.feijoo@suse.com> ---
Can you document that in /etc/dracut.conf? I find this behaviour not really intuitive.
I agree with you this is far from intuitive and the existence of /etc/dracut.conf is arguable, but I'd say it's already well documented. --> $ cat /etc/dracut.conf # PUT YOUR CONFIG IN separate files # in /etc/dracut.conf.d named "<name>.conf" # SEE man dracut.conf(5) for options --< -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c8 Antonio Feijoo <antonio.feijoo@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #8 from Antonio Feijoo <antonio.feijoo@suse.com> --- Closing it, as it's not really a bug. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1188915 https://bugzilla.suse.com/show_bug.cgi?id=1188915#c9 Antonio Feijoo <antonio.feijoo@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ddiss@suse.com --- Comment #9 from Antonio Feijoo <antonio.feijoo@suse.com> --- *** Bug 1203210 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com