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
systemd: read initconfdir #12946
systemd: read initconfdir #12946
Conversation
386b921
to
3d81778
Compare
Fixing import issues here is orthogonal to fixing the delayed drives detection. I'd strongly suggest opening a separate PR for clarity and better tracking. Additionally, the description of the change is misleading as it hides |
Isnt this file shipped with zfs? I dont mind putting a - there if you prefer that.
…-------- Original Message --------
On 15 Feb 2022, 19:01, Damian Szuberski wrote:
@szubersk commented on this pull request.
---------------------------------------------------------------
In [etc/systemd/system/zfs-import-cache.service.in](#12946 (comment)):
> @@ -14,6 +14,20 @@ ConditionPathIsDirectory=/sys/module/zfs
[Service]
Type=oneshot
RemainAfterExit=yes
***@***.***@/zfs
⬇️ Suggested change
***@***.***@/zfs
***@***.***@/zfs
It might be safer to assume that the file might not exist, unless explicitly created by user.
—
Reply to this email directly, [view it on GitHub](#12946 (review)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AA6H2N4OIXVKPZC6UXI4MN3U3KPJJANCNFSM5LPWJ3YA).
Triage notifications on the go with GitHub Mobile for [iOS](https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or [Android](https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@pikrzysztof, if you still feel like getting this PR merged, feel free to tidy it up. It is good work in area of systemd unit files and it would be a waste to lose it. |
e0a13ef
to
04f4ad8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, good stuff. My only concern is that it may be a little confusing that most of these environment variables don't apply to the systemd units. Instead, most entries are either for the init scripts or to set DKMS build options.
I'm sure users would find it helpful if we made a pass over the default etc/default/zfs.in
file and updated the comments to make it clearer which options apply where. But that's not a new issue so I think it'd be fine to tackle in a follow up PR and doesn't need to block this.
@pikrzysztof if you can rebase this on the latest commits in the master branch and force update the PR so we can get a clean CI run this should be good to go. |
50d0170
to
b5fe655
Compare
Systemd units do not read @initconfdir@ but refer to variables defined there. also a minor fixup in zfs-scrub service file Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl>
b5fe655
to
9c93199
Compare
Thank you, @pikrzysztof, for such fast reaction! |
@behlendorf it should be good now, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
Systemd units do not read @initconfdir@ but refer to variables defined there, also a minor fixup in zfs-scrub service file. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Krzysztof Piecuch <piecuch@kpiecuch.pl> Closes openzfs#12946
this unfortunately results in illegal configuration on gentoo with systemd systems
basically we do not allow using openrc configuration files (/etc/conf.d/zfs) on systemd systems, those files may not exist. not sure how to fix it yet, just leaving a comment for visibility, will try to figure out how to handle that, maybe just downstream patch, idk yet. |
Systemd units do not read @initconfdir@ but refer to variables defined
there.
also a minor fixup in zfs-scrub service file
Motivation and Context
some systemd unit files refer to undefined variables which is a bug. Pulling the config from @initconfdir@/zfs is the best idea - makes zfs behavior consistent.
Description
How Has This Been Tested?
I built & installed zfs with this patch and checked that the systemd modules work as expected.
Types of changes
Checklist:
Signed-off-by
.