dynamic vendor data and cloud-init

Manish Mahalwal manish16054 at gmail.com
Thu Apr 15 14:53:17 UTC 2021


Hi All,

I am working with OpenStack Pike and cloud-init 21.1. I am able to
successfully pass dynamic vendor data to the config drive of an instance.
However, cloud-init 21.1 just reads all the 'x' bytes of the
vendor_data2.json but it doesn't execute the contents of the json.
Although, static vendor data works perfectly fine and the YAML file in the
JSON is executed as expected by cloud-init 21.1

* Now, the person who wrote the code for handling dynamic vendordata in
cloud-init (https://github.com/canonical/cloud-init/pull/777) says that the
JSON cloud-init expects is of the form:

> {"cloud-init": "#cloud-config\npackage_upgrade: True\npackages:\n -
> black\nfqdn: cloud-overridden-by-vendordata2.example.org."}
>

* I believe that the JSON should have another outer key (as mentioned here
https://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/vendordata-reboot.html)
which is the name of the microservice specified in nova.conf file and that
the inner key should be cloud-init.

In nova.conf:
vendordata_dynamic_targets=name1@
http://example.com,name2@http://example2.com
<http://example.com,name2@http//example2.com>

{
>     "name1": {
>         "cloud-init": "#cloud-config\n..."
>     },
>     "name2": {
>         "cloud-init": "#cloud-config\n..."
>     }
> }




>>Who is right and who is wrong?

To read more on this please go through the following:
https://bugs.launchpad.net/cloud-init/+bug/1841104
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20210415/683dc577/attachment.html>


More information about the openstack-discuss mailing list