diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-01-28 10:06:15 +0100 |
---|---|---|
committer | Pavel Moravec <pmoravec@redhat.com> | 2020-01-28 10:06:15 +0100 |
commit | 7d1701f60de14aeb4eb430de292496ac6c6babb7 (patch) | |
tree | 2f21fce9b9d562d803912ce4beca4b3a958c017a | |
parent | c5e82990a728f77d46de770f0a168b0b37313510 (diff) | |
download | sos-7d1701f60de14aeb4eb430de292496ac6c6babb7.tar.gz |
[ovn_central] Remove timeout=None from container ps calls
Replaces the `timeout=None` parameter in the container-centric commands
that was being used as a workaround for a disconnected TTY causing the
commands to hang when run via sos.
Now use the `foreground=True` option to not disconnect the TTY.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/plugins/ovn_central.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sos/plugins/ovn_central.py b/sos/plugins/ovn_central.py index 32a5e1cb..7be274f7 100644 --- a/sos/plugins/ovn_central.py +++ b/sos/plugins/ovn_central.py @@ -26,8 +26,7 @@ class OVNCentral(Plugin): if self._container_name: cmd = "%s exec %s cat %s" % ( self._container_runtime, self._container_name, filename) - # the timeout=None is just a workaround for "podman ps" hung bug - res = self.exec_cmd(cmd, timeout=None) + res = self.exec_cmd(cmd, foreground=True) if res['status'] != 0: self._log_error("Could not retrieve DB schema file from " "container %s" % self._container_name) @@ -119,8 +118,7 @@ class OVNCentral(Plugin): self._container_name, cmd) for cmd in cmds] - # the timeout=None is just a workaround for "podman ps" hung bug - self.add_cmd_output(cmds, timeout=None) + self.add_cmd_output(cmds, foreground=True) self.add_copy_spec("/etc/sysconfig/ovn-northd") |