Bug 1738242 - There is no help output for "foreman-logging-type"
Summary: There is no help output for "foreman-logging-type"
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Devendra Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-06 15:18 UTC by Stephen Wadeley
Modified: 2020-11-05 17:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-05 17:10:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stephen Wadeley 2019-08-06 15:18:55 UTC
Description of problem:

satellite-installer --help | grep "foreman-logging-type" does not show help output

Version-Release number of selected component (if applicable):
[root@dell-r330-12 ~]# rpm -q foreman
foreman-1.22.0.10-1.el7sat.noarch
[root@dell-r330-12 ~]# rpm -q satellite-installer
satellite-installer-6.6.0.19-1.beta.el7sat.noarch


How reproducible:


Steps to Reproduce:
1. satellite-installer --help | grep "foreman-logging-type"
2.
3.

Actual results:
~]# satellite-installer --help | grep "foreman-logging-type" 
 ~]#

Expected results:

~]# satellite-installer --help | grep "foreman-logging-type" 
~]# Logging type of the Foreman application (current: "file")

Additional info:

 ~]# satellite-installer --full-help | grep "foreman-logging-type"
    --foreman-logging-type        Logging type of the Foreman application (current: "file")
    --reset-foreman-logging-type  Reset logging_type to the default value ("file")

Comment 2 Stephen Wadeley 2019-08-08 07:17:37 UTC
Hello

I also think the full help is rather Spartan as it does not give you a list of options.

If I do:

~]# foreman-installer --foreman-logging-type --help
Parameter foreman-logging-type is missing a value on the command line

I just get an error. But if I do:

 ~]# foreman-installer --foreman-logging-type blah
Parameter foreman-logging-type invalid: help must be one of file, syslog, journald
Error during configuration, exiting

I get a helpful suggestion.

It seems an opportunity is being missed. With, for example, hammer commands you can keep building a command with --help on the end. So its quite likely users will try this method to get context help.

Thank you

Comment 3 Ewoud Kohl van Wijngaarden 2019-08-22 16:49:20 UTC
Would you expect the same thing in --help?

One tricky bit here is that we have complex types which are hard to read regular expressions. Those are not that useful and I'm unsure what to do. For example, Stdlib::Absoutepath expands to:

regexes matching /^(([a-zA-Z]:[\\\/])|([\\\/][\\\/][^\\\/]+[\\\/][^\\\/]+)|([\\\/][\\\/]\?[\\\/][^\\\/]+))/ or regexes matching /^\/([^\/\0]+\/*)*$/

Comment 4 Stephen Wadeley 2019-08-22 17:18:59 UTC
(In reply to Ewoud Kohl van Wijngaarden from comment #3)
> Would you expect the same thing in --help?

I think full help should have more than normal help, but certainly not less than the error message which seems to be the case here.

In that example you could change:
Logging type of the Foreman application (current: "file")

to one of these (depending on space):

Logging type of the Foreman application: one of file, syslog, journald (current: "file")
Foreman application logging type: one of file, syslog, journald (current: "file")
One of file, syslog, journald (current: "file")

For the simple help you could have just:
One of file, syslog, journald (current: "file")

Happy to review pull requests.

> 
> One tricky bit here is that we have complex types which are hard to read
> regular expressions. Those are not that useful and I'm unsure what to do.
> For example, Stdlib::Absoutepath expands to:
> 
> regexes matching
> /^(([a-zA-Z]:[\\\/])|([\\\/][\\\/][^\\\/]+[\\\/][^\\\/]+)|([\\\/][\\\/
> ]\?[\\\/][^\\\/]+))/ or regexes matching /^\/([^\/\0]+\/*)*$/

Its pity we do not have man pages.

If someone is going to change that seldom used setting, then they can take the time to figure it out. But the average user looking up logging type should not have to spend too much time.

Thank you

Comment 6 Eric Helms 2020-11-05 17:10:50 UTC
As discussed, there is help for that parameter, it lives under the --full-help menu. I am closing this as not a bug. Based on the comments, I would encourage opening an RFE for man pages if that is something you would like to see.


Note You need to log in before you can comment on or make changes to this bug.