text/plain encoding for write_files unsupported?

Bug #1996781 reported by Steve Brasier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Unassigned

Bug Description

OpenStack RockyLinux 8 instance failed to boot properly. Console log showed:

```
[ 103.927922] cloud-init[852]: Cloud-init v. 22.1-5.el8 running 'init' at Wed, 16 Nov 2022 14:45:47 +0000. Up 103.64 seconds.
<snip>
[ 103.974747] cloud-init[852]: 2022-11-16 14:45:47,803 - schema.py[WARNING]: Invalid cloud-config provided:
[ 103.978215] cloud-init[852]: write_files.0.encoding: 'text/plain' is not one of ['gz', 'gzip', 'gz+base64', 'gzip+base64', 'gz+b64', 'gzip+b64', 'b64', 'base64']
[ 103.982366] cloud-init[852]: write_files.0.encoding: 'text/plain' is not one of ['gz', 'gzip', 'gz+base64', 'gzip+base64', 'gz+b64', 'gzip+b64', 'b64', 'base64']
```

But the [docs](https://cloudinit.readthedocs.io/en/22.1_a/topics/modules.html#write-files) for this version so that text/plain IS an accepted encoding.

This worked before the release of RockyLinux 8.7 so I'm assuming this is a newer version of cloud-init and there's a regression?

Revision history for this message
Steve Brasier (stevebrasier) wrote :

Hmm. Logs from a non-upgraded RockyLinux 8.6 instance also show

```
Cloud-init v. 22.1-5.el8
```

Revision history for this message
Chad Smith (chad.smith) wrote :

We recently added user-data cloud-config schema validation to cloud-init turned it on to "warn" for potentially offending schema values. What you see here is a warning, and cloud-init still tries to honor the intent of the schema despite this warning.

This bug indicates that there was a bug in the schema definition which didn't represent the reality of all encoding type values actually supported.

This was fixed in upstream commit https://github.com/canonical/cloud-init/commit/02db659c95994b3bff58a372727fff377149c53b and I believe released in version 22.1-146-g02db659c9 (or offical 22.2 release).

to test tip of latest cloud-init to see if it still reproduces you can install cloud-init from our copr repo https://copr.fedorainfracloud.org/coprs/g/cloud-init/cloud-init-dev/, run cloud-init clean --logs --reboot to force a clean install on an affected system to see if it still generates the same warning.

Revision history for this message
Chad Smith (chad.smith) wrote :

Marking this as Fix released as I think it should already be in official 22.2 releases. If it still persists in 22.2 or later please feel free to reopen the bug.

Changed in cloud-init:
status: New → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.