Commit 756f85b7 authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Don't distribute meta-data, if the deamon is disabled



In such a case, the UpdateMedatada function will just return.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 46d5c003
......@@ -556,6 +556,8 @@ def UpdateMetadata(feedback_fn, rpc, instance,
"""Updates instance metadata on the metadata daemon on the
instance's primary node.
If the daemon isn't available (not compiled), do nothing.
In case the RPC fails, this function simply issues a warning and
proceeds normally.
......@@ -584,6 +586,9 @@ def UpdateMetadata(feedback_fn, rpc, instance,
@return: None
"""
if not constants.ENABLE_METAD:
return
data = instance.ToDict()
if osparams_public is not None:
......
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