Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1457191

Summary: Provide the ability to run the "navicli" plugin non-interactively
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Miroslav Hradílek <mhradile>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: agk, bmr, cww, mhradile, mmezynsk, plambri, pmoravec, sbradley
Target Milestone: rcKeywords: Reopened
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sos-3.9.1-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:57:52 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: 1594286    
Attachments:
Description Flags
Patch proposal none

Description Renaud Métrich 2017-05-31 09:45:06 UTC
Description of problem:

When enabling the "navicli" plugin, IP addresses must be entered manually even when running in batch mode.
This prevents sosreport from being able to run in batch mode.

Version-Release number of selected component (if applicable):

sos-3.3-5.el7_3

How reproducible:

Always

Steps to Reproduce:
1. Run "sosreport -o navicli --no-report --batch"

Actual results:

User is prompted for "CLARiiON SP IP Address or [Enter] to exit: "

Expected results:

No prompt

Additional info:

Comment 2 Renaud Métrich 2017-05-31 09:53:26 UTC
Created attachment 1283681 [details]
Patch proposal

This patch proposes to add option "navicli.ipaddrs", a list of IP addresses of the EMC agents.

I also added the "batch" flag be pushed to plugins so that they can take action accordingly.

Please note that due to an unexpected split of lists when specifying comma (",") as a separator, the space (" ") separator is used instead.
BZ to be filed later for that.

Comment 3 Renaud Métrich 2017-05-31 11:15:07 UTC
BZ for comma-separated list is 1457200

Comment 4 Bryn M. Reeves 2017-05-31 11:30:52 UTC
https://github.com/sosreport/sos/issues/405

Comment 5 Renaud Métrich 2017-05-31 12:00:39 UTC
Created a pull request for that: https://github.com/sosreport/sos/pull/1024

Comment 9 Pavel Moravec 2018-04-02 13:41:10 UTC
no plans to fix in 7.6, deferring to 7.7

Comment 10 Pavel Moravec 2018-12-04 08:33:51 UTC
I do not plan to fix this (at least in 7.7) until some contributor proposes a viable solution/PR - recently we hit few issues esp. expanding list of items separated by comma.

Comment 11 Renaud Métrich 2018-12-04 08:36:25 UTC
Alright, unfortunately I don't have the time to work on this either.

Comment 16 Pavel Moravec 2020-04-13 14:27:40 UTC
Current status:

Few PRs were opened and closed due to various reasons. Basic requirement from sos side is, that the plugin must run non-interactivelly _at_least_ when --batch is used. Anyway, even in interactive mode I am quite against interactive plugins, so the plugin should not prompt users for anything. Rather it should rely on a plugin option, optionally with a default value (or with a value fetched from a config file)

Could we agree on implementation:
- add "navicli.ipaddrs" plugin option with comma- or space-delimited list of IP addresses
- default value will be ??? (empty? or localhost? or fecth from some config file?)
- for each address:
  - if "navicli -h <address> getsptime" returns success, call self.get_navicli_SP_info(address)


Is this implementation acceptable? If so, I can prepare a PR for it.

Comment 17 Renaud Métrich 2020-04-14 08:48:40 UTC
Hi Pavel,

Fell free to implement your proposal, I'm sorry this BZ fell completely out of my radar.

Comment 18 Renaud Métrich 2020-04-14 09:59:41 UTC
> - default value will be ??? (empty? or localhost? or fecth from some config file?)

I think default value should be empty.

Comment 19 Pavel Moravec 2020-04-15 19:41:48 UTC
Thanks for info, upstream PR pending.

Comment 20 Pavel Moravec 2020-05-08 11:22:56 UTC
Fixed in upstream, will go to 8.3 or 8.4 the latest.

Comment 21 Pavel Moravec 2020-05-27 07:57:50 UTC
Hello,
could you please promise verification of the fixes by yourself? This falls beyond scope of sos report QE team..

(once the candidate build will be ready / in one week, I will ask for the verification itself)

Comment 40 errata-xmlrpc 2020-11-04 01:57:52 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 (sos 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/RHEA-2020:4534