Bug 1558616

Summary: mismatch of the rngd options in help and man pages
Product: Red Hat Enterprise Linux 7 Reporter: Nikola Kresic <nkresic>
Component: rng-toolsAssignee: Neil Horman <nhorman>
Status: CLOSED ERRATA QA Contact: Vilém Maršík <vmarsik>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.5CC: apmukher, bhu, nhorman
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: rng-tool-5-15.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 07:47:40 UTC Type: Bug
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:    
Bug Blocks: 1532680    

Description Nikola Kresic 2018-03-20 15:47:30 UTC
Description of problem:
--debug is mentioned in the man page but not in rngd --help

-d is mentioned twice in the man page (once as abbreviation for --debug, once as abbreviation for --no-drng)

-q does not suppress error messages


Version-Release number of selected component (if applicable):
rng-tools-5-13.el7.x86_64


How reproducible:
Just check the man tools and try to use one of reported the switches.


Steps to Reproduce:
1.
2.
3.

Actual results:
mismatch between --help and manual pages

Expected results:
--help and man pages show the same information

Additional info:

Comment 4 Vilém Maršík 2018-04-09 15:50:32 UTC
this only looks partially fixed.

1. the "-q" and "--quiet" flags work now:
[root@dell-per715-01 ~]# rngd --quiet
[root@dell-per715-01 ~]# rngd -q
[root@dell-per715-01 ~]# rngd
Failed to init entropy source 0: Hardware RNG Device

Failed to init entropy source 1: TPM RNG Device

Failed to init entropy source 2: Intel RDRAND Instruction RNG

can't open any entropy source
Maybe RNG device modules are not loaded

In rng-tools-5-13.el7.x86_64, it was failing:
[root@dell-per715-01 ~]# rngd -q
Failed to init entropy source 0: Hardware RNG Device

Failed to init entropy source 1: TPM RNG Device

Failed to init entropy source 2: Intel RDRAND Instruction RNG


2. the "-d" is still described differently in "--help" and manual:
[root@dell-per715-01 ~]# rngd --help
(...)
  -d, --no-drng=1|0          Do not use drng as a source of random number input
[root@dell-per715-01 ~]# man rngd
(...)
       -d, --debug
              Enable debug messages
(...)
(It requires an argument, so the "--help" version might be correct.)

3. additionally, the "--debug" flag is not documented in "--help", and seems not to work:
[root@dell-per715-01 ~]# rngd --debug
rngd: unrecognized option '--debug'
Try `rngd --help' or `rngd --usage' for more information.


Putting back to ASSIGNED.

Comment 5 Vilém Maršík 2018-04-16 17:33:23 UTC
Neil, are we waiting for something? It looks you fixed this a week ago, but it is not yet ON_QA

Comment 6 Neil Horman 2018-04-16 19:05:48 UTC
The errata tool was broken last week, I just hadn't gotten to updating the errata

Comment 7 Neil Horman 2018-04-16 19:08:12 UTC
actually, the build is missing a product listing now in the errata tool, and I have no idea what that means.

Comment 10 Vilém Maršík 2018-07-30 16:49:43 UTC
Now the documentation is OK and the switches work:

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 Beta (Maipo)

# rpm -q rng-tools
rng-tools-6.3.1-1.el7.x86_64

# rngd --help
...
  -d, --debug                Enable debug output
...
  -q, --quiet                Suppress error messages
...

# man rngd
..
-d, --debug
              Enable debug messages
...
-q, --quiet
              Suppress error messages
...

# rngd
Initalizing available sources
Failed to init entropy source 0: Hardware RNG Device
Failed to init entropy source 1: TPM RNG Device
Enabling RDRAND rng support
Enabling JITTER rng support

# rngd --debug
Initalizing available sources
read error
hwrng: no available rng
Failed to init entropy source 0: Hardware RNG Device
Unable to open file: /dev/tpm0
Failed to init entropy source 1: TPM RNG Device
Enabling RDRAND rng support
Enabling JITTER rng support
(same for 'rngd -d')

However, the quiet mode is now more verbose than it was in Comment #4:
# rngd --quiet
Initalizing available sources
Enabling RDRAND rng support
Enabling JITTER rng support
(same for 'rngd -q')

Neil, is this on purpose? This is consistent with the description, saying that '--quiet' just disables error messages, but do we really want to have diagnostic lines like 'Initializing available sources' printed in the quiet mode?

Comment 11 Neil Horman 2018-07-30 16:53:10 UTC
no, its not correct, but that seems to be a different bug.  It appears a message slipped in that circumvents the quiet filter for the rngd enhancement update (which introduced the jitter source).

If you could open a separate bug on that, I'll get it squared up

Comment 12 Vilém Maršík 2018-07-30 18:07:25 UTC
Okay, opened Bug 1609888 - verbose 'rngd --quiet', closing this one.

Comment 14 errata-xmlrpc 2018-10-30 07:47:40 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, 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-2018:3022