Bug 1501671 - rhts-power doesn't work out of the box because lab controllers do not have permission to submit power commands, fails with bkr.server.bexceptions.InsufficientSystemPermissions
Summary: rhts-power doesn't work out of the box because lab controllers do not have pe...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: general
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: 24.5
Assignee: Dan Callaghan
QA Contact: Dan Callaghan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-13 03:42 UTC by Dan Callaghan
Modified: 2017-10-27 06:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-27 06:47:28 UTC


Attachments (Terms of Use)

Description Dan Callaghan 2017-10-13 03:42:35 UTC
Description of problem:


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

How reproducible:


Steps to Reproduce:
1. Create a new system with default policy -- or ensure the policy does *not* grant "Control Power" permission to everyone
(Note that older Beaker installations will grant "Control Power" to everyone for historical reasons, which is why this bug was never immediately evident on Red Hat's Beaker instances)
2. Run a job which tries to do: rhts-power $THESYSTEM

Actual results:
rhts-power script fails with a traceback:

xmlrpclib.Fault: <Fault 1: "<class 'bkr.server.bexceptions.InsufficientSystemPermissions'>:User XXX does not have permission to power system XXX">

Expected results:
Should successfully submit a power command.

Comment 1 Dan Callaghan 2017-10-13 03:43:30 UTC
Simplest solution is to grant the 'lab_controller' group special powers in the system permission checking methods (can_power() and friends). The same way that 'admin' group already has special powers, and 'lab_controller' already has special powers elsewhere.

Comment 2 Dan Callaghan 2017-10-19 07:35:26 UTC
https://gerrit.beaker-project.org/5877

Comment 5 Dan Callaghan 2017-10-27 06:47:28 UTC
Beaker 24.5 has been released.


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