Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: setup: fix defaults initializations on additional host ......................................................................
packaging: setup: fix defaults initializations on additional host Fixed initialization of ohostedcons.VDSMEnv.VDSM_CPU using setdefault instead of direct assignment. Fixed initializatoin of variables set by remote answer file Change-Id: I959ad89b10c4cf34902d353bc6778a598eed670a Bug-Url: https://bugzilla.redhat.com/1013557 Signed-off-by: Sandro Bonazzola <sbona...@redhat.com> --- M src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py M src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup refs/changes/88/19688/1 diff --git a/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py b/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py index dd8b432..8294597 100644 --- a/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py +++ b/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py @@ -185,6 +185,7 @@ ): try: value = common.parseTypedValue(value) + self.logger.debug('%s=%s' % (name, value)) except Exception as e: raise RuntimeError( _( @@ -196,7 +197,7 @@ exception=e, ) ) - self.environment.setdefault(name, value) + self.environment[name] = value @plugin.event( stage=plugin.Stages.STAGE_INIT, diff --git a/src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py b/src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py index 434c2dd..c400eaa 100644 --- a/src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py +++ b/src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py @@ -80,7 +80,10 @@ stage=plugin.Stages.STAGE_INIT, ) def _init(self): - self.environment[ohostedcons.VDSMEnv.VDSM_CPU] = None + self.environment.setdefault( + ohostedcons.VDSMEnv.VDSM_CPU, + None + ) @plugin.event( stage=plugin.Stages.STAGE_SETUP, -- To view, visit http://gerrit.ovirt.org/19688 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I959ad89b10c4cf34902d353bc6778a598eed670a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: ovirt-hosted-engine-setup-1.0 Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches