Bug 1465168 - mux doesn't recognize ansible boolean parameters correctly
Summary: mux doesn't recognize ansible boolean parameters correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.7.0
Assignee: Rich Megginson
QA Contact: Xia Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-26 21:07 UTC by Rich Megginson
Modified: 2017-11-28 21:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-11-28 21:58:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Rich Megginson 2017-06-26 21:07:22 UTC
Description of problem:
If you have an ansible inventory file like this:

openshift_logging_mux_allow_external=True

or a vars.yaml like this:

ansible-playbook -e openshift_logging_mux_allow_external=True

The MUX_ALLOW_EXTERNAL env. var. in the mux dc gets set to "True" and the fluentd/run.sh doesn't recognize it as a true value.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Noriko Hosoi 2017-06-27 06:16:35 UTC
Do we need something like this to lower the case?
diff --git a/fluentd/run.sh b/fluentd/run.sh
index 7bfeecb..f259681 100644
--- a/fluentd/run.sh
+++ b/fluentd/run.sh
@@ -26,6 +26,11 @@ docker_uses_journal() {
     return 1
 }
 
+MUX_ALLOW_EXTERNAL="${MUX_ALLOW_EXTERNAL,,}"
+USE_MUX="${USE_MUX,,}"
+USE_JOURNAL="${USE_JOURNAL,,}"
+USE_MUX_CLIENT="${USE_MUX_CLIENT,,}"
+

How about ES_COPY and ENABLE_MONITOR_AGENT?  They need to be converted, too?

Comment 3 openshift-github-bot 2017-06-28 15:16:06 UTC
Commits pushed to master at https://github.com/openshift/openshift-ansible

https://github.com/openshift/openshift-ansible/commit/e6cfe56298b804839ddbcb091113584e7902bf76
Bug 1465168 - mux doesn't recognize ansible boolean parameters correctly

https://bugzilla.redhat.com/show_bug.cgi?id=1465168
The fix is to pass the value through the `lower` filter.  The value is
set in defaults/main.yaml so it should always have a value.

https://github.com/openshift/openshift-ansible/commit/9613d2e517ced0bc5d165801df3442ab331d214c
Merge pull request #4591 from richm/bug-1465168

Bug 1465168 - mux doesn't recognize ansible boolean parameters correctly

Comment 5 Xia Zhao 2017-07-05 06:06:11 UTC
It's fixed, tested with 

# rpm -qa | grep ansible
openshift-ansible-callback-plugins-3.6.133-1.git.0.950bb48.el7.noarch
openshift-ansible-docs-3.6.133-1.git.0.950bb48.el7.noarch
openshift-ansible-lookup-plugins-3.6.133-1.git.0.950bb48.el7.noarch
openshift-ansible-filter-plugins-3.6.133-1.git.0.950bb48.el7.noarch
openshift-ansible-playbooks-3.6.133-1.git.0.950bb48.el7.noarch
ansible-2.2.3.0-1.el7.noarch
openshift-ansible-3.6.133-1.git.0.950bb48.el7.noarch
openshift-ansible-roles-3.6.133-1.git.0.950bb48.el7.noarch

Setting openshift_logging_mux_allow_external=True in the inventory file and after deployment, env variable MUX_ALLOW_EXTERNAL is set to true:

logging        logging-curator-1-52p3r                   1/1       Running     0          1m
logging        logging-es-data-master-176t9ksa-1-5s8lv   1/1       Running     0          1m
logging        logging-fluentd-22lbw                     1/1       Running     0          1m
logging        logging-fluentd-rgwm1                     1/1       Running     0          1m
logging        logging-kibana-1-2lcjv                    2/2       Running     0          1m
logging        logging-mux-1-3j553                       1/1       Running     0          1m


# oc rsh logging-mux-1-3j553
sh-4.2# env | grep MUX_ALLOW_EXTERNAL     
MUX_ALLOW_EXTERNAL=true

Comment 9 errata-xmlrpc 2017-11-28 21:58:46 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/RHSA-2017:3188


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