Bug 844364 - [rfe] read client configuration from both user config file and system-wide config file
[rfe] read client configuration from both user config file and system-wide co...
Product: Beaker
Classification: Community
Component: command line (Show other bugs)
Unspecified Unspecified
medium Severity high (vote)
: 24.0
: ---
Assigned To: Dan Callaghan
: FutureFeature, Patch, Triaged
: 1369994 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-07-30 08:32 EDT by Martin Cermak
Modified: 2017-02-21 13:49 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-02-21 13:49:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Cermak 2012-07-30 08:32:48 EDT
Description of problem:

  Beaker-client now takes its configuration from ~/.beaker_client/config.

  Please, modify it so that it will try to read some system-wide config file.
  Settings from ~/.beaker_client/config should override system-wide settings.

Suggested config file:

Comment 1 Petr Šplíchal 2012-08-16 04:50:29 EDT
Today I've noticed the global config seems to be already supported:

$ rpm -ql beaker-client | grep conf

$ head /etc/beaker/client.conf
# Hub xml-rpc address.
HUB_URL = "http://localhost/bkr"

# Hub authentication method. Example: krbv, password, worker_key
#AUTH_METHOD = "krbv"
AUTH_METHOD = "password"

# Username and password

$ rpm -q beaker-client
Comment 2 Dan Callaghan 2012-08-16 18:21:16 EDT
Petr, quite right, currently bkr client checks the following locations for its config. The first one which exists is used:

* ~/.beaker_client/config
* ~/.beaker
* /etc/beaker/client.conf

Additionally, if BEAKER_CLIENT_CONF is set in the environment that file is used and the other logic is skipped.

What is missing is the overriding: if ~/.beaker_client/config exists, then the systemwide config is never read and settings in it will not apply, even if ~/.beaker_client/config does not define them.
Comment 3 Nick Coghlan 2012-10-17 00:37:11 EDT
Bulk reassignment of issues as Bill has moved to another team.
Comment 5 Dan Callaghan 2015-08-31 21:36:56 EDT
In particular, being able to inherit CA_CERT from /etc/beaker/client.conf would be quite useful for our setup. See bug 1258501.
Comment 6 Dan Callaghan 2016-08-25 23:21:51 EDT
*** Bug 1369994 has been marked as a duplicate of this bug. ***
Comment 7 qhsong 2016-08-26 03:34:23 EDT
Hi, I have create a pull request in https://github.com/beaker-project/beaker/pull/2 and fix it.
Comment 8 Dan Callaghan 2016-09-14 00:30:10 EDT
Thanks for the patch! I've uploaded a new version against develop here:

Comment 9 Dan Callaghan 2016-09-22 01:12:30 EDT
This bug fix is included in beaker-client-24.0-0.git.99.85d122d which is currently available for download here:

Comment 11 Dan Callaghan 2017-02-21 13:49:56 EST
Beaker 24.0 has been released.

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