cloud-init should stop accepting a plethora of values for true/false configuration

Bug #1839659 reported by Dan Watkins on 2019-08-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

YAML has native support for boolean values, and YAML has been around long enough that it's reasonable to expect people to know how to write it.

We should phase out accepting multiple string values ("yes", "1", "true", "on" for True; "no", "0", "false", "off" for False) in places where we do in favour of YAML boolean values.

A proposed implementation plan:

* Start emitting a warning about such values in the string-handling paths of util.{is_true,is_false} ASAP
* Some time in the future (perhaps in the lead-up to Ubuntu's 22.04 LTS?), after we have been emitting these warnings for a good long while, switch the behaviour of new versions of cloud-init[0] to only accept bools

What do we think?

[0] For Ubuntu, specifically, we should also _not_ change the behaviour of existing releases when we backport these new versions of cloud-init.

Dan Watkins (daniel-thewatkins) wrote :

We may also want to consider waiting until a warning-emitting version of cloud-init has been released in other distributions (e.g. made it to Debian stable) to enable enforcement.

Scott Moser (smoser) on 2019-08-09
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers