Bug 1733346

Summary: Add support for instance metadata in jinja templates (available in cloud-init 18.4 and newer)
Product: Red Hat Enterprise Linux 7 Reporter: Andy Goldstein <goldsteina>
Component: cloud-initAssignee: Eduardo Otubo <eterrell>
Status: CLOSED CURRENTRELEASE QA Contact: Huijuan Zhao <huzhao>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.8CC: detiber, eterrell, huzhao, jgreguske, ldu, leiwang, linl, ribarry, xiachen, yacao, yujiang
Target Milestone: rc   
Target Release: ---   
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: 2020-07-02 17:24: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 Andy Goldstein 2019-07-25 19:19:22 UTC
Description of problem:
The Kubernetes Cluster API project is unable to use the templating support added in cloud-init 18.4 to access instance metadata. The version of cloud-init included with RHEL is older than 18.4 and as such it does not allow us to do this.


Version-Release number of selected component (if applicable): 18.2


How reproducible: 100%


Steps to Reproduce:
1. Set up cloud-init user data that includes a template reference to instance metadata.
2. Start the server/virtual machine with this user data.

Actual results:
Cloud-init fails because it is not able to interpret the template syntax.

Expected results:
Cloud-init interprets the template syntax and succeeds.


Additional info:
Here is the Cluster API issue related to this: https://github.com/kubernetes-sigs/cluster-api-bootstrap-provider-kubeadm/issues/41.

Here is the cloud-init information about using instance data with templating that was added in 18.4: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html#using-instance-data.

I believe this is the commit that added this support: https://git.launchpad.net/cloud-init/commit/?h=18.4&id=c7555762f3a30190ce7726b4d013bc3e83c7e4b6.

Comment 5 Rick Barry 2020-07-02 17:24:36 UTC
Current versions of cloud-init provided by RHEL release:

cloud-init 18.4: RHEL 7.7 and RHEL 8.1
cloud-init 19.4: RHEL 7.9 and RHEL 8.2.1

Setting this to CLOSED/CURRENTRELEASE.