Bug 1122659 - Scheduler->Reserve via WebUI schedules on non-Machine systems
Summary: Scheduler->Reserve via WebUI schedules on non-Machine systems
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: scheduler
Version: 0.17
Hardware: All
OS: All
high
high vote
Target Milestone: 0.17.2
Assignee: Dan Callaghan
QA Contact: Amit Saha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-23 17:27 UTC by Jiri Jaburek
Modified: 2018-02-06 00:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-30 02:35:04 UTC


Attachments (Terms of Use)

Description Jiri Jaburek 2014-07-23 17:27:46 UTC
Description of problem:

The "Reserve" UI section of the WebUI schedules jobs on systems with systype Resource. This makes it currently impossible to have a pool of machines separated from the main pool, which was previously possible ie. with a custom key-value and non-Machine systype.

The "show systems" button doesn't seem to list those systems, but actually doing "auto pick system" can use them for reservation.

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

How reproducible:
should be easy to reproduce using a user with access to just a few machines

Steps to Reproduce:
1. open the Scheduler->Reserve section of the WebUI
2. select any matching tree
3. select architecture supported by the machine
4. click "Auto pick system"

Actual results:
systems with non-Machine systype can be (by default) reserved

Expected results:
only Machine systems can be (by default) reserved

Additional info:

Comment 2 Nick Coghlan 2014-07-24 00:07:32 UTC
Limiting "Auto pick system" to Machine systems in Automated mode makes sense to me.

We should also document that in the architecture guide as a general principle: if Beaker is picking the system implicitly, then we limit the pool to Machine+Automated. If users are choosing systems by name (whether through the web UI or via "force"), then we can be more permissive.

Comment 3 Dan Callaghan 2014-07-24 01:54:38 UTC
The hack to inject <system_type/> into <hostRequires/> when it's not present, does not seem to be taking effect. Currently not sure what has gone wrong but I am assuming it's a regression in 0.17.

Comment 4 Jiri Jaburek 2014-07-24 09:48:24 UTC
(In reply to Dan Callaghan from comment #3)
> The hack to inject <system_type/> into <hostRequires/> when it's not
> present, does not seem to be taking effect. Currently not sure what has gone
> wrong but I am assuming it's a regression in 0.17.

Yes, sorry for not making that clear, it wasn't happening prior to 0.17.

Comment 5 Dan Callaghan 2014-07-28 07:28:40 UTC
The problem was introduced with this commit in Beaker 0.17.0 (early return from _get_host_requires):

https://git.beaker-project.org/cgit/beaker/commit/?id=493a56da22981c58bfe3d0ed9a16d830966c7513

However I am not really happy with the magic <system_type/> injection happening in the getter for Recipe.host_requires (because of this exact reason, it is too easy to miss it). For release-0.17 we can fix up the logic for _get_host_requires but for develop I would prefer to move the <system_type/> injection to job submission time, to make it more explicit.

Comment 6 Dan Callaghan 2014-07-28 07:48:55 UTC
(In reply to Dan Callaghan from comment #5)
> For release-0.17 we can fix up the logic
> for _get_host_requires but for develop I would prefer to move the
> <system_type/> injection to job submission time, to make it more explicit.

Actually on second thought we can never move it, because that will break cloning existing recipes which haven't already had <system_type/> injected.

Comment 7 Dan Callaghan 2014-07-28 08:02:23 UTC
On Gerrit: http://gerrit.beaker-project.org/3221

Comment 8 Dan Callaghan 2014-07-29 00:25:24 UTC
(In reply to Jiri Jaburek from comment #0)
> Steps to Reproduce:
> 1. open the Scheduler->Reserve section of the WebUI
> 2. select any matching tree
> 3. select architecture supported by the machine
> 4. click "Auto pick system"
> 
> Actual results:
> systems with non-Machine systype can be (by default) reserved
> 
> Expected results:
> only Machine systems can be (by default) reserved

The behaviour can be verified more reliably by just looking at the <hostRequires/> in the cloned job.

Step 5. clone the job which was submitted through Reserve Workflow

Actual results:
Job contains <hostRequires/> meaning that the scheduler may pick non-Machine systems.

Expected results:
Job contains <hostRequires><system_type value="Machine"/></hostRequires> so that the scheduler only picks Machine system type.

Comment 11 Amit Saha 2014-07-30 02:35:04 UTC
beaker-0.17.2 has been released.


Note You need to log in before you can comment on or make changes to this bug.