I agree with Brett on the sentiment that the following cmd should fail because the `-c` option is specifically for validating strict `#cloud-config` files.
cloud-init schema -c <some_cloud_config_file>
But two things look like they are a bug here:
- Our schema validation is working against userdata_raw instead of the full rendered userdata
- `cloud-init schema --system` is supposed to be a helper/alias that should have smarts to look at the fully rendered system user-data instead of the raw content provided to the instance (which could be #include's for pulling things from a remote source)
Both touch points should be fixed. As mentioned by Peter, this will break anyone using non `#cloud-config` user-data parts to the instance.
Thanks a lot Peter for the bugs.
I agree with Brett on the sentiment that the following cmd should fail because the `-c` option is specifically for validating strict `#cloud-config` files.
cloud-init schema -c <some_cloud_ config_ file>
But two things look like they are a bug here:
- Our schema validation is working against userdata_raw instead of the full rendered userdata
- `cloud-init schema --system` is supposed to be a helper/alias that should have smarts to look at the fully rendered system user-data instead of the raw content provided to the instance (which could be #include's for pulling things from a remote source)
Both touch points should be fixed. As mentioned by Peter, this will break anyone using non `#cloud-config` user-data parts to the instance.
# Because cloud-init
lxc exec lp1983306 -- cloud-init schema -c /root/lp1983306 --annotate