Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ocp] Fix backtrace in ocp collector
While runnng 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]>
- Loading branch information