Bug 1596492
| Summary: | openshfit-ansible does not handle array parameters | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Peter Ruan <pruan> | ||||
| Component: | Logging | Assignee: | ewolinet | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Anping Li <anli> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 3.10.0 | CC: | aos-bugs, ewolinet, jokerman, mmccomas, pruan, rmeggins, wmeng | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 3.10.z | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-06-29 21:40:00 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Eric, any idea? Likely trying to parse the list in ansible with the `list` jinja filter unnecessarily. I'll take a look at this. @Peter,
I am unable to recreate this locally, can you please confirm what version of Ansible you are using?
I added the following line to my inventory and my configmap looks as expected:
openshift_logging_es_log_appenders=['console','file']
logging.yml: |
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
logger:
# log action execution errors for easier debugging
action: WARN
# oc version
oc v3.10.10
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://m01.example.com:8443
openshift v3.10.10
kubernetes v1.10.0+b81c8f8
ansible --version ansible 2.5.2 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.15 (default, May 15 2018, 15:37:31) [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] Hi Eric,
I'm seeing it from my end.
[root@qe-pruan-310-auto-preserve-men-1 ~]# oc get configmap logging-elasticsearch -o yaml | grep rootLogger
rootLogger: ${es.logger.level}, [, ', c, o, n, s, o, l, e, ', ,, ', f, i, l, e, ', ]
[root@qe-pruan-310-auto-preserve-men-1 ~]# oc version
oc v3.10.9
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://qe-pruan-310-auto-preserve-men-1:8443
openshift v3.10.9
kubernetes v1.10.0+b81c8f8
sh-4.2$ ansible --version
ansible 2.5.3
config file = /usr/share/ansible/openshift-ansible/ansible.cfg
configured module search path = [u'/opt/app-root/src/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
it turns out having the double quotes confused the parser. Removing all double quotes make it work.
[root@qe-pruan-310-auto-preserve-men-1 ~]# oc get configmap logging-elasticsearch -o yaml | grep logger
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
logger:
openshift_logging_es_memory_limit=4Gi
openshift_logging_kibana_memory_limit=1Gi
openshift_logging_kibana_ops_memory_limit=1Gi
openshift_logging_es_log_appenders=['console','file']
|
Created attachment 1455443 [details] sample inventory Description of problem: openshfit-ansible does not handle array parameters correct. For example: openshift_logging_es_log_appenders=['console','file'] if I were to use the attached sample inventory to install logging which succeed, but the configmap shows the rootLogger as logging.yml: | # you can override this using by setting a system property, for example -Des.logger.level=DEBUG es.logger.level: INFO rootLogger: ${es.logger.level}, [, ', c, o, n, s, o, l, e, ', ,, ', f, i, l, e, ', ] logger: It looks like the ansible parser is not treating the array as an string Version-Release number of the following components: rpm -q openshift-ansible rpm -q ansible ansible --version How reproducible: always Steps to Reproduce: 1. install logging using the sample attached inventory 2. after installation do change into the openshift-logging project 3. do oc get configmap logging-elasticsearch Actual results: es.logger.level: INFO rootLogger: ${es.logger.level}, [, ', c, o, n, s, o, l, e, ', ,, ', f, i, l, e, ', ] Expected results: Additional info: Please attach logs from ansible-playbook with the -vvv flag