Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1465168 - mux doesn't recognize ansible boolean parameters correctly
mux doesn't recognize ansible boolean parameters correctly
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging (Show other bugs)
3.6.0
Unspecified Unspecified
high Severity high
: ---
: 3.7.0
Assigned To: Rich Megginson
Xia Zhao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-26 17:07 EDT by Rich Megginson
Modified: 2017-11-28 16:58 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-28 16:58:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-28 21:34:54 EST

  None (edit)
Description Rich Megginson 2017-06-26 17:07:22 EDT
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 02:16:35 EDT
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 11:16:06 EDT
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 02:06:11 EDT
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 16:58:46 EST
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.