Bug 906803 - [Beaker][command-line] watchdog-extend vs. watchdogs-extend
Summary: [Beaker][command-line] watchdog-extend vs. watchdogs-extend
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.12
Assignee: Amit Saha
QA Contact: Raymond Mancy
URL:
Whiteboard: CommandLineEnhancement
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-01 14:23 UTC by Jeff Burke
Modified: 2018-02-06 00:41 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-04-11 04:56:48 UTC
Embargoed:


Attachments (Terms of Use)

Description Jeff Burke 2013-02-01 14:23:49 UTC
Description of problem:

I was trying ot extend my task watchdog from the command line with this command:
 $ bkr watchdogs-extend --by=36000 10504220
I kept getting this error:
 XML-RPC fault: <class 'turbogears.identity.exceptions.IdentityFailure'>: Please log in first

Even though I was logged in. I spoke with Bill and he told me I was using an admin only command. I should be using watchdog-extend not watchdogs-extend

$ bkr --help
Usage: bkr <command> [args] [--help]
<snip>
  watchdog-extend                Extend Task's Watchdog
  watchdogs-extend               Extend Task's Watchdog
</snip>

This commands are too similar and the help description is identical, the warning message printed out is not helpful either. 

Would it be possible to combine these command and add admin switch. Or change the name of one of them so it is not so confusing. Also if we do run the admin only command print out that we are not admins.

Thanks,
Jeff

Comment 1 Amit Saha 2013-02-04 02:37:44 UTC
bkr watchdog-extend and bkr watchdogs-extend have distinctly different functions and hence adding a --admin switch to one of them is probably not a good idea. I added some error handling code and also changed the help message to give a better idea.

For example: (here user1 is a non-admin user)

$ bkr watchdogs-extend --user user1 --password user     
This command requires admin priviliges.                                                        │
Were you looking for bkr watchdog-extend instead?


On Gerrit: http://gerrit.beaker-project.org/#/c/1687/

Comment 2 Amit Saha 2013-02-06 09:07:08 UTC
With the patch now merged, the user will get the following error:

Not member of group: admin

if he/she is not so. Thanks for reporting this.

Comment 5 Dan Callaghan 2013-04-11 04:56:48 UTC
Beaker 0.12 has been released.


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