Version-Release number of selected component (if applicable): 19.2 Steps to Reproduce: 1. Submit a recipe with 2 or more tasks, and <reservesys/>. For easy reproduction, use: <task name="/distribution/install"/> <task name="/distribution/reservesys"/> <reservesys/> 2. Wait until the recipe is running, with the first task completed and the second task running. 3. Cancel the job. Actual results: Recipe goes to "Reserved" status and the system is held for 24 more hours. Expected results: Job is cancelled.
Failing test case: index 9a41bf7..c7bcb8b 100644 --- a/IntegrationTests/src/bkr/inttest/server/test_update_status.py +++ b/IntegrationTests/src/bkr/inttest/server/test_update_status.py @@ -206,12 +206,14 @@ def test_recipe_running_then_cancelled(self): """ with session.begin(): recipe = data_setup.create_recipe( - task_list=[Task.by_name(u'/distribution/install')], + task_list=[Task.by_name(u'/distribution/install')] * 2, reservesys=True) job = data_setup.create_job_for_recipes([recipe]) job_id = job.id data_setup.mark_recipe_running(recipe) - job._mark_dirty() + data_setup.mark_recipe_installation_finished(recipe) + job.recipesets[0].recipes[0].tasks[0].stop() + job.recipesets[0].recipes[0].tasks[1].start() beakerd.update_dirty_jobs() with session.begin(): job = Job.by_id(job_id) Bug 714937 should solve this bug for free (the problem happens because Completed is "lower severity" than Cancelled and hence the min_status in update_status is Completed instead of Cancelled in this case).
Test case only (this is fixed by bug 714937): http://gerrit.beaker-project.org/4190
Beaker 21.0 has been released.