Skip to content
Snippets Groups Projects
Commit ff0c9604 authored by Guido Trotter's avatar Guido Trotter
Browse files

One more offline+shutdown fix


Currently gnt-instance shutdown --force of an offline instance
resets the offline status. Which of course is bad and completely
unintended. Fix. (caught by the new qa tests)

Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 13659147
No related branches found
No related tags found
No related merge requests found
...@@ -7177,7 +7177,9 @@ class LUInstanceShutdown(LogicalUnit): ...@@ -7177,7 +7177,9 @@ class LUInstanceShutdown(LogicalUnit):
node_current = instance.primary_node node_current = instance.primary_node
timeout = self.op.timeout timeout = self.op.timeout
   
if not self.op.no_remember: # If the instance is offline we shouldn't mark it as down, as that
# resets the offline flag.
if not self.op.no_remember and instance.admin_state in INSTANCE_ONLINE:
self.cfg.MarkInstanceDown(instance.name) self.cfg.MarkInstanceDown(instance.name)
   
if self.primary_offline: if self.primary_offline:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment