Bug 2057030

Summary: Installing rng-tools via Image Builder might hang the installation [rhel-8.4.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: rng-toolsAssignee: Vladis Dronov <vdronov>
Status: CLOSED ERRATA QA Contact: Vilém Maršík <vmarsik>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: akoutsou, core-kernel-mgr, dbohanno, dwojewod, obudai, paygupta, perobins, rvr, skozina, vdronov, vmarsik, yih
Target Milestone: rcKeywords: Rebase, Reopened, Triaged, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rng-tools-6.14-5.git.b2b7934e.el8_4 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: 1975554 Environment:
Last Closed: 2022-05-31 12:20:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1975554    
Bug Blocks: 2021228    

Comment 1 Vladis Dronov 2022-02-23 16:40:44 UTC
8.4.z test build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=43282798
8.5.z test build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=43282811

includes update to rng-tools v6.14 @b2b7934e + udevadm fix + pwck fix

Comment 3 Vladis Dronov 2022-03-09 15:14:05 UTC
[CI] [GATING] [DONE] rng-tools-6.14-5.git.b2b7934e.el8_4 passed gating because all required tests passed
rng-tools-6.14-5.git.b2b7934e.el8_4 successfully moved from rhel-8.4.0-z-gate into rhel-8.4.0-z-candidate

task: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=43645817
build: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1918400
osci: https://dashboard.osci.redhat.com/#/artifact/brew-build/aid/43645817

Comment 4 Vladis Dronov 2022-03-09 15:27:01 UTC
the test plan is similar as in the bz1975554, since the issue is very similar:

0) OPTIONAL: check that the current (6.14-4 and earlier) version of rng-tools has
udevadm call in its service files:

# grep udevadm /usr/lib/systemd/system/rngd*
/usr/lib/systemd/system/rngd-wake-threshold.service:ExecStart=/bin/sh -c "... udevadm trigger --sysname-match=hw_random --settle"

1) grab the package from brew, see task url above in #c3.

2) install (or update if previous version was present):

# dnf -y install rng-tools*rpm

3) verify that all rngd service files DO NOT contain "udevadm" line:

# grep udevadm /usr/lib/systemd/system/rngd*
<empty>

6) OPTIONAL: clean up

# dnf -y erase rng-tools
# rm -f rng-tools*rpm

Comment 6 Vilém Maršík 2022-03-12 00:22:43 UTC
Looks good for the fixed RPM:
RHEL-8.4.0-updates-20211026.0 with rng-tools-6.8-4.el8_4.x86_64
# grep udevadm /usr/lib/systemd/system/rngd*
/usr/lib/systemd/system/rngd-wake-threshold.service:ExecStart=/bin/sh -c "PSIZE=$(cat /proc/sys/kernel/random/poolsize); let THRESH=$PSIZE*3/4; echo $THRESH>/proc/sys/kernel/random/write_wakeup_threshold; udevadm trigger --sysname-match=hw_random --settle"
# grep Condition /usr/lib/systemd/system/rngd*
/usr/lib/systemd/system/rngd.service:ConditionVirtualization=!container

Fixed version:
# rpm2cpio < rng-tools-6.14-5.git.b2b7934e.el8_4.x86_64.rpm | cpio -icdumv
(...)
281 blocks
# grep udevadm usr/lib/systemd/system/rngd*
# grep Condition usr/lib/systemd/system/rngd*
usr/lib/systemd/system/rngd.service:ConditionVirtualization=!container
usr/lib/systemd/system/rngd-wake-threshold.service:ConditionVirtualization=!container

On the other hand, this is what I got on RHEL-9.0.0-20220310.d.3:
# rpm -q rng-tools
rng-tools-6.14-2.git.b2b7934e.el9.x86_64
# grep udevadm /usr/lib/systemd/system/rngd*
/usr/lib/systemd/system/rngd-wake-threshold.service:ExecStart=/bin/sh -c "PSIZE=$(cat /proc/sys/kernel/random/poolsize); let THRESH=$PSIZE*3/4; echo $THRESH>/proc/sys/kernel/random/write_wakeup_threshold; udevadm trigger --sysname-match=hw_random --settle"
Do we want to backport this fix to RHEL9 as well? Not sure if we already have a request for that, could not find any.

Comment 7 Vladis Dronov 2022-03-17 13:40:34 UTC
(In reply to Vilém Maršík from comment #6)
> Do we want to backport this fix to RHEL9 as well? Not sure if we already
> have a request for that, could not find any.

Hi, Vilem, yes, unfortunately this issue is present in RHEL-8.6.z/8.7.0 and
-9.0.z/9.1.0.

I'm planning to bring this fix (and couple of others) to RHEL-8.6/7 via
bz2053160 and to 9.0/1 via its clone which yet has to be created.

Thanks for noticing!

Comment 14 errata-xmlrpc 2022-05-31 12:20:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rng-tools bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:4826