From 1aae78dac2552fe79c2d159c30d0b1ae41f1e2ee Mon Sep 17 00:00:00 2001 From: Deepika Upadhyay Date: Fri, 5 Mar 2021 07:04:33 +0000 Subject: [PATCH] teuthology-suite: add default machine type(smithi) right now the default_machine_type fallback is set to None via some internal mangaling, this makes users always have to pass --machine_type which mostly we prefer to smithi's . Hence, making it a default unless otherwise, should be helpful for users. Signed-off-by: Deepika Upadhyay --- scripts/suite.py | 8 ++++---- teuthology/config.py | 1 + teuthology/suite/__init__.py | 5 +---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/suite.py b/scripts/suite.py index e826d57a3e..264ed4d274 100644 --- a/scripts/suite.py +++ b/scripts/suite.py @@ -7,8 +7,8 @@ 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 @@ -62,7 +62,7 @@ the user or system `teuthology.yaml` configuration files respectively, otherwise use `master`. -m , --machine-type - Machine type [default: {default_machine_type}] + Machine type [default: {teuth_machine_type}] -d , --distro Distribution to run against -D , --distro-version @@ -174,7 +174,7 @@ --force-priority Skip the priority check. """.format( - default_machine_type=config.default_machine_type, + teuth_machine_type=config.teuth_machine_type, default_results_timeout=config.results_timeout, default_ceph_repo=defaults('--ceph-repo', config.get_ceph_git_url()), diff --git a/teuthology/config.py b/teuthology/config.py index 18e26d2cc3..e7bd584315 100644 --- a/teuthology/config.py +++ b/teuthology/config.py @@ -140,6 +140,7 @@ class TeuthologyConfig(YamlConfig): 'archive_upload_key': None, 'archive_upload_url': None, 'automated_scheduling': False, + 'teuth_machine_type': 'smithi', 'reserve_machines': 5, 'ceph_git_base_url': 'https://github.com/ceph/', 'ceph_git_url': None, diff --git a/teuthology/suite/__init__.py b/teuthology/suite/__init__.py index 500720b3ab..6d47870b13 100644 --- a/teuthology/suite/__init__.py +++ b/teuthology/suite/__init__.py @@ -112,10 +112,7 @@ 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") - elif 'multi' in conf.machine_type: - schedule_fail("'multi' is not a valid machine_type. " + - "Maybe you want 'plana,mira,burnupi' or similar") + conf.machine_type = config.teuth_machine_type if conf.email: config.results_email = conf.email