Revision d8378091 tools/burnin
b/tools/burnin | ||
---|---|---|
52 | 52 |
2: "", |
53 | 53 |
} |
54 | 54 |
|
55 |
#: Disk templates supporting a single node |
|
56 |
_SINGLE_NODE_DISK_TEMPLATES = compat.UniqueFrozenset([ |
|
57 |
constants.DT_DISKLESS, |
|
58 |
constants.DT_PLAIN, |
|
59 |
constants.DT_FILE, |
|
60 |
constants.DT_SHARED_FILE, |
|
61 |
]) |
|
62 |
|
|
63 |
_SUPPORTED_DISK_TEMPLATES = compat.UniqueFrozenset([ |
|
64 |
constants.DT_DISKLESS, |
|
65 |
constants.DT_DRBD8, |
|
66 |
constants.DT_EXT, |
|
67 |
constants.DT_FILE, |
|
68 |
constants.DT_PLAIN, |
|
69 |
constants.DT_RBD, |
|
70 |
constants.DT_SHARED_FILE, |
|
71 |
]) |
|
72 |
|
|
73 |
#: Disk templates for which import/export is tested |
|
74 |
_IMPEXP_DISK_TEMPLATES = (_SUPPORTED_DISK_TEMPLATES - frozenset([ |
|
75 |
constants.DT_DISKLESS, |
|
76 |
constants.DT_FILE, |
|
77 |
constants.DT_SHARED_FILE, |
|
78 |
])) |
|
79 |
|
|
55 | 80 |
|
56 | 81 |
class InstanceDown(Exception): |
57 | 82 |
"""The checked instance was not up""" |
... | ... | |
460 | 485 |
elif options.minmem_size > options.maxmem_size: |
461 | 486 |
Err("Maximum memory lower than minimum memory") |
462 | 487 |
|
463 |
supported_disk_templates = (constants.DT_DISKLESS, |
|
464 |
constants.DT_FILE, |
|
465 |
constants.DT_SHARED_FILE, |
|
466 |
constants.DT_PLAIN, |
|
467 |
constants.DT_DRBD8, |
|
468 |
constants.DT_RBD, |
|
469 |
constants.DT_EXT, |
|
470 |
) |
|
471 |
if options.disk_template not in supported_disk_templates: |
|
488 |
if options.disk_template not in _SUPPORTED_DISK_TEMPLATES: |
|
472 | 489 |
Err("Unknown disk template '%s'" % options.disk_template) |
473 | 490 |
|
474 | 491 |
if options.disk_template == constants.DT_DISKLESS: |
... | ... | |
1036 | 1053 |
Log("Testing global parameters") |
1037 | 1054 |
|
1038 | 1055 |
if (len(self.nodes) == 1 and |
1039 |
opts.disk_template not in (constants.DT_DISKLESS, constants.DT_PLAIN, |
|
1040 |
constants.DT_FILE, |
|
1041 |
constants.DT_SHARED_FILE)): |
|
1056 |
opts.disk_template not in _SINGLE_NODE_DISK_TEMPLATES): |
|
1042 | 1057 |
Err("When one node is available/selected the disk template must" |
1043 |
" be 'diskless', 'file' or 'plain'")
|
|
1058 |
" be one of %s" % utils.CommaJoin(_SINGLE_NODE_DISK_TEMPLATES))
|
|
1044 | 1059 |
|
1045 | 1060 |
if opts.do_confd_tests and not constants.ENABLE_CONFD: |
1046 | 1061 |
Err("You selected confd tests but confd was disabled at configure time") |
... | ... | |
1080 | 1095 |
self.BurnMove() |
1081 | 1096 |
|
1082 | 1097 |
if (opts.do_importexport and |
1083 |
opts.disk_template not in (constants.DT_DISKLESS, |
|
1084 |
constants.DT_SHARED_FILE, |
|
1085 |
constants.DT_FILE)): |
|
1098 |
opts.disk_template in _IMPEXP_DISK_TEMPLATES): |
|
1086 | 1099 |
self.BurnImportExport() |
1087 | 1100 |
|
1088 | 1101 |
if opts.do_reinstall: |
Also available in: Unified diff