Bug 844364 - [rfe] read client configuration from both user config file and system-wide config file
Summary: [rfe] read client configuration from both user config file and system-wide co...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.8
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: 24.0
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard: Misc
: 1369994 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-30 12:32 UTC by Martin Cermak
Modified: 2017-02-21 18:49 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-21 18:49:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Martin Cermak 2012-07-30 12:32:48 UTC
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:

  /etc/beaker_client.conf

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

$ rpm -ql beaker-client | grep conf
/etc/beaker/client.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
#USERNAME = ""
#PASSWORD = ""

$ rpm -q beaker-client
beaker-client-0.9.2-2.el6eng.noarch

Comment 2 Dan Callaghan 2012-08-16 22:21:16 UTC
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 04:37:11 UTC
Bulk reassignment of issues as Bill has moved to another team.

Comment 5 Dan Callaghan 2015-09-01 01:36:56 UTC
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-26 03:21:51 UTC
*** Bug 1369994 has been marked as a duplicate of this bug. ***

Comment 7 qhsong 2016-08-26 07:34:23 UTC
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 04:30:10 UTC
Thanks for the patch! I've uploaded a new version against develop here:

http://gerrit.beaker-project.org/5227

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

https://beaker-project.org/nightlies/develop/

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


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