Bug 1599354

Summary: Cloud-init fails to execute on newly created EC2s
Product: OpenShift Container Platform Reporter: Chris Callegari <ccallega>
Component: InstallerAssignee: Chris Callegari <ccallega>
Status: CLOSED ERRATA QA Contact: sheng.lao <shlao>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.10.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When deploying to AWS the build_ami play failed to clean /var/lib/cloud. An unclean /var/lib/cloud directory will cause cloud-init to skip execution. This will cause newly deployed node to fail to bootstrap and auto register to OpenShift.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:21:36 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 Chris Callegari 2018-07-09 15:22:32 UTC
Description of problem:
Cloud-init fails to execute on newly created EC2s.  This reciprocates to failed auto registration for the node.

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

How reproducible:
Always

Steps to Reproduce:
1. ansible-playbook -i inventory.yml openshift-cluster/provision_install.yml -e @provisioning_vars.yml
2. ssh to master
3. oc get nodes

Actual results:
# oc get nodes
NAME                            STATUS    ROLES     AGE       VERSION

Expected results:
# oc get nodes
NAME                            STATUS    ROLES     AGE       VERSION
ip-172-31-49-119.ec2.internal   Ready     compute   12m       v1.10.0+b81c8f8
ip-172-31-49-62.ec2.internal    Ready     compute   12m       v1.10.0+b81c8f8
ip-172-31-50-28.ec2.internal    Ready     master    18m       v1.10.0+b81c8f8
ip-172-31-53-150.ec2.internal   Ready     master    18m       v1.10.0+b81c8f8
ip-172-31-54-59.ec2.internal    Ready     master    18m       v1.10.0+b81c8f8
ip-172-31-57-74.ec2.internal    Ready     infra     12m       v1.10.0+b81c8f8
ip-172-31-62-47.ec2.internal    Ready     compute   12m       v1.10.0+b81c8f8
ip-172-31-62-50.ec2.internal    Ready     infra     12m       v1.10.0+b81c8f8

Additional info:
The fix is to clean the /var/lib/cloud directory during seal_ami play

https://github.com/openshift/openshift-ansible/pull/9108

Description of problem:

Version-Release number of the following components:
rpm -q openshift-ansible
rpm -q ansible
ansible --version

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

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

Comment 1 sheng.lao 2018-07-12 03:23:27 UTC
@Chris C  
What is content of @provisioning_vars.yml?  I will try to reproduce this problem.

Comment 2 Scott Dodson 2018-08-14 21:25:09 UTC
Should be in openshift-ansible-3.11.0-0.15.0

Comment 3 sheng.lao 2018-08-17 02:10:35 UTC
Fixed at: openshift-ansible-3.11.0-0.16.0

$ oc get node
NAME                            STATUS    ROLES     AGE       VERSION
ip-172-31-48-230.ec2.internal   Ready     master    29m       v1.10.0+b81c8f8
ip-172-31-49-213.ec2.internal   Ready     infra     3m        v1.10.0+b81c8f8
ip-172-31-49-242.ec2.internal   Ready     compute   3m        v1.10.0+b81c8f8
ip-172-31-50-216.ec2.internal   Ready     infra     3m        v1.10.0+b81c8f8
ip-172-31-50-66.ec2.internal    Ready     master    29m       v1.10.0+b81c8f8
ip-172-31-55-11.ec2.internal    Ready     compute   3m        v1.10.0+b81c8f8
ip-172-31-61-36.ec2.internal    Ready     master    29m       v1.10.0+b81c8f8
ip-172-31-62-35.ec2.internal    Ready     compute   3m        v1.10.0+b81c8f8

Comment 5 errata-xmlrpc 2018-10-11 07:21:36 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-2018:2652