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
otopi environment variable:
 OVESETUP_SYSTEM/configNFSOnUpgrade

Change-Id: I1fb4a9eb4af5e811a1fa1a63b8c11126b01ae56c
Related-To: http://gerrit.ovirt.org/26043
Bug-Url: https://bugzilla.redhat.com/1056777
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M packaging/setup/ovirt_engine_setup/constants.py
M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py
2 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/26370/1

diff --git a/packaging/setup/ovirt_engine_setup/constants.py 
b/packaging/setup/ovirt_engine_setup/constants.py
index 9a844ab..1790b75 100644
--- a/packaging/setup/ovirt_engine_setup/constants.py
+++ b/packaging/setup/ovirt_engine_setup/constants.py
@@ -794,6 +794,7 @@
     SELINUX_RESTORE_PATHS = 'OVESETUP_SYSTEM/selinuxRestorePaths'
 
     NFS_SERVICE_NAME = 'OVESETUP_SYSTEM/nfsServiceName'
+    CONFIG_NFS_ON_UPGRADE = 'OVESETUP_SYSTEM/configNFSOnUpgrade'
 
     @osetupattrs(
         answerfile=True,
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..ff3d498 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.
@@ -71,6 +71,10 @@
             osetupcons.SystemEnv.NFS_SERVICE_NAME,
             None
         )
+        self.environment.setdefault(
+            osetupcons.SystemEnv.CONFIG_NFS_ON_UPGRADE,
+            False
+        )
         self._enabled = True
 
     @plugin.event(
@@ -98,7 +102,9 @@
             else:
                 self._enabled = False
         if not self.environment[osetupcons.DBEnv.NEW_DATABASE]:
-            self._enabled = False
+            self._enabled = self.environment[
+                osetupcons.SystemEnv.CONFIG_NFS_ON_UPGRADE
+            ]
 
     @plugin.event(
         stage=plugin.Stages.STAGE_CUSTOMIZATION,


-- 
To view, visit http://gerrit.ovirt.org/26370
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fb4a9eb4af5e811a1fa1a63b8c11126b01ae56c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to