schema: wrong validation of cc_users_groups

Bug #1979491 reported by Alberto Contreras
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Unassigned

Bug Description

The schema validation does detect the following wrong schema as valid:

```yaml
#cloud-config
groups:
  - 3.14
```

Steps to reproduce:

```sh
cat <<EOF > /tmp/user-data
#cloud-config
groups:
  - 3.14
EOF

lxc launch ubuntu-daily:jammy gg --config=user.user-data="$(cat /tmp/user-data)"
$ lxc exec gg -- cloud-init status --wait
..............
status: error

$ lxc exec gg -- grep -ni "error" /var/log/cloud-init.log
412: raise TypeError(
413:TypeError: Unknown group name type float
440: raise TypeError(
441:TypeError: Unknown group name type float

$ lxc exec gg -- cloud-init schema --system
Valid cloud-config: system userdata

$ lxc exec gg -- echo $?
0
```

The schema validation should detect this schema as invalid.

Revision history for this message
Alberto Contreras (aciba) wrote :

Attach logs

James Falcon (falcojr)
Changed in cloud-init:
status: New → Triaged
importance: Undecided → Medium
tags: added: bitesize
James Falcon (falcojr)
tags: removed: bitesize
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
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.