Commit 2c8e2ec9 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis

deploy: Fix context issue in update_admin

In case of a multinode setup update_admin() initialized the admin
components with wrong context since each component's constructor
used to manipulate the given and common context object.

To fix this create a copy of the context and then make any necessary
Signed-off-by: default avatarDimitris Aragiorgis <>
parent 60b0b681
......@@ -22,6 +22,7 @@ import shutil
import tempfile
import glob
import time
import copy
from snfdeploy.lib import debug
from snfdeploy import massedit
from snfdeploy import config
......@@ -261,10 +262,11 @@ class Component(ComponentRunner):
def __init__(self, ctx=None, node=None):
if not ctx:
ctx = context.Context()
self.ctx = context.Context()
self.ctx = copy.deepcopy(ctx)
if node:
ctx.node = node
self.ctx = ctx
self.ctx.node = node
self.abort = True
def required_components(self):
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