Bug 1733346 - Add support for instance metadata in jinja templates (available in cloud-init 18.4 and newer)
Summary: Add support for instance metadata in jinja templates (available in cloud-init...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cloud-init
Version: 7.8
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Eduardo Otubo
QA Contact: Huijuan Zhao
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-25 19:19 UTC by Andy Goldstein
Modified: 2020-07-02 17:24 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-07-02 17:24:36 UTC
Target Upstream Version:

Attachments (Terms of Use)

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


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