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 1959413 - saphana plugin missing argument traceback
Summary: saphana plugin missing argument traceback
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sos
Version: 8.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta
: 8.5
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-11 13:38 UTC by Miroslav Hradílek
Modified: 2021-11-10 07:42 UTC (History)
5 users (show)

Fixed In Version: sos-4.1-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:36:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 2535 0 None open [saphana] remove redundant unused argument of get_inst_info 2021-05-11 14:03:44 UTC
Red Hat Product Errata RHEA-2021:4388 0 None None None 2021-11-09 19:36:56 UTC

Description Miroslav Hradílek 2021-05-11 13:38:24 UTC
Description of problem:
Plugin saphana crashes on missing argument when get_inst_info() is called.

Version-Release number of selected component (if applicable):
sos-4.1-1.el8.noarch (unreleased)

How reproducible:
100%

Steps to Reproduce:
# mkdir -p /hana/shared/A01/HDB01/
# mkdir -p /hana/shared/A02/HDB02/

# sos report -o saphana --batch
. . .
 Setting up archive ...
 Setting up plugins ...
caught exception in plugin method "saphana.setup()"
writing traceback to sos_logs/saphana-plugin-errors.txt
 Running plugins. Please wait ...
. . .

# tar -tf /var/tmp/sosreport-hostname-vbmsorx.tar.xz | grep saphana
sosreport-hostname-vbmsorx/sos_commands/saphana/
sosreport-hostname-vbmsorx/sos_commands/saphana/A01_HDB_info
sosreport-hostname-vbmsorx/sos_commands/saphana/A01_version
sosreport-hostname-vbmsorx/sos_commands/saphana/A01_memusage
sosreport-hostname-vbmsorx/sos_commands/saphana/A01_replicainfo
sosreport-hostname-vbmsorx/sos_logs/saphana-plugin-errors.txt

# tar -xf /var/tmp/sosreport-hostname-vbmsorx.tar.xz
# cat sosreport-hostname-vbmsorx/sos_logs/saphana-plugin-errors.txt
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/sos/report/__init__.py", line 906, in setup
    plug.setup()
  File "/usr/lib/python3.6/site-packages/sos/report/plugins/saphana.py", line 52, in setup
    self.get_inst_info(sid, sidadm, inst)
TypeError: get_inst_info() missing 1 required positional argument: 'inst'


Expected results:
No traceback collect info for both dirs like in 4.0.

# tar -tf /var/tmp/sosreport-hostname-nsugfzu.tar.xz | grep saphana
sosreport-hostname-nsugfzu/sos_commands/saphana/
sosreport-hostname-nsugfzu/sos_commands/saphana/A01_HDB_info
sosreport-hostname-nsugfzu/sos_commands/saphana/A01_version
sosreport-hostname-nsugfzu/sos_commands/saphana/A01_memusage
sosreport-hostname-nsugfzu/sos_commands/saphana/A01_replicainfo
sosreport-hostname-nsugfzu/sos_commands/saphana/A01_01_status
sosreport-hostname-nsugfzu/sos_commands/saphana/A02_HDB_info
sosreport-hostname-nsugfzu/sos_commands/saphana/A02_version
sosreport-hostname-nsugfzu/sos_commands/saphana/A02_memusage
sosreport-hostname-nsugfzu/sos_commands/saphana/A02_replicainfo
sosreport-hostname-nsugfzu/sos_commands/saphana/A02_02_status

Additional info:
I believe the issue comes after refactor in
https://github.com/sosreport/sos/commit/e6c65495c7d6efba9a12e44956443ce5aea013f2

and argument was omitted unintentionally. The following change seems to fix it.

--- saphana.bak	2021-05-11 09:19:50.617219406 -0400
+++ /usr/lib/python3.6/site-packages/sos/report/plugins/saphana.py	2021-05-11 09:20:39.017260540 -0400
@@ -49,7 +49,7 @@
                     for inst in os.listdir("/hana/shared/%s/" % sid):
                         if "HDB" in inst:
                             inst = inst.strip()[-2:]
-                            self.get_inst_info(sid, sidadm, inst)
+                            self.get_inst_info(prefix, sid, sidadm, inst)
 
     def get_inst_info(self, prefix, sid, sidadm, inst):
         proc_cmd = 'su - %s -c "sapcontrol -nr %s -function GetProcessList"'

Comment 1 Pavel Moravec 2021-05-11 14:03:48 UTC
A nice catch.

Comment 5 errata-xmlrpc 2021-11-09 19:36:31 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-2021:4388


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