From 0083b87037ea759fb47cd29226451aee1d3fb6ca Mon Sep 17 00:00:00 2001 From: Scott Poore Date: Aug 29 2022 19:49:47 +0000 Subject: README note about shell logout behavior It was discovered from a ticket that the Paramiko and OpenSSH transports behave differently regarding logouts at the end of a run_command. On exit, when using Paramiko, this runs a logout script while OpenSSH does not. Adding a note to the README.rst to make this known. Also updating setup and spec to bump version number. Fixes: https://pagure.io/python-pytest-multihost/issue/24 --- diff --git a/README.rst b/README.rst index ca7ed81..05c8799 100644 --- a/README.rst +++ b/README.rst @@ -187,6 +187,27 @@ For command output, separate ``stdout_bytes`` and ``stdout_text`` attributes are provided. The latter uses a configurable encoding (``utf-8`` by default). +Note about shell logout behavior +-------------------------------- + +When using Paramiko for the SSH Transport, a shell logout script (e.g. +.bash_logout) will be executed at the end of a run_command. If this script +fails in any way, it can cause the run_command to raise an error. This +can occur even if the executed command succeeds. + +The OpenSSH Transport exits without executing a shell logout script. As +such, if there are issues with errors due to Paramiko running the logout +script, you can use OpenSSH as a workaround. + +In code:: + + import os + os.environ['PYTESTMULTIHOST_SSH_TRANSPORT'] = 'openssh' + +In shell before running pytest:: + + export PYTESTMULTIHOST_SSH_TRANSPORT="openssh" + Contributing ------------ diff --git a/python-pytest-multihost.spec b/python-pytest-multihost.spec index fc4e04f..4aa2214 100644 --- a/python-pytest-multihost.spec +++ b/python-pytest-multihost.spec @@ -13,7 +13,7 @@ %global srcname pytest-multihost %global modulename pytest_multihost -%global srcversion 3.4 +%global srcversion 3.5 %global versionedname %{srcname}-%{srcversion} Name: python-%{srcname} @@ -147,6 +147,10 @@ popd %changelog +* Mon Aug 29 2022 Scott Poore - 3.5-1 +- Add note about shell logout differences between transports +- bump version to 3.5 + * Tue Apr 07 2020 Niranjan MR - 3.4-1 - Set permissions in octal mode for sshpass to read the file diff --git a/setup.py b/setup.py index 22194f1..5575876 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ with io.open('README.rst', 'rt', encoding='utf-8') as f: setup_args = dict( name = "pytest-multihost", - version = "3.4", + version = "3.5", description = "Utility for writing multi-host tests for pytest", long_description = readme_contents, url = "https://pagure.io/python-pytest-multihost",