Revision 518a45e5
b/lib/cmdlib.py | ||
---|---|---|
9957 | 9957 |
ial.Run(self.op.iallocator) |
9958 | 9958 |
|
9959 | 9959 |
if not ial.success: |
9960 |
# When opportunistic locks are used only a temporary failure is generated |
|
9961 |
if self.op.opportunistic_locking: |
|
9962 |
ecode = errors.ECODE_TEMP_NORES |
|
9963 |
else: |
|
9964 |
ecode = errors.ECODE_NORES |
|
9965 |
|
|
9960 | 9966 |
raise errors.OpPrereqError("Can't compute nodes using" |
9961 | 9967 |
" iallocator '%s': %s" % |
9962 | 9968 |
(self.op.iallocator, ial.info), |
9963 |
errors.ECODE_NORES) |
|
9969 |
ecode) |
|
9970 |
|
|
9964 | 9971 |
self.op.pnode = ial.result[0] |
9965 | 9972 |
self.LogInfo("Selected nodes for instance %s via iallocator %s: %s", |
9966 | 9973 |
self.op.instance_name, self.op.iallocator, |
b/lib/errors.py | ||
---|---|---|
30 | 30 |
#: Not enough resources (iallocator failure, disk space, memory, etc.) |
31 | 31 |
ECODE_NORES = "insufficient_resources" |
32 | 32 |
|
33 |
#: Temporarily out of resources; operation can be tried again |
|
34 |
ECODE_TEMP_NORES = "insufficient_resources" |
|
35 |
|
|
33 | 36 |
#: Wrong arguments (at syntax level) |
34 | 37 |
ECODE_INVAL = "wrong_input" |
35 | 38 |
|
... | ... | |
55 | 58 |
ECODE_ALL = frozenset([ |
56 | 59 |
ECODE_RESOLVER, |
57 | 60 |
ECODE_NORES, |
61 |
ECODE_TEMP_NORES, |
|
58 | 62 |
ECODE_INVAL, |
59 | 63 |
ECODE_STATE, |
60 | 64 |
ECODE_NOENT, |
Also available in: Unified diff