Bug 1419838 - Logging deployment failed with AnsibleUndefinedVariable error
Summary: Logging deployment failed with AnsibleUndefinedVariable error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: ewolinet
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks: 1414706 1417261
TreeView+ depends on / blocked
 
Reported: 2017-02-07 08:38 UTC by Gaoyun Pei
Modified: 2017-07-24 14:11 UTC (History)
6 users (show)

Fixed In Version: openshift-ansible-3.5.8-1.git.0.0e02ef8.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-04-12 18:49:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0903 0 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix and enhancement 2017-04-12 22:45:42 UTC

Description Gaoyun Pei 2017-02-07 08:38:57 UTC
Description of problem:
Enable logging deployment during installation with setting openshift_hosted_logging_deploy=true, but installation playbook failed as

TASK [openshift_logging : Generating secrets for logging components] ***********
Tuesday 07 February 2017  07:51:32 +0000 (0:00:04.571)       0:15:59.683 ****** 
failed: [ec2-54-165-124-200.compute-1.amazonaws.com] (item=kibana) => {"changed": false, "component": "kibana", "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (apiVersion: v1\nkind: Secret\nmetadata:\n  name: {{secret_name}}\ntype: Opaque\ndata:\n{% for s in secrets %}\n  {{s.key}}: {{s.value | b64encode}}\n{% endfor %}\n).\nMake sure your variable name does not contain invalid characters like '-': must be convertible to a buffer, not StrictUndefined"}
failed: [ec2-54-165-124-200.compute-1.amazonaws.com] (item=curator) => {"changed": false, "component": "curator", "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (apiVersion: v1\nkind: Secret\nmetadata:\n  name: {{secret_name}}\ntype: Opaque\ndata:\n{% for s in secrets %}\n  {{s.key}}: {{s.value | b64encode}}\n{% endfor %}\n).\nMake sure your variable name does not contain invalid characters like '-': must be convertible to a buffer, not StrictUndefined"}
failed: [ec2-54-165-124-200.compute-1.amazonaws.com] (item=fluentd) => {"changed": false, "component": "fluentd", "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (apiVersion: v1\nkind: Secret\nmetadata:\n  name: {{secret_name}}\ntype: Opaque\ndata:\n{% for s in secrets %}\n  {{s.key}}: {{s.value | b64encode}}\n{% endfor %}\n).\nMake sure your variable name does not contain invalid characters like '-': must be convertible to a buffer, not StrictUndefined"}
	to retry, use: --limit @/home/slave2/workspace/Launch-Environment-Flexy/private-openshift-ansible/playbooks/byo/config.retry



Version-Release number of selected component (if applicable):
openshift-ansible-3.5.4-1.git.0.034b615.el7.noarch.rpm
ansible-2.2.1.0-2.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1.Set openshift_hosted_logging_deploy=true in ansible inventory, run the installation playbook


Actual results:


Expected results:


Additional info:

Comment 3 Gaoyun Pei 2017-02-12 02:23:13 UTC
As BZ#1421011 was not blocking in rpm installation way, so we could continue logging deployment testing now.

Test with openshift-ansible-3.5.7-1.git.0.5010dec.el7.noarch.rpm, it's still failing for a new error:

TASK [openshift_logging : include] *********************************************
Saturday 11 February 2017  16:14:44 +0000 (0:00:02.484)       0:22:21.494 ***** 
fatal: [ec2-54-242-11-1.compute-1.amazonaws.com]: FAILED! => {
    "failed": true
}

MSG:

{{ openshift_hosted_logging_hostname | default(kibana.{{openshift.common.dns_domain}}) }}: template error while templating string: expected name or number. String: {{ openshift_hosted_logging_hostname | default(kibana.{{openshift.common.dns_domain}}) }}

Comment 4 Walid A. 2017-02-12 03:32:51 UTC
Same error seen in openshift-ansible BYO install playbook run:
BZ#1417261

Comment 6 Scott Dodson 2017-02-14 21:18:35 UTC
Additional changes merged back to ON_QA.

Comment 7 Gaoyun Pei 2017-02-15 02:29:11 UTC
Test with openshift-ansible-3.5.8-1.git.0.0e02ef8.el7.noarch.rpm

When enable openshift_hosted_logging_deploy=true in ansible inventory, installer still failed as:

TASK [openshift_logging : Generating secrets for logging components] ***********
Wednesday 15 February 2017  01:22:56 +0000 (0:00:06.608)       0:22:29.321 **** 
failed: [ec2-52-201-117-144.compute-1.amazonaws.com] (item=kibana) => {
    "changed": false, 
    "component": "kibana", 
    "failed": true
}

MSG:

AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (apiVersion: v1
kind: Secret
metadata:
  name: {{secret_name}}
type: Opaque
data:
{% for s in secrets %}
  {{s.key}}: {{s.value | b64encode}}
{% endfor %}
).
Make sure your variable name does not contain invalid characters like '-': must be convertible to a buffer, not StrictUndefined

Comment 10 Scott Dodson 2017-02-17 02:06:57 UTC
Additional changes pushed.

Comment 11 Gaoyun Pei 2017-02-17 09:31:10 UTC
Test with openshift-ansible-3.5.10-1.git.0.ba66b63.el7.noarch.rpm

Set openshift_hosted_logging_deploy=true in ansible inventory, logging could deployed and ocp installation is finished.

Comment 13 errata-xmlrpc 2017-04-12 18:49:39 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-2017:0903


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