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. Changing a method name and a description according to that. Change-Id: I0c4a802f3a40e2192f55caa11d05a7c6865323d5 Bug-Url: https://bugzilla.redhat.com/1161012 Signed-off-by: Simone Tiraboschi <stira...@redhat.com> --- M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py 1 file changed, 4 insertions(+), 20 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/94/38894/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 477e0f3..f448fd2 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 @@ -51,16 +51,7 @@ dbstatement, ): self._parent = parent - 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): mode = ( @@ -81,10 +72,6 @@ { 'name': 'EngineMode', 'value': mode, - }, - { - 'name': 'AsyncTaskZombieTaskLifeInMinutes', - 'value': timeout, }, ), ownConnection=True, @@ -107,11 +94,9 @@ ) def __enter__(self): - self._origTimeout = self._getCurrentTimeout() self._setEngineMode( maintenance=True, ) - self._parent.services.state( name=oenginecons.Const.ENGINE_SERVICE_NAME, state=True, @@ -124,7 +109,6 @@ ) self._setEngineMode( maintenance=False, - timeout=self._origTimeout, ) def _clearZombies(self): @@ -294,7 +278,7 @@ ] ) - def _askUserToStopTasks( + def _askUserToWaitForTasks( self, runningTasks, runningCommands, @@ -329,9 +313,9 @@ ) if not dialog.queryBoolean( dialog=self.dialog, - name='OVESETUP_STOP_RUNNING_TASKS', + name='OVESETUP_WAIT_RUNNING_TASKS', note=_( - 'Would you like to try to stop these tasks automatically?\n' + 'Would you like to try to wait for that?\n' '(Answering "no" will stop the upgrade (@VALUES@) ' ), prompt=True, @@ -464,7 +448,7 @@ ) = self._checkRunningTasks() if runningTasks or runningCommands or compensations: - self._askUserToStopTasks( + self._askUserToWaitForTasks( runningTasks, runningCommands, compensations, -- To view, visit https://gerrit.ovirt.org/38894 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c4a802f3a40e2192f55caa11d05a7c6865323d5 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches