Bug 1558828

Summary: [Regression] on a RecipeSet, beakerd assigns system again from lab controller with not enough systems
Product: [Retired] Beaker Reporter: Roman Joost <rjoost>
Component: schedulerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: Roman Joost <rjoost>
Severity: unspecified Docs Contact:
Priority: high    
Version: 25CC: achatter, dcallagh, mtyson, rjoost
Target Milestone: 25.1Keywords: Patch, Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-11 05:20:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Joost 2018-03-21 05:35:46 UTC
Description of problem:

On a scheduled RecipeSet, beakerd identifies an assigned system belonging to a lab controller which provides not enough systems to fulfil the entire RecipeSet. It correctly removes this systems in order for the scheduler to pick a system which would satisfy one from a lab controller with more systems.

However it again assigns the same system resulting in a Job with the RecipeSet getting "stuck".

Version-Release number of selected component (if applicable):
25.0

How reproducible:
100%?

Steps to Reproduce:
1. Create a RecipeSet which more than two recipes
2. Make sure you have a system which is assigned to one lab controller (with no other systems assigned), and more systems assigned to another lab controller.
3. If one recipeset receives the first system, the RecipeSet will get stuck 

Actual results:
RecipeSet stuck in Queued

Expected results:
RecipeSet processed and Completed

Additional info:
none

Comment 4 Dan Callaghan 2018-03-27 03:22:53 UTC
There was no test covering the "not enough systems" logic in its happy case. :-( I have added one.

The actual regression fix is just a session.flush() call.

https://gerrit.beaker-project.org/6046

Comment 6 Roman Joost 2018-03-29 04:10:59 UTC
Scheduled two self-tests in which the bug originated from. Both self tests ran through without scheduling problems.

https://beaker-devel.app.eng.bos.redhat.com/jobs/14112
https://beaker-devel.app.eng.bos.redhat.com/jobs/14120

Comment 7 Roman Joost 2018-04-11 05:20:00 UTC
Beaker 25.1 has been released:

https://beaker-project.org/docs/whats-new/release-25.html#beaker-25-1