Revision 79f87a76
b/tools/burnin | ||
---|---|---|
55 | 55 |
parser.add_option("-v", "--verbose", |
56 | 56 |
action="store_true", dest="verbose", default=False, |
57 | 57 |
help="print command execution messages to stdout") |
58 |
parser.add_option("--do-replace1", dest="do_replace1",
|
|
58 |
parser.add_option("--no-replace1", dest="do_replace1",
|
|
59 | 59 |
help="Do disk replacement with the same secondary", |
60 | 60 |
action="store_false", default=True) |
61 |
parser.add_option("--do-replace2", dest="do_replace2",
|
|
61 |
parser.add_option("--no-replace2", dest="do_replace2",
|
|
62 | 62 |
help="Do disk replacement with a different secondary", |
63 | 63 |
action="store_false", default=True) |
64 |
parser.add_option("--do-failover", dest="do_failover",
|
|
64 |
parser.add_option("--no-failover", dest="do_failover",
|
|
65 | 65 |
help="Do instance failovers", action="store_false", |
66 | 66 |
default=True) |
67 |
parser.add_option("-t", "--disk-template", dest="disk_template", |
|
68 |
choices=("remote_raid1", "drbd8"), default="remote_raid1", |
|
69 |
help="Template type for network mirroring (remote_raid1" |
|
70 |
" or drbd8) [remote_raid1]") |
|
67 | 71 |
|
68 | 72 |
options, args = parser.parse_args() |
69 | 73 |
if len(args) < 1 or options.os is None: |
... | ... | |
111 | 115 |
return 1 |
112 | 116 |
|
113 | 117 |
to_remove = [] |
118 |
if opts.disk_template == "remote_raid1": |
|
119 |
disk_template = constants.DT_REMOTE_RAID1 |
|
120 |
elif opts.disk_template == "drbd8": |
|
121 |
disk_template = constants.DT_DRBD8 |
|
122 |
else: |
|
123 |
Feedback("Unknown disk template '%s'" % opts.disk_template) |
|
124 |
return 1 |
|
114 | 125 |
try: |
115 | 126 |
idx = 0 |
116 | 127 |
for instance_name in args: |
... | ... | |
120 | 131 |
pnode = nodelist[idx] |
121 | 132 |
snode = nodelist[next_idx] |
122 | 133 |
if len(nodelist) > 1: |
123 |
tplate = constants.DT_REMOTE_RAID1
|
|
134 |
tplate = disk_template
|
|
124 | 135 |
else: |
125 | 136 |
tplate = constants.DT_PLAIN |
126 | 137 |
|
Also available in: Unified diff