Treat as Error not Warning non-YAML #cloud-config user-data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Chad Smith |
Bug Description
Cloud-init 22.4.2
Currently when user-data is of type #cloud-config YAML, cloud-init only emits a WARNING message.
2022-12-16 22:55:13,550 - util.py[DEBUG]: Attempting to load yaml from string of length 127 with allowed root types (<class 'dict'>,)
2022-12-16 22:55:13,551 - util.py[WARNING]: Failed loading yaml blob. Invalid format at line 5 column 26: "while scanning an alias
in "<unicode string>", line 5, column 26:
interacti
expected alphabetic or numeric character, but found ']'
in "<unicode string>", line 5, column 27:
interacti
I proposed that specific known user-data types like #cloud-config that are not able to be processed because of invalid format should be treated as an error because:
* #cloud-config is a known YAML format and something that isn't YAML parseable represents a that needs immediate attention
* #cloud-config was intended configuration on the system, ignoring that confiration exposes the system to long-running misconfiguration or security flaws
* warnings do not result in discoverable error conditions or exit codes from cloud-init system service status
* warnings do not bubble up to `cloud-init status --long`
summary: |
- Error on invalid #cloud-config YAML user-data + cloud-init schema --system should fail on non-YAML #cloud-config user- + data |
summary: |
- cloud-init schema --system should fail on non-YAML #cloud-config user- - data + Treat as Error not Warning non-YAML #cloud-config user-data |
note related bug: cloud-init schema --system also lies when unparseable YAML is provided as user-data
https:/ /bugs.launchpad .net/ubuntu/ +source/ cloud-init/ +bug/1999953