Bug 855333 - Can not "schedule provision" machine I own while my job is running
Can not "schedule provision" machine I own while my job is running
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: web UI (Show other bugs)
0.9
Unspecified Unspecified
unspecified Severity high (vote)
: 0.15
: ---
Assigned To: Dan Callaghan
tools-bugs
UX
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-07 08:22 EDT by Marian Csontos
Modified: 2013-10-02 22:29 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-02 22:29:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marian Csontos 2012-09-07 08:22:52 EDT
Description of problem:
I am owner of a machine (zaphod.lab.eng.brq.redhat.com)
I can schedule provisioning on the system's "Provision" tab.

But once my job is running:

1. there is only "Provision" link available scheduling immediate reinstalling and no way to queue another provisioning job.
2. doing so silently overrides my[1] running job. This is very VERY *BAD* as it will result in losing work in progress..
3. the job keeps running and will get killed by External watchdog, as the harness is not answering.  And the EWD will again result in losing work on the freshly provisioned system.

As it may result in losing work I am setting severity high for the bug.

[1] I have not tried this when the running job is owned by another person.

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

How reproducible:
so far 100%

Steps to Reproduce:
1. pwn a machine
2. go to provision tab and schedule a job
3. wait until it is running
4. go to provision tab and schedule a job
  
Actual results:
- machine is rebooted and provisioning starts
- no way how to queue the job from provision tab

Expected results:
- there should be a way to queue a job on the machine
- reprovisionning a machine running a job, should be available to the owner warning this will abort any running job

Additional info:
Comment 1 Dan Callaghan 2013-06-24 19:58:09 EDT
This bug is not fixed.

The behaviour described is actually by design, but it's a user experience problem (as pointed out in the bug description) because the Provision tab does two drastically different things (scheduling a job vs. provisioning the system immediately) depending on the state of the system, but the UI looks exactly the same for both apart from slightly different wording in the link at the bottom.
Comment 2 wangjing 2013-06-24 21:02:15 EDT
hi, Dan, 

I tested it yesterday following steps in comment0:
1. pwn a machine
2. go to provision tab and schedule a job
3. wait until it is running
4. go to provision tab and schedule a job

the actual result is:
the 2nd job queued up and the 1st job was not affected on the same machine.

env:
bearker-devel Version - 0.13.1

so I thought it had been  fixed on current release and its version is old(its version is 0.9.3)
thanks.
Comment 4 Dan Callaghan 2013-09-08 23:27:36 EDT
(In reply to wangjing from comment #2)
> I tested it yesterday following steps in comment0:
> 1. pwn a machine
> 2. go to provision tab and schedule a job
> 3. wait until it is running
> 4. go to provision tab and schedule a job
> 
> the actual result is:
> the 2nd job queued up and the 1st job was not affected on the same machine.

I think you also need to be the owner of the system.
Comment 5 Dan Callaghan 2013-09-08 23:30:38 EDT
I tidied this up as part of implementing access policies because the existing code for Schedule Provision/Provision Now was very confusing.

http://gerrit.beaker-project.org/2196

Take/Return will not be visible for Automated systems. The Provision tab will always show "Schedule Provision" and will always schedule a new job for Automated systems.

For Manual systems, the Provision tab will always show "Provision Now" (not "Schedule Provision") and will always immediately provision the system -- but only if the user has already reserved it using Take.
Comment 7 xjia 2013-09-13 06:02:23 EDT
Verify:

If system is "automated"
1. web-ui: ‘Take' and ’return' is invisible 
2. The provision tab shows "Schedule Provision". 
3. When click "Schedule Provision" button, will create a new job.

If system is "manual"
1. The provision tab shows "Provision", not **"Provision now"**
2. When click "provision" button, immediately provision the system
Comment 8 Nick Coghlan 2013-10-02 22:29:53 EDT
Beaker 0.15 has been released.

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