Re: [OE-core] [OE-Core][warrior][PATCH] rng-tools: start rngd early in the boot process again
On Fri, 2019-08-23 at 13:41 -0300, Fabio Berton wrote: > Without this change, images with systemd hang on shutdown/reboot. I already submitted a patch[1] to fix this which is currently under review. It is the very same patch with a slightly different log message as the changes from commit edf7606822 (rng-tools: fix rngd blocks system shutdown) was not applied on warrior. Alban [1]: https://patchwork.openembedded.org/patch/163540/ > On Fri, Aug 23, 2019 at 1:39 PM Fabio Berton > wrote: > > From: "Bedel, Alban" > > > > It do make sense to start rngd early in the boot process because > > otherwise we would need to track every service that might need > > entropy > > and explicitly configure it to start after rngd. > > > > When used with systemd rngd blocked the shutdown process because it > > simply missed the proper unit configuration. As the systemd > > documentation explains, when using DefaultDependencies=no one also > > have to explicitly configure the unit to properly stop at some > > point. > > This is normaly achieved by having Before=shutdown.target and > > Conflicts=shutdown.target set for the unit. > > > > To have rngd started early again we reverte the changes done to > > rngd.service in commit edf7606822 (rng-tools: fix rngd blocks > > system > > shutdown). To have it properly stopped on shutdown we also add > > Before=shutdown.target and Conflicts=shutdown.target. > > > > Signed-off-by: Alban Bedel > > Signed-off-by: Richard Purdie > > (cherry picked from commit > > a74e7df33e2c8ab2152e3217c0a5df3f65971713) > > --- > > meta/recipes-support/rng-tools/rng-tools/rngd.service | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service > > b/meta/recipes-support/rng-tools/rng-tools/rngd.service > > index f0355db14fc..5c8253b5fba 100644 > > --- a/meta/recipes-support/rng-tools/rng-tools/rngd.service > > +++ b/meta/recipes-support/rng-tools/rng-tools/rngd.service > > @@ -2,7 +2,8 @@ > > Description=Hardware RNG Entropy Gatherer Daemon > > DefaultDependencies=no > > After=systemd-udev-settle.service > > -Before=sysinit.target > > +Before=sysinit.target shutdown.target > > +Conflicts=shutdown.target > > > > [Service] > > ExecStart=@SBINDIR@/rngd -f -r /dev/hwrng > > -- > > 2.20.1 > > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [OE-Core][warrior][PATCH] rng-tools: start rngd early in the boot process again
Without this change, images with systemd hang on shutdown/reboot. On Fri, Aug 23, 2019 at 1:39 PM Fabio Berton wrote: > > From: "Bedel, Alban" > > It do make sense to start rngd early in the boot process because > otherwise we would need to track every service that might need entropy > and explicitly configure it to start after rngd. > > When used with systemd rngd blocked the shutdown process because it > simply missed the proper unit configuration. As the systemd > documentation explains, when using DefaultDependencies=no one also > have to explicitly configure the unit to properly stop at some point. > This is normaly achieved by having Before=shutdown.target and > Conflicts=shutdown.target set for the unit. > > To have rngd started early again we reverte the changes done to > rngd.service in commit edf7606822 (rng-tools: fix rngd blocks system > shutdown). To have it properly stopped on shutdown we also add > Before=shutdown.target and Conflicts=shutdown.target. > > Signed-off-by: Alban Bedel > Signed-off-by: Richard Purdie > (cherry picked from commit a74e7df33e2c8ab2152e3217c0a5df3f65971713) > --- > meta/recipes-support/rng-tools/rng-tools/rngd.service | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service > b/meta/recipes-support/rng-tools/rng-tools/rngd.service > index f0355db14fc..5c8253b5fba 100644 > --- a/meta/recipes-support/rng-tools/rng-tools/rngd.service > +++ b/meta/recipes-support/rng-tools/rng-tools/rngd.service > @@ -2,7 +2,8 @@ > Description=Hardware RNG Entropy Gatherer Daemon > DefaultDependencies=no > After=systemd-udev-settle.service > -Before=sysinit.target > +Before=sysinit.target shutdown.target > +Conflicts=shutdown.target > > [Service] > ExecStart=@SBINDIR@/rngd -f -r /dev/hwrng > -- > 2.20.1 > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [OE-Core][warrior][PATCH] rng-tools: start rngd early in the boot process again
From: "Bedel, Alban" It do make sense to start rngd early in the boot process because otherwise we would need to track every service that might need entropy and explicitly configure it to start after rngd. When used with systemd rngd blocked the shutdown process because it simply missed the proper unit configuration. As the systemd documentation explains, when using DefaultDependencies=no one also have to explicitly configure the unit to properly stop at some point. This is normaly achieved by having Before=shutdown.target and Conflicts=shutdown.target set for the unit. To have rngd started early again we reverte the changes done to rngd.service in commit edf7606822 (rng-tools: fix rngd blocks system shutdown). To have it properly stopped on shutdown we also add Before=shutdown.target and Conflicts=shutdown.target. Signed-off-by: Alban Bedel Signed-off-by: Richard Purdie (cherry picked from commit a74e7df33e2c8ab2152e3217c0a5df3f65971713) --- meta/recipes-support/rng-tools/rng-tools/rngd.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service b/meta/recipes-support/rng-tools/rng-tools/rngd.service index f0355db14fc..5c8253b5fba 100644 --- a/meta/recipes-support/rng-tools/rng-tools/rngd.service +++ b/meta/recipes-support/rng-tools/rng-tools/rngd.service @@ -2,7 +2,8 @@ Description=Hardware RNG Entropy Gatherer Daemon DefaultDependencies=no After=systemd-udev-settle.service -Before=sysinit.target +Before=sysinit.target shutdown.target +Conflicts=shutdown.target [Service] ExecStart=@SBINDIR@/rngd -f -r /dev/hwrng -- 2.20.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core