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/87/38987/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 94c9fe82..1b4ccaf 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 @@ -54,16 +54,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 = ( @@ -84,10 +75,6 @@ { 'name': 'EngineMode', 'value': mode, - }, - { - 'name': 'AsyncTaskZombieTaskLifeInMinutes', - 'value': timeout, }, ), ownConnection=True, @@ -110,11 +97,9 @@ ) def __enter__(self): - self._origTimeout = self._getCurrentTimeout() self._setEngineMode( maintenance=True, ) - self._parent.services.state( name=oenginecons.Const.ENGINE_SERVICE_NAME, state=True, @@ -127,7 +112,6 @@ ) self._setEngineMode( maintenance=False, - timeout=self._origTimeout, ) def _clearZombies(self): @@ -297,7 +281,7 @@ ] ) - def _askUserToStopTasks( + def _askUserToWaitForTasks( self, runningTasks, runningCommands, @@ -332,9 +316,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/38987 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c4a802f3a40e2192f55caa11d05a7c6865323d5 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches