Simone Tiraboschi has uploaded a new change for review.

Change subject: packaging: setup: avoid asking about engine configuration 
during upgrade from 3.4
......................................................................

packaging: setup: avoid asking about engine configuration during upgrade from 
3.4

Avoid asking about engine configuation during an upgrade
from 3.4. engine-setup 3.4 didn't allow to skip the engine
configuration and we didn't support partial upgrades so,
if it's there, we need to upgrade the engine too.

Change-Id: Ibf0f6ac38c748e332336ddc1c05ec7d8b4df6014
Signed-off-by: Simone Tiraboschi <[email protected]>
---
M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/core/misc.py
1 file changed, 19 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/56/28956/1

diff --git 
a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/core/misc.py 
b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/core/misc.py
index f11d16f..1d5ee79 100644
--- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/core/misc.py
+++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/core/misc.py
@@ -58,18 +58,25 @@
     )
     def _customization(self):
         if self.environment[oenginecons.CoreEnv.ENABLE] is None:
-            self.environment[
-                oenginecons.CoreEnv.ENABLE
-            ] = dialog.queryBoolean(
-                dialog=self.dialog,
-                name='OVESETUP_ENGINE_ENABLE',
-                note=_(
-                    'Configure Engine on this host '
-                    '(@VALUES@) [@DEFAULT@]: '
-                ),
-                prompt=True,
-                default=True,
-            )
+            if not self.environment[oenginecons.EngineDBEnv.NEW_DATABASE]:
+                # we are upgrading from 3.4 that doesn't ask about it
+                # but we need to upgrade the engine cause has been configured
+                # in the past
+                # It can be removed in future release ( > 3.5)
+                self.environment[oenginecons.CoreEnv.ENABLE] = True
+            else:
+                self.environment[
+                    oenginecons.CoreEnv.ENABLE
+                ] = dialog.queryBoolean(
+                    dialog=self.dialog,
+                    name='OVESETUP_ENGINE_ENABLE',
+                    note=_(
+                        'Configure Engine on this host '
+                        '(@VALUES@) [@DEFAULT@]: '
+                    ),
+                    prompt=True,
+                    default=True,
+                )
 
 
 # vim: expandtab tabstop=4 shiftwidth=4


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

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

Reply via email to