Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: setup: NFS config on update change ......................................................................
packaging: setup: NFS config on update change Allow user to override the new behavior of not re-configuring NFS while upgrading. User may now override the default behavior by setting otopi environment variable: OVESETUP_SYSTEM/nfsConfigEnabled Change-Id: I1fb4a9eb4af5e811a1fa1a63b8c11126b01ae56c Related-To: http://gerrit.ovirt.org/26043 Bug-Url: https://bugzilla.redhat.com/1056777 Signed-off-by: Sandro Bonazzola <sbona...@redhat.com> (cherry picked from commit 8e1055290a636967f4f2eb8ec54c1a5c00721efa) --- M packaging/setup/ovirt_engine_setup/constants.py M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py 2 files changed, 15 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/86/26386/1 diff --git a/packaging/setup/ovirt_engine_setup/constants.py b/packaging/setup/ovirt_engine_setup/constants.py index d869d51..ca10e55 100644 --- a/packaging/setup/ovirt_engine_setup/constants.py +++ b/packaging/setup/ovirt_engine_setup/constants.py @@ -1,6 +1,6 @@ # # ovirt-engine-setup -- ovirt engine setup -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013-2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -803,7 +803,6 @@ answerfile=True, summary=True, description=_('NFS setup'), - postinstallfile=True, summary_condition=lambda env: env[ SystemEnv.NFS_CONFIG_ENABLED ], diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py index 001e445..e2dba6a 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py @@ -1,6 +1,6 @@ # # ovirt-engine-setup -- ovirt engine setup -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013-2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -60,13 +60,19 @@ )[0] @plugin.event( - stage=plugin.Stages.STAGE_INIT, + stage=plugin.Stages.STAGE_BOOT, ) - def _init(self): + def _boot(self): + # Override existing post installs self.environment.setdefault( osetupcons.SystemEnv.NFS_CONFIG_ENABLED, None ) + + @plugin.event( + stage=plugin.Stages.STAGE_INIT, + ) + def _init(self): self.environment.setdefault( osetupcons.SystemEnv.NFS_SERVICE_NAME, None @@ -97,8 +103,11 @@ break else: self._enabled = False - if not self.environment[osetupcons.DBEnv.NEW_DATABASE]: - self._enabled = False + if self.environment[osetupcons.SystemEnv.NFS_CONFIG_ENABLED] is None: + if not self.environment[osetupcons.DBEnv.NEW_DATABASE]: + self.environment[ + osetupcons.SystemEnv.NFS_CONFIG_ENABLED + ] = False @plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, -- To view, visit http://gerrit.ovirt.org/26386 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1fb4a9eb4af5e811a1fa1a63b8c11126b01ae56c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches