Bug 1111491

Summary: beaker-create-kickstart gives a confusing error when attempting to read DB credentials
Product: [Retired] Beaker Reporter: Nick Coghlan <ncoghlan>
Component: command lineAssignee: Amit Saha <asaha>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: developCC: aigao, asaha, dcallagh, ebaak, rmancy, xma
Target Milestone: 0.17.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-18 08:17:46 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 Nick Coghlan 2014-06-20 07:41:02 UTC
beaker-create-kickstart tries to read from /etc/beaker/server.cfg to get the database credentials, but that is only readable by root and the Beaker web service user so it fails when run as an ordinary user.

It would be good to provide a better error message in this case.

Comment 2 Amit Saha 2014-06-21 13:59:00 UTC
http://gerrit.beaker-project.org/#/c/3155/

Comment 4 Dan Callaghan 2014-07-15 03:45:11 UTC
Steps to reproduce:

For each server CLI command (beaker-create-kickstart, beaker-init, beaker-create-ipxe-image, beaker-log-delete, nag-mail, product-update, beaker-repo-update, beaker-refresh-ldap):
1. Run the command as a non-root user

Expected results:
Non-zero exit status, error message like the following is printed:
Failed to read server configuration. [Errno 13] Permission denied: '/etc/beaker/server.cfg'.
Hint: run this command as root

Comment 6 Dan Callaghan 2014-07-18 08:17:46 UTC
Beaker 0.17.1 has been released.