Bug 1366522 - The value of "debug_level" isn't applied to /etc/sysconfig/atomic-openshift-master
Summary: The value of "debug_level" isn't applied to /etc/sysconfig/atomic-openshift-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.3.1
Assignee: Andrew Butcher
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-12 08:30 UTC by Gan Huang
Modified: 2016-10-27 16:12 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Previously, the debug_level inventory variable was only being applied to node configuration. Debug level is now correctly set within master and node configuration but can also be set individually via openshift_master_debug_level or openshift_node_debug_level.
Clone Of:
Environment:
Last Closed: 2016-10-27 16:12:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2122 0 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix update 2016-10-27 20:11:30 UTC

Description Gan Huang 2016-08-12 08:30:33 UTC
Description of problem:
Speficying "debug_level=5" in inventory hosts, debug_level was still set to default value "2" in /etc/sysconfig/atomic-openshift-master after installation.

Version-Release number of selected component (if applicable):
openshift-ansible-3.3.9-1.git.0.ed8fd1b.el7.noarch.rpm
ansible-2.2.0-0.3.prerelease.el7.noarch

How reproducible:
always

Steps to Reproduce:
1.specify "debug_level=5" under 
[OSEv3:vars] in inventory hosts
2.Run BYO playbook
3.

Actual results:
[root@ip-172-18-15-140 ~]# grep "loglevel" /etc/sysconfig/atomic-openshift-master
OPTIONS=--loglevel=2
[root@ip-172-18-15-140 ~]# grep "loglevel" /etc/sysconfig/atomic-openshift-node
OPTIONS=--loglevel=5


Expected results:
loglevel should be set to "5" in /etc/sysconfig/atomic-openshift-master.

Additional info:

Comment 1 Gan Huang 2016-08-12 12:08:45 UTC
On master, debug_level for master role in /etc/ansible/facts.d/openshift.fact is 2.

# cat /etc/ansible/facts.d/openshift.fact 

{"node": {"labels": {"role": "node"}, "dns_ip": "172.18.14.111", "debug_level": "5"
......
"master": {"identity_providers": [{"name": "htpasswd_auth", "challenge": "true", "login": "true", "kind": "HTPasswdPasswordIdentityProvider", "filename": "/etc/origin/htpasswd"}], "named_certificates": [], "manage_htpasswd": true, "session_secrets_file": "/etc/origin/master/session-secrets.yaml", "debug_level": "2", "master_count": "1"
......
common": {"install_examples": true, "is_containerized": false, "debug_level": "5"

Comment 2 Brenton Leanhardt 2016-09-07 19:45:37 UTC
Hi Huang Gan,

I think the variable name is openshift_debug_level.  Could you try that?

Comment 3 Gan Huang 2016-09-08 01:42:34 UTC
Hi Brenton,

I used "openshift_debug_level=5" in inventory hosts, unfortunately "loglevel" was set to 2 in master and node configurations.

[root@ip-172-18-8-73 ~]# grep "loglevel" /etc/sysconfig/atomic-openshift-node
OPTIONS=--loglevel=2
[root@ip-172-18-8-73 ~]# grep "loglevel" /etc/sysconfig/atomic-openshift-master
OPTIONS=--loglevel=2

Comment 4 Brenton Leanhardt 2016-09-08 11:56:23 UTC
This is probably still a bug then.  I suspect it has to do with the way we're trying to have the default for the node level derive from openshift.common.debug_level.

Comment 5 openshift-github-bot 2016-10-05 19:11:23 UTC
Commit pushed to master at https://github.com/openshift/openshift-ansible

https://github.com/openshift/openshift-ansible/commit/f539303306947ff8b1d5ddfe206a2b21c36de3e8
Merge pull request #2546 from abutcher/master-debug-level

Bug 1366522 - The value of "debug_level" isn't applied to /etc/sysconfig/atomic-openshift-master

Comment 7 Johnny Liu 2016-10-09 11:07:06 UTC
Re-test this bug with openshift-ansible-3.3.30-1.git.0.b260e04.el7.noarch, only a part of this issue is fixed.

When setting debug_level=5 in inventory host file, it only takes effect in node config file, but not in master config file.
[root@openshift-105 ~]# grep "loglevel" /etc/sysconfig/atomic-openshift-master
OPTIONS=--loglevel=2
[root@openshift-105 ~]# grep "loglevel" /etc/sysconfig/atomic-openshift-node
OPTIONS=--loglevel=5

Comment 8 Johnny Liu 2016-10-10 09:58:43 UTC
Also tried "openshift_debug_level" var, the same behavior like comment 7.

Comment 10 Johnny Liu 2016-10-11 03:42:46 UTC
Verified this bug with openshift-ansible-3.3.34-1.git.0.5b998bb.el7.noarch, and PASS.

[root@openshift-151 ~]# grep "loglevel" /etc/sysconfig/atomic-openshift-master
OPTIONS=--loglevel=5
[root@openshift-151 ~]# grep "loglevel" /etc/sysconfig/atomic-openshift-node
OPTIONS=--loglevel=5

Comment 12 errata-xmlrpc 2016-10-27 16:12:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:2122


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