Alex Lourie has uploaded a new change for review. Change subject: packaging: Updated initial interaction with user on async tasks ......................................................................
packaging: Updated initial interaction with user on async tasks The previous try/finally clause included the initial interaction with the user, where tasks were found and user was asked whether to continue (and if user continues, then restart engine in maintenance mode) If user chooses not to continue, 'finally' will kick in, and try to restore the engine configuration, although it didn't change yet. Change-Id: Ia1f1aaf7ac812d69dc81f3fb8dee5a626bc7634a Signed-off-by: Alex Lourie <alou...@redhat.com> --- M packaging/fedora/setup/engine-upgrade.py 1 file changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/52/8952/1 diff --git a/packaging/fedora/setup/engine-upgrade.py b/packaging/fedora/setup/engine-upgrade.py index c6b3117..f9c16ac 100755 --- a/packaging/fedora/setup/engine-upgrade.py +++ b/packaging/fedora/setup/engine-upgrade.py @@ -828,16 +828,17 @@ if runningTasks or compensations: + # TODO: update runningTasks names/presentation and compensations + timestamp = "\n[ " + utils.getCurrentDateTimeHuman() + " ] " + stopTasksQuestion = MSG_STOP_RUNNING_TASKS % ( + MSG_TASKS_COMPENSATIONS % (runningTasks, compensations), + timestamp, + ) + answerYes = utils.askYesNo(stopTasksQuestion) + if not answerYes: + raise Exception(output_messages.INFO_STOP_WITH_RUNNING_TASKS) + try: - # TODO: update runningTasks names/presentation and compensations - timestamp = "\n[ " + utils.getCurrentDateTimeHuman() + " ] " - stopTasksQuestion = MSG_STOP_RUNNING_TASKS % ( - MSG_TASKS_COMPENSATIONS % (runningTasks, compensations), - timestamp, - ) - answerYes = utils.askYesNo(stopTasksQuestion) - if not answerYes: - raise Exception(output_messages.INFO_STOP_WITH_RUNNING_TASKS) MAINTENANCE_TASKS_WAIT_PERIOD_MINUTES = MAINTENANCE_TASKS_WAIT_PERIOD / 60 timestamp = "\n[ " + utils.getCurrentDateTimeHuman() + " ] " -- To view, visit http://gerrit.ovirt.org/8952 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia1f1aaf7ac812d69dc81f3fb8dee5a626bc7634a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alex Lourie <alou...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches