Bug 812831

Summary: Allow ack/nack from command line
Product: [Retired] Beaker Reporter: Zbysek MRAZ <zmraz>
Component: web UIAssignee: Raymond Mancy <rmancy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 0.9CC: azelinka, bpeck, dcallagh, ebaak, ebenes, jscotka, psklenar, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-26 06:40:11 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:
Bug Depends On:    
Bug Blocks: 593663, 798710, 798713, 789359, 836167, 836175    

Description Zbysek MRAZ 2012-04-16 11:23:47 UTC
Description of problem:
When trying to login using non-kerberized user, the webui is still displaying login prompt, not allowing to login. As example you can try with daemons-test-review user.

Comment 1 Jan Ščotka 2012-04-16 12:03:08 UTC
user name problem is connected with bug:
https://bugzilla.redhat.com/show_bug.cgi?id=809076
We tried more possibilities of usernames:

baseos-qe
daemons-test-review
daemons-test-review

   regards
   Honza

Comment 2 Jan Ščotka 2012-04-16 13:00:21 UTC
Reason why we need access web interface with that user is, that we need to do some ACK/NACK for recipesets. And there is needed to be logged is under mentioned user

so solutins are two:
 first is to implement bug in previous comment and allow users what are CCed also ACK/NACK, cancel jobs

 second is implement "bkr recipe-ack/recipe-nack" as command line tool where the user is allowed.
Doinf Cancel is allowed from command line, only ack/nack is not implemented

for me the best is to implement both functions

   Regards
   Honza

Comment 3 Bill Peck 2012-04-17 12:58:31 UTC
We can add the command line options to ack/nack.

Comment 4 Jan Ščotka 2012-04-17 13:13:05 UTC
Hi,
okay. it will be enought at least for now.

Command line tool should also know how to change retention tag for job, it is also important for us.

   Thanks
   Honza

Comment 5 Raymond Mancy 2012-05-13 23:37:31 UTC
Sorry, I didn't read this carefully. I have only implemented the ack/nak via cmd line, not the retention tag. I've created a new BZ for the retention tag functionality,  821287.

Comment 7 Ales Zelinka 2012-05-15 11:52:23 UTC
Thanks for the fix but I can't test it as there are no distros available on the stage server. Every job I try to schedule ends with "Failed to import job because of: u'No distro tree matches Recipe:..."

Comment 8 Bill Peck 2012-05-15 14:21:37 UTC
(In reply to comment #7)
> Thanks for the fix but I can't test it as there are no distros available on the
> stage server. Every job I try to schedule ends with "Failed to import job
> because of: u'No distro tree matches Recipe:..."

Sorry about that..  We are aware of the problem and should have it resolved some time Today.

Comment 9 Ales Zelinka 2012-05-31 15:28:16 UTC
I've updated to the newest beaker-client from beaker-stage repo:
beaker-client-0.8.2-8.el6eso.noarch

But it doesn't seem to support the recipeset nacking:
$ bkr help |grep -i nack
$

Comment 16 Raymond Mancy 2012-06-07 04:50:13 UTC
http://gerrit.beaker-project.org/#/c/1123/

Comment 17 Ales Zelinka 2012-06-08 16:21:26 UTC
I've tested the job-modify action and, except the already known issue with re-modifying response, it works well. 

Few minor issues I've noticed:

 * non-zero exit code for errors

 * job-modify should give better error message when called with unsupported parameter:
$ bkr job-modify -r wqeq J:16365
<Fault 1: "<class 'sqlalchemy.orm.exc.NoResultFound'>:No row was found for one()">
No jobs modified

 * I can pre-ack/nak a job/recipeSet before it's finished. Not sure if it's a feature or bug. But WebUI doesn't allow this.

Comment 18 Ales Zelinka 2012-06-08 16:47:19 UTC
>  * non-zero exit code for errors
I mean, *should be* non-zero, currently it isn't.

Comment 19 Raymond Mancy 2012-06-17 23:18:56 UTC
(In reply to comment #17)
> I've tested the job-modify action and, except the already known issue with
> re-modifying response, it works well. 
> 
> Few minor issues I've noticed:
> 
>  * non-zero exit code for errors
> 
>  * job-modify should give better error message when called with unsupported
> parameter:
> $ bkr job-modify -r wqeq J:16365
> <Fault 1: "<class 'sqlalchemy.orm.exc.NoResultFound'>:No row was found for
> one()">
> No jobs modified
> 

These have now been updated on stage.

>  * I can pre-ack/nak a job/recipeSet before it's finished. Not sure if it's
> a feature or bug. But WebUI doesn't allow this.

This should be perfectly harmless, but you're right, it is inconsistent with the WebUI.

Comment 21 Dan Callaghan 2012-06-26 06:40:11 UTC
Beaker 0.9.0 has been released.