Revision 54155f52 scripts/gnt-instance
b/scripts/gnt-instance | ||
---|---|---|
756 | 756 |
new_2ndary = opts.new_secondary |
757 | 757 |
iallocator = opts.iallocator |
758 | 758 |
if opts.disks is None: |
759 |
disks = ["sda", "sdb"]
|
|
759 |
disks = [] |
|
760 | 760 |
else: |
761 |
disks = opts.disks.split(",") |
|
761 |
try: |
|
762 |
disks = [int(i) for i in opts.disks.split(",")] |
|
763 |
except ValueError, err: |
|
764 |
raise errors.OpPrereqError("Invalid disk index passed: %s" % str(err)) |
|
762 | 765 |
if opts.on_primary == opts.on_secondary: # no -p or -s passed, or both passed |
763 | 766 |
mode = constants.REPLACE_DISK_ALL |
764 | 767 |
elif opts.on_primary: # only on primary: |
Also available in: Unified diff