Commit 130beac3 authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Check if the meta-data daemon is enabled in backend

If somebody tries to modify the meta-data, the daemon must be enabled
during configure time.
Signed-off-by: default avatarPetr Pudlak <>
Reviewed-by: default avatarKlaus Aehlig <>
parent 756f85b7
......@@ -2209,12 +2209,17 @@ def ModifyInstanceMetadata(metadata):
Uses the Luxi transport layer to communicate with the metadata
daemon configuration server. It starts the metadata daemon if it is
not running.
The daemon must be enabled during at configuration time.
@type metadata: dict
@param metadata: instance metadata obtained by calling
L{objects.Instance.ToDict} on an instance object
if not constants.ENABLE_METAD:
raise errors.ProgrammerError("The metadata deamon is disabled, yet"
" ModifyInstanceMetadata has been called")
if not utils.IsDaemonAlive(constants.METAD):
result = utils.RunCmd([pathutils.DAEMON_UTIL, "start", constants.METAD])
if result.failed:
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