Commit eec7840a authored by Guido Trotter's avatar Guido Trotter
Browse files

Allow running instances to be put online



If an instance is running (eg. ERROR_up) and at the same time offline,
there's no way to either shut it down or reonline it. This allows
onlining it. Offlining is still disabled for running instances.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 05325a35
......@@ -13419,12 +13419,9 @@ class LUInstanceSetParams(LogicalUnit):
ispec[constants.ISPEC_DISK_COUNT] = len(disk_sizes)
ispec[constants.ISPEC_DISK_SIZE] = disk_sizes
 
if self.op.offline is not None:
if self.op.offline:
msg = "can't change to offline"
else:
msg = "can't change to online"
_CheckInstanceState(self, instance, CAN_CHANGE_INSTANCE_OFFLINE, msg=msg)
if self.op.offline is not None and self.op.offline:
_CheckInstanceState(self, instance, CAN_CHANGE_INSTANCE_OFFLINE,
msg="can't change to offline")
 
# Pre-compute NIC changes (necessary to use result in hooks)
self._nic_chgdesc = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment