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

{
    "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