Bug 845042

Summary: Schedule Provision immediately succeeds if system has Current User
Product: [Retired] Beaker Reporter: John Brier <jbrier>
Component: web UIAssignee: Raymond Mancy <rmancy>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 0.9CC: bpeck, dcallagh, ebaak, emcnabb, mishin, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-02 00:43:04 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 John Brier 2012-08-01 15:11:04 UTC
Description of problem:

Schedule Provision immediately succeeds if system has Current User


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

0.9

How reproducible:
100%

Steps to Reproduce:
1. Take a system so that you show up as "Current User"
2. On Provision tab Provision it
3.
  
Actual results:

It says Successfully Provisioned system-hostname


Expected results:
There should be a warning/error saying that you can't provision a system that is currently taken.

Additional info:

Comment 1 Bill Peck 2012-08-01 15:18:34 UTC
Hi John,

This is because there are two ways to use systems in beaker.

1 - Schedule a job which provisions and installs the harness.
2 - Manually provision a system

You can't do 2 until you "take" the system.

This "process" has evolved over time and I'd like to see it cleaned up.  We can do a couple of things to make this clearer..

- If there is an active job we could prevent any manual provisions.
- We could pop up a warning stating that a job is currently running and would you really like to re-install?
- If there is an active job let the user schedule a job.

Comment 2 John Brier 2012-08-01 15:39:27 UTC
(In reply to comment #1)
> Hi John,
> 
> This is because there are two ways to use systems in beaker.
> 
> 1 - Schedule a job which provisions and installs the harness.
> 2 - Manually provision a system
> 
> You can't do 2 until you "take" the system.

Hm I found that I could click Provision and provision it while I was "Current User" (what you get after you "take" the system.. but it said it "successfully Provisioned it when in fact there was no job created to provision it at all and nothing changed.

Could this be different than what you say because I have a Loan on the system?

The system in question is this:

https://beaker.engineering.redhat.com/view/intel-sharkbay-mb-01.rhts.eng.rdu.redhat.com

What I do when I encounter this behavior is return it so I am no longer a Current User, but I still have a loan, then i provision and a job is created.. like this:

https://beaker.engineering.redhat.com/jobs/269801

So the behavior I am seeing is the opposite of what you say "You can't do 2 until you "take" the system"
> 
> This "process" has evolved over time and I'd like to see it cleaned up.  We
> can do a couple of things to make this clearer..
> 
> - If there is an active job we could prevent any manual provisions.
> - We could pop up a warning stating that a job is currently running and
> would you really like to re-install?
> - If there is an active job let the user schedule a job.

I like the former idea better.

Comment 3 John Brier 2012-10-04 18:53:40 UTC
I think I may have misunderstood the behavior. Right now I have had a system where I am the current user and there is no job associated with it. I just provisioned it and it did say "Successfully Provisioned system-hostname" and a job was *not* created, but what I just noticed and which I may not have noticed or realized before is that it actually does provision it (I can see this by watching the serial console)

So now I understand what you are saying. I guess I expected that no matter how you provision it (whether from your own job or from taking it and then manually provisioning it) that a job would be created that you could watch.

The reason I expected that is that if you don't take the system first you can still provision it and a job is created that takes the system.

Sorry for the confusion. Feel free to use this bug for whatever changes you want to make, or close it.

Comment 4 Bill Peck 2012-10-04 19:14:02 UTC
This behaviour is because of the way beaker evolved over time.  When beaker was first put in place it only tracked inventory and you could only do manual provisions, there was no "scheduler".  Then we added a scheduler but still had the legacy RHTS system tied into it until all the systems could be moved over.

This was necessary because we couldn't afford long down times and its a pretty big system. 

But now that everything is under beaker control I think its confusing that we have these two different ways for things to work.

Comment 5 John Brier 2012-10-04 19:23:07 UTC
As you can see by my comments it is definitely confusing. 

In an ideal world you would be able to simplify beaker by completely removing the manual provisioning so that you could only provision via a job (scheduler), but I guess manual provisioning is a feature used by a lot of people and tools now?

Comment 6 Dan Callaghan 2012-11-02 00:43:04 UTC
We can all agree that the current Automated vs Manual distinction is quite confusing. For the time being we will need to leave it as is, but it is definitely something we will work on cleaning up in the future.