Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ocp] Fix backtrace in ocp collector #3515

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Mar 11, 2024

  1. [collect|ocp] Fix backtrace in ocp collector

    While runnig sos collector in an ocp cluster
    we got the following trace:
    
    Traceback (most recent call last):
      File "/usr/sbin/sos", line 22, in <module>
        sos.execute()
      File "/usr/lib/python3.6/site-packages/sos/__init__.py",
            line 193, in execute
        self._component.execute()
      File "/usr/lib/python3.6/site-packages/sos/collector/__init__.py",
            line 1175, in execute
        self.prep()
      File "/usr/lib/python3.6/site-packages/sos/collector/__init__.py",
            line 896, in prep
        self.cluster.setup()
      File "/usr/lib/python3.6/site-packages/sos/collector/clusters/ocp.py",
            line 132, in setup
        out = self.exec_primary_cmd(self.fmt_oc_cmd("auth can-i '*' '*'"))
      File "/usr/lib/python3.6/site-packages/sos/collector/clusters/ocp.py",
            line 104, in fmt_oc_cmd
        return "%s %s" % (self.oc_cmd, cmd)
      File "/usr/lib/python3.6/site-packages/sos/collector/clusters/ocp.py",
            line 81, in oc_cmd
        'which oc', chroot=self.primary.host.sysroot
    TypeError: run_command() got an unexpected keyword argument 'chroot'
    
    This patch changes the unused option 'chroot' that was undefined in
    run_command() to the option need_root that was in use in other commands
    in ocp.py.
    
    Related: RH: RHEL-24351
    
    Co-authored-by: Alberto Losada Grande <[email protected]>
    
    Signed-off-by: Jose Castillo <[email protected]>
    jcastill committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    fc8da6a View commit details
    Browse the repository at this point in the history