Revision 9869360c
b/tools/burnin | ||
---|---|---|
182 | 182 |
cli.cli_option("-t", "--disk-template", dest="disk_template", |
183 | 183 |
choices=list(constants.DISK_TEMPLATES), |
184 | 184 |
default=constants.DT_DRBD8, |
185 |
help="Disk template (diskless, file, plain or drbd) [drbd]"), |
|
185 |
help="Disk template (diskless, file, plain, sharedfile" |
|
186 |
" or drbd) [drbd]"), |
|
186 | 187 |
cli.cli_option("-n", "--nodes", dest="nodes", default="", |
187 | 188 |
help=("Comma separated list of nodes to perform" |
188 | 189 |
" the burnin on (defaults to all nodes)"), |
... | ... | |
439 | 440 |
|
440 | 441 |
supported_disk_templates = (constants.DT_DISKLESS, |
441 | 442 |
constants.DT_FILE, |
443 |
constants.DT_SHARED_FILE, |
|
442 | 444 |
constants.DT_PLAIN, |
443 | 445 |
constants.DT_DRBD8) |
444 | 446 |
if options.disk_template not in supported_disk_templates: |
... | ... | |
980 | 982 |
|
981 | 983 |
if (len(self.nodes) == 1 and |
982 | 984 |
opts.disk_template not in (constants.DT_DISKLESS, constants.DT_PLAIN, |
983 |
constants.DT_FILE)): |
|
985 |
constants.DT_FILE, |
|
986 |
constants.DT_SHARED_FILE)): |
|
984 | 987 |
Err("When one node is available/selected the disk template must" |
985 | 988 |
" be 'diskless', 'file' or 'plain'") |
986 | 989 |
|
... | ... | |
997 | 1000 |
compat.any(n > 0 for n in self.disk_growth)): |
998 | 1001 |
self.BurnGrowDisks() |
999 | 1002 |
|
1000 |
if opts.do_failover and opts.disk_template in constants.DTS_NET_MIRROR:
|
|
1003 |
if opts.do_failover and opts.disk_template in constants.DTS_MIRRORED:
|
|
1001 | 1004 |
self.BurnFailover() |
1002 | 1005 |
|
1003 | 1006 |
if opts.do_migrate: |
1004 |
if opts.disk_template != constants.DT_DRBD8: |
|
1005 |
Log("Skipping migration (disk template not DRBD8)") |
|
1007 |
if opts.disk_template not in constants.DTS_MIRRORED: |
|
1008 |
Log("Skipping migration (disk template %s does not support it)", |
|
1009 |
opts.disk_template) |
|
1006 | 1010 |
elif not self.hv_class.CAN_MIGRATE: |
1007 | 1011 |
Log("Skipping migration (hypervisor %s does not support it)", |
1008 | 1012 |
self.hypervisor) |
... | ... | |
1015 | 1019 |
|
1016 | 1020 |
if (opts.do_importexport and |
1017 | 1021 |
opts.disk_template not in (constants.DT_DISKLESS, |
1022 |
constants.DT_SHARED_FILE, |
|
1018 | 1023 |
constants.DT_FILE)): |
1019 | 1024 |
self.BurnImportExport() |
1020 | 1025 |
|
Also available in: Unified diff