From 2a15c891f260d628822b2787783ad3c40da1ca96 Mon Sep 17 00:00:00 2001 From: Deepika Upadhyay Date: Fri, 5 Mar 2021 07:04:33 +0000 Subject: [PATCH] teuthology-suite: pick _machine_type /etc/teuthology.yml if not specified explicitly right now, users have to always pass --machine-type when scheduling a run, when not specified, command fails with no machine type specified error. Instead of failing, we can have `default_machine_type` which in our case should pick smithi, specified in /etc/teuthology.yml Signed-off-by: Deepika Upadhyay --- scripts/suite.py | 4 ++-- teuthology/suite/__init__.py | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/suite.py b/scripts/suite.py index e826d57a3e..8097b14545 100644 --- a/scripts/suite.py +++ b/scripts/suite.py @@ -7,8 +7,8 @@ from teuthology.config import config doc = """ usage: teuthology-suite --help - teuthology-suite [-v | -vv ] --machine-type --suite [options] [...] - teuthology-suite [-v | -vv ] --machine-type --rerun [options] [...] + teuthology-suite [-v | -vv ] --suite [options] [...] + teuthology-suite [-v | -vv ] --rerun [options] [...] Run a suite of ceph integration tests. A suite is a directory containing facets. A facet is a directory containing config snippets. Running a suite diff --git a/teuthology/suite/__init__.py b/teuthology/suite/__init__.py index 500720b3ab..adca68a9a2 100644 --- a/teuthology/suite/__init__.py +++ b/teuthology/suite/__init__.py @@ -112,10 +112,13 @@ def main(args): teuthology.log.setLevel(logging.DEBUG) if not conf.machine_type or conf.machine_type == 'None': - schedule_fail("Must specify a machine_type") + if not config.default_machine_type or config.default_machine_type == 'None': + schedule_fail("Must specify a machine_type") + else: + conf.machine_type = config.default_machine_type elif 'multi' in conf.machine_type: schedule_fail("'multi' is not a valid machine_type. " + - "Maybe you want 'plana,mira,burnupi' or similar") + "Maybe you want 'gibba,smithi,mira' or similar") if conf.email: config.results_email = conf.email -- 2.39.5