提交 33f29f90 编写于 作者: C Cleber Rosa

avocado.utils.ssh: set the master control path option

The connection sharing functionality of SSH, on which the
avocado.utils.ssh.Session is based upon, requires setting control path
to be given to both the SSH holding the master connection, and to the
SSH instance that should eventually reuse the master connection.

That setting was completely absenting from the library, and the only
reason it worked, was because my local SSH configurations
(~/.ssh/config) had a default setting.

To avoid clashes (even if they could, in theory, be beneficial), let's
flag the control path for the connections initialized by Avocado as
such.

Reference: https://github.com/avocado-framework/avocado/issues/2900Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 47fff314
......@@ -8,7 +8,8 @@ class Session(object):
"""
DEFAULT_OPTIONS = (('StrictHostKeyChecking', 'no'),
('UpdateHostKeys', 'no'))
('UpdateHostKeys', 'no'),
('ControlPath', '~/.ssh/avocado-master-%r@%h:%p'))
MASTER_OPTIONS = (('ControlMaster', 'yes'),
('ControlPersist', 'yes'))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册