]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology-suite: pick _machine_type /etc/teuthology.yml if not specified explicitly 1625/head
authorDeepika Upadhyay <dupadhya@redhat.com>
Fri, 5 Mar 2021 07:04:33 +0000 (07:04 +0000)
committerDeepika Upadhyay <dupadhya@redhat.com>
Thu, 27 May 2021 07:00:33 +0000 (12:30 +0530)
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 <dupadhya@redhat.com>
scripts/suite.py
teuthology/suite/__init__.py

index e826d57a3ec0b16d55af3de3db611f7a76a0bc19..8097b14545fc65ba897f29843294ec604b38c11f 100644 (file)
@@ -7,8 +7,8 @@ from teuthology.config import config
 
 doc = """
 usage: teuthology-suite --help
-       teuthology-suite [-v | -vv ] --machine-type <type> --suite <suite> [options] [<config_yaml>...]
-       teuthology-suite [-v | -vv ] --machine-type <type> --rerun <name>  [options] [<config_yaml>...]
+       teuthology-suite [-v | -vv ] --suite <suite> [options] [<config_yaml>...]
+       teuthology-suite [-v | -vv ] --rerun <name>  [options] [<config_yaml>...]
 
 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
index 500720b3abda407759266caf7acc24b56e4108bb..adca68a9a219dd8fd4ba1161cc4678e4c2584123 100644 (file)
@@ -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