From 9383728125a343aa50b165baf5b50bf2664d91bb Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 7 Jan 2026 18:02:21 -0500 Subject: [PATCH] qa/tasks: embed use of ssh_keys task in smb workunit Automatically use the ssh_keys tasks in the smb workunit task. It can be disabled by passing false to `ssh_keys:` config key. This allows the node running the tests to ssh into the node where cephadm is installed in order to execute commands within the cephadm shell. Signed-off-by: John Mulligan --- qa/tasks/smb.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qa/tasks/smb.py b/qa/tasks/smb.py index adc64d05ec1..ea226cc1aae 100644 --- a/qa/tasks/smb.py +++ b/qa/tasks/smb.py @@ -10,6 +10,7 @@ import shlex import time from teuthology.exceptions import ConfigError, CommandFailedError +from teuthology.task import ssh_keys log = logging.getLogger(__name__) @@ -372,8 +373,13 @@ def workunit(ctx, config): _config['no_coverage_and_limits'] = config.get( 'no_coverage_and_limits', True ) + _ssh_keys_config = config.get('ssh_keys', {}) + _config['enable_ssh_keys'] = _ssh_keys_config not in (False, None) log.info('Passing workunit config: %r', _config) - with write_metadata_file(ctx, _config): + with contextlib.ExitStack() as estack: + if _config['enable_ssh_keys']: + estack.enter_context(ssh_keys.task(ctx, _ssh_keys_config)) + estack.enter_context(write_metadata_file(ctx, _config)) return workunit.task(ctx, _config) -- 2.47.3