Simone Tiraboschi has uploaded a new change for review.

Change subject: packaging: setup: avoid setting 
AsyncTaskZombieTaskLifeInMinutes to 0
......................................................................

packaging: setup: avoid setting AsyncTaskZombieTaskLifeInMinutes to 0

Avoid setting AsyncTaskZombieTaskLifeInMinutes to 0 otherwise every
task is always considered a zombie.

Change-Id: Ia7bdf24831e8974daa5fd6735c1402a8cb12b6ea
Bug-Url: https://bugzilla.redhat.com/1161012
Signed-off-by: Simone Tiraboschi <[email protected]>
---
M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py
1 file changed, 1 insertion(+), 26 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/48/38848/1

diff --git 
a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py 
b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py
index a0e6ccd..5c0cb2c 100644
--- 
a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py
+++ 
b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py
@@ -57,15 +57,7 @@
             self._origTimeout = 0
             self._dbstatement = dbstatement
 
-        def _getCurrentTimeout(self):
-            return vdcoption.VdcOption(
-                statement=self._dbstatement,
-            ).getVdcOption(
-                name='AsyncTaskZombieTaskLifeInMinutes',
-                ownConnection=True,
-            )
-
-        def _setEngineMode(self, maintenance, timeout=0):
+        def _setEngineMode(self, maintenance):
             mode = (
                 'MAINTENANCE' if maintenance
                 else 'ACTIVE'
@@ -77,21 +69,6 @@
                     )
                 )
 
-                vdcoption.VdcOption(
-                    statement=self._dbstatement,
-                ).updateVdcOptions(
-                    options=(
-                        {
-                            'name': 'EngineMode',
-                            'value': mode,
-                        },
-                        {
-                            'name': 'AsyncTaskZombieTaskLifeInMinutes',
-                            'value': timeout,
-                        },
-                    ),
-                    ownConnection=True,
-                )
             except Exception as e:
                 self._parent.logger.debug(
                     'Cannot set engine mode',
@@ -110,7 +87,6 @@
                 )
 
         def __enter__(self):
-            self._origTimeout = self._getCurrentTimeout()
             self._setEngineMode(
                 maintenance=True,
             )
@@ -127,7 +103,6 @@
             )
             self._setEngineMode(
                 maintenance=False,
-                timeout=self._origTimeout,
             )
 
     def _clearZombies(self):


-- 
To view, visit https://gerrit.ovirt.org/38848
To unsubscribe, visit https://gerrit.ovirt.org/settings

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

Reply via email to