-
Notifications
You must be signed in to change notification settings - Fork 53
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
Provide early boot systemd unit files within the associated dracut module #1886
Provide early boot systemd unit files within the associated dracut module #1886
Conversation
ce764d8
to
fe4bf4a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1886 +/- ##
=======================================
Coverage 73.60% 73.60%
=======================================
Files 69 69
Lines 7332 7332
=======================================
Hits 5397 5397
Misses 1544 1544
Partials 391 391 ☔ View full report in Codecov by Sentry. |
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.
Lines 27 to 31 in 48966fa
inst_simple "${moddir}/elemental-setup-rootfs.service" \ | |
"${systemdsystemunitdir}/elemental-setup-rootfs.service" | |
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd-root-fs.target.requires" | |
ln_r "../elemental-setup-rootfs.service" \ | |
"${systemdsystemunitdir}/initrd-root-fs.target.requires/elemental-setup-rootfs.service" |
${moddir}
relates to the root folder of the dracut module, this is the folder of this current file, hence this path was essentially wrong.
@@ -1,4 +1,2 @@ | |||
install_items+=" /usr/lib/systemd/system/elemental-setup-initramfs.service /etc/systemd/system/initrd.target.requires/elemental-setup-initramfs.service " | |||
install_items+=" /usr/lib/systemd/system/elemental-setup-rootfs.service /etc/systemd/system/initrd-fs.target.requires/elemental-setup-rootfs.service " |
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.
I saw dracut error messages trying to execute those, that's how all this PR started.
pkg/features/embedded/elemental-rootfs/etc/dracut.conf.d/02-elemental-rootfs.conf
Show resolved
Hide resolved
pkg/features/features.go
Outdated
@@ -146,11 +146,7 @@ func Get(names []string) ([]*Feature, error) { | |||
return features, fmt.Errorf("Conflicting features: %s and %s", FeatureElementalRootfs, FeatureImmutableRootfs) | |||
} | |||
|
|||
units := []*systemd.Unit{ | |||
systemd.NewUnit("elemental-rootfs.service"), |
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.
Was there an error for these units? These are actually pretty handy to include since you can run systemctl status elemental-rootfs
in the booted system and see failures/logs..
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 point I am not sure if this will still be de case. I mean the unit is there but mostly managed by the initramfs systemd unit.
The thing is that I to make inst_simple
command in module-setup.sh
functional having the service file within the module makes it easy. Probably we could use the full path in there as long as the unit file and the dracut module are in the same feature it shouldn't be a problem having a hardcoded full path in there. I can give it a quick test.
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!
fe4bf4a
to
91ee0c8
Compare
Signed-off-by: David Cassany <dcassany@suse.com>
91ee0c8
to
3b07f37
Compare
No description provided.