Bug 1102442 - [RFE] Allow Reserved systems to be returned from bkr client
Summary: [RFE] Allow Reserved systems to be returned from bkr client
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: develop
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 20.2
Assignee: matt jia
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-29 01:10 UTC by Nick Coghlan
Modified: 2018-02-06 00:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-15 03:37:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Nick Coghlan 2014-05-29 01:10:20 UTC
The new <reservesys/> element introduced in RFE #639938 allows systems to be reserved in a way that the scheduler is aware of.

The "bkr system-release" command should be updated to also be able to release these systems, in addition to working for systems reserved via "bkr system-reserve".

(They may be separate APIs on the server, but in that case, a common shortcut API that automatically does the right thing based on the current system state is still likely to offer a cleaner user experience in the client)

This will still release the system by FQDN, even through there is an associated recipe ID. There are a few different reasons for this:

1. It maintains a consistent interface for releasing the system, regardless of how it was reserved.
2. The way to release a system reserved via reservesys is "ssh FQDN return2beaker.sh". This changes that to "bkr system-release FQDN" for systems reserved via the new mechanism.
3. When the "Reserve Workflow" is switched over to the new mechanism (see RFE #1102440) then the user may not even be fully aware that there is a scheduler recipe involved in the provisioning process.

With the reservation changes, a separate "job-release" command that accepts a job/recipeset/recipe identifier may also make sense, but that would be a separate RFE.

Comment 1 Bill Peck 2014-11-07 20:16:40 UTC
Can we bump the priority to this?  We would like to switch jenkins over to using this new reservesys mode and can't easily do it until we can extend and return early.

Thanks

Comment 2 Nick Coghlan 2014-11-11 09:21:36 UTC
Beaker 19.1 sprint planning is next week, it should be possible to take a look at this one.

Comment 3 matt jia 2015-06-22 06:55:13 UTC
On Gerrit:

  http://gerrit.beaker-project.org/#/c/4265/

Comment 4 matt jia 2015-07-01 06:18:39 UTC
Verify steps:

1. create a job with <reservesys/> in a recipe.

2. Once the job status is "Reserved", use bkr system-release R:<recipe_id> or T:<recipetask_id> or system fqdn to return the system.

Comment 5 Amit Saha 2015-07-01 06:23:48 UTC
I would suggest the verification step also include returning the system from the test system itself...since we have return2beaker.sh when using the "reservesys" task.

Comment 6 matt jia 2015-07-01 06:30:28 UTC
(In reply to Amit Saha from comment #5)
> I would suggest the verification step also include returning the system from
> the test system itself...since we have return2beaker.sh when using the
> "reservesys" task.

Yeah, that's a fair point although there is no code change for this script.

Comment 7 Dan Callaghan 2015-07-02 05:24:06 UTC
(In reply to Amit Saha from comment #5)
> I would suggest the verification step also include returning the system from
> the test system itself...since we have return2beaker.sh when using the
> "reservesys" task.

This RFE is for beaker-client so it's not expected that you will be able to use this command on the test systems -- unless you first install the client, and configure it with suitable authentication etc.

We're not planning to offer any equivalent to return2beaker.sh for <reservesys/>, mainly because the entire point of <reservesys/> is that it doesn't change the state of the system at all.

Comment 8 Amit Saha 2015-07-02 05:26:15 UTC
(In reply to Dan Callaghan from comment #7)
> (In reply to Amit Saha from comment #5)
> > I would suggest the verification step also include returning the system from
> > the test system itself...since we have return2beaker.sh when using the
> > "reservesys" task.
> 
> This RFE is for beaker-client so it's not expected that you will be able to
> use this command on the test systems -- unless you first install the client,
> and configure it with suitable authentication etc.

Right, but it is a potential use case, especially if someone is looking for a command line equivalent of "Release System" from the Web UI.

Comment 9 Dan Callaghan 2015-07-15 03:37:26 UTC
This was actually included in the 20.2 bug fix release.


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