Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1622788

Summary: Failed to create node scale group launch configuration for 'l_instance_tags' is undefined
Product: OpenShift Container Platform Reporter: sheng.lao <shlao>
Component: InstallerAssignee: Chris Callegari <ccallega>
Status: CLOSED DUPLICATE QA Contact: sheng.lao <shlao>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.11.0   
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-08-30 13:15:55 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:

Description sheng.lao 2018-08-28 03:42:13 UTC
Description of problem:
I follow the guide of document: https://github.com/openshift/openshift-ansible/tree/master/playbooks/aws, when I doing the Step 5, playing with provision_nodes.yml, I meet this error:
'l_instance_tags' is undefined

If I use the provision_install.yml, all in one, then provision_nodes.yml works.

So, I check file roles/openshift_aws/tasks/launch_config.yml:
- name: Create the node scale group launch config
  ec2_lc:
     ... ...
     user_data: "{{ lookup('template', 'user_data.j2') }}"

then find that template, user_data.j2, use the variable 'l_instance_tags' :
roles/openshift_aws/templates/user_data.j2
    ... ...
    if l_instance_tags['host-type'] == 'master' %}
node-config-master
{%   elif l_instance_tags['host-type'] == 'node' %}

It seems that  provision_nodes.yml, in Step 5, don’t include provision_ec2_facts.yml.

So, if we don’t support the step-by-step installation, please update the document, or we would modify the provision_nodes.yml.

Version-Release number of the following components:
# git describe
openshift-ansible-3.11.0-0.24.0-16-ge42f892

How reproducible:
100%

Steps to Reproduce:
1. ansible-playbook -i inventory.yml build_ami.yml -e @provisioning_vars.yml
2. ansible-playbook -i inventory.yml provision.yml -e @provisioning_vars.yml
3. ansible-playbook -i inventory.yml install.yml -e @provisioning_vars.yml
4. ansible-playbook -i inventory.yml provision_nodes.yml -e @provisioning_vars.yml


Actual results:
TASK [openshift_aws : Create the node scale group launch config] *********************************************************************************
task path: /root/openshift-ansible/roles/openshift_aws/tasks/launch_config.yml:17
Monday 27 August 2018  11:37:02 -0400 (0:00:00.043)       0:00:23.436 *********
fatal: [localhost]: FAILED! => {
    "msg": "The task includes an option with an undefined variable. The error was: 'l_instance_tags' is undefined\n\nThe error appears to have been in '/root/openshift-ansible/roles/openshift_aws/tasks/launch_config.yml': line 17, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# Create the scale group config\n- name: Create the node scale group launch config\n  ^ here\n"
}

Expected results:
Create node scale group launch configuration is success

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Chris Callegari 2018-08-30 13:15:55 UTC

*** This bug has been marked as a duplicate of bug 1623421 ***