environ config changes are never validated

Bug #1168744 reported by William Reade on 2013-04-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
High
Jesse Meek

Bug Description

There's a Validate method on EnvironProvider for exactly this purpose, but it's never called when it needs to be (on SetConfig, for every provider).

This is really scary, and may allow users to irreparably break their environments (consider changes to name, type, firewall-mode, ...).

"Fixing" it for the dummy provider breaks a few tests, but probably not as many as it should; we should find out why.

*Really* fixing it could be rather tedious, because the state package is ignorant of environs and has no option but to accept whatever *config.Config is passed into SetEnvironConfig, regardless of compatibility or sanity. This could be resolved by registering config providers in the environs/config package, just as environ providers are registered in the environs package: we'd thereby actually be able to use and produce configs in a non-crippled way from state. But we'd also break a bunch more tests, which would all need to be understood and fixed.

So, probably not a 13.04 goal. But... this is a pretty critical chunk of data, and we are more than somewhat cavalier with it, and we should make an effort to .

Related branches

Curtis Hovey (sinzui) on 2013-10-12
tags: added: tech-debt weeks
Tim Penhey (thumper) on 2014-01-29
Changed in juju-core:
assignee: nobody → Jesse Meek (waigani)
Jesse Meek (waigani) on 2014-03-19
Changed in juju-core:
status: Triaged → Fix Committed
Curtis Hovey (sinzui) on 2014-03-21
Changed in juju-core:
status: Fix Committed → Fix Released
milestone: none → 1.17.6
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers