diff --git a/releasenotes/notes/fix-remoteclient-default-ssh-shell-prologue-33e99343d086f601.yaml b/releasenotes/notes/fix-remoteclient-default-ssh-shell-prologue-33e99343d086f601.yaml new file mode 100644 index 0000000000..5063fd58e7 --- /dev/null +++ b/releasenotes/notes/fix-remoteclient-default-ssh-shell-prologue-33e99343d086f601.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fix RemoteClient default ssh_shell_prologue: Bug#1707478 + + The default ssh_shell_proloque has been modified from + specifying erroneous PATH=$$PATH:/sbin to PATH=$PATH:/sbin. diff --git a/tempest/lib/common/utils/linux/remote_client.py b/tempest/lib/common/utils/linux/remote_client.py index aef2ff35b5..cd4092bf8a 100644 --- a/tempest/lib/common/utils/linux/remote_client.py +++ b/tempest/lib/common/utils/linux/remote_client.py @@ -67,7 +67,7 @@ class RemoteClient(object): def __init__(self, ip_address, username, password=None, pkey=None, server=None, servers_client=None, ssh_timeout=300, connect_timeout=60, console_output_enabled=True, - ssh_shell_prologue="set -eu -o pipefail; PATH=$$PATH:/sbin;", + ssh_shell_prologue="set -eu -o pipefail; PATH=$PATH:/sbin;", ping_count=1, ping_size=56): """Executes commands in a VM over ssh diff --git a/tempest/tests/lib/common/utils/linux/test_remote_client.py b/tempest/tests/lib/common/utils/linux/test_remote_client.py index cf312f4f26..7a21a5fa1f 100644 --- a/tempest/tests/lib/common/utils/linux/test_remote_client.py +++ b/tempest/tests/lib/common/utils/linux/test_remote_client.py @@ -34,7 +34,7 @@ class TestRemoteClient(base.TestCase): client = remote_client.RemoteClient('192.168.1.10', 'username') client.exec_command('ls') mock_ssh_exec_command.assert_called_once_with( - 'set -eu -o pipefail; PATH=$$PATH:/sbin; ls') + 'set -eu -o pipefail; PATH=$PATH:/sbin; ls') @mock.patch.object(ssh.Client, 'test_connection_auth') def test_validate_authentication(self, mock_test_connection_auth):