Revision 2e9635ca
b/lib/cmdlib.py | ||
---|---|---|
11233 | 11233 |
raise errors.ProgrammerError("Unknown instance '%s' passed to" |
11234 | 11234 |
" IAllocator" % self.name) |
11235 | 11235 |
|
11236 |
if instance.disk_template not in constants.DTS_NET_MIRROR:
|
|
11236 |
if instance.disk_template not in constants.DTS_MIRRORED:
|
|
11237 | 11237 |
raise errors.OpPrereqError("Can't relocate non-mirrored instances", |
11238 | 11238 |
errors.ECODE_INVAL) |
11239 | 11239 |
|
11240 |
if len(instance.secondary_nodes) != 1: |
|
11240 |
if instance.disk_template in constants.DTS_NET_MIRROR and \ |
|
11241 |
len(instance.secondary_nodes) != 1: |
|
11241 | 11242 |
raise errors.OpPrereqError("Instance has not exactly one secondary node", |
11242 | 11243 |
errors.ECODE_STATE) |
11243 | 11244 |
|
Also available in: Unified diff