yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #89536
[Bug 1983306] Re: schema validation not in line with specification
This bug is believed to be fixed in cloud-init in version 22.3. If this
is still a problem for you, please make a comment and set the state back
to New
Thank you.
** Changed in: cloud-init
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1983306
Title:
schema validation not in line with specification
Status in cloud-init:
Fix Released
Bug description:
Related to #1983303. My user-data begins with #include, as it's not a
"Cloud Config Data" but an "Include File" as described in the official
documentation. However, this causes the validator `cloud-init schema
--system` to complain that
```
Error:
Cloud config schema errors: format-l1.c1: File None needs to begin with "#cloud-config"
```
Ok I thought, I just manually add "#cloud-config" at the top and re-
test:
```
Error:
Cloud-config is not a YAML dict.
```
Well, it's not a YAML dict because it's not a cloud config data but an
include file, which isn't in the YAML format.
See the specification:
https://cloudinit.readthedocs.io/en/latest/topics/format.html
Also look at the implementation in `user_data.py`, function
`_do_include`. As you can see, this file isn't processed as YAML but
parsed line by line. So the specification and implementation agree,
but the schema validator doesn't and thinks it should process it as
YAML.
This wouldn't be a practical problem for me, but due to #1983303 I get
mangled logs and can't work around it.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1983306/+subscriptions
References