Commit 455a3445 authored by Iustin Pop's avatar Iustin Pop
Browse files

Only change instance status if not already so

This patch makes the _SetInstanceStatus only change the status of the
instance (in the config file) if it's not already in the desired state.
This skips the increase of the config serial no without actual data

Reviewed-by: ultrotter
parent 6a408fb2
......@@ -319,8 +319,9 @@ class ConfigWriter:
raise errors.ConfigurationError("Unknown instance '%s'" %
instance = self._config_data.instances[instance_name]
instance.status = status
if instance.status != status:
instance.status = status
def MarkInstanceUp(self, instance_name):
"""Mark the instance status to up in the config.
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