state.SetEnvironConfig should take old and new config values

Bug #1167616 reported by Tim Penhey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Low
Unassigned

Bug Description

We should pass in both the old and new config to SetEnvironConfig in order to determine changes.

Then conditions could be added to the update to make sure that we aren't updating something that someone else has tweaked in the mean time, and that we wouldn't wipe out someone else's changes.

Related branches

Curtis Hovey (sinzui)
Changed in juju-core:
importance: Medium → Low
Revision history for this message
Andrew Wilkins (axwalk) wrote :

I need to be able to remove config keys from state to test secrets-pushing, so I'll take a look at this.

Changed in juju-core:
assignee: nobody → Andrew Wilkins (axwalk)
status: Triaged → In Progress
Revision history for this message
Andrew Wilkins (axwalk) wrote :

I've done the first bit: SetEnvironConfig now takes old and new configs. It doesn't do a full delta, but it does now delete things that are in old but not new.

Leaving this open to finish off - that's a bit more work.

Changed in juju-core:
assignee: Andrew Wilkins (axwalk) → nobody
status: In Progress → Triaged
Revision history for this message
William Reade (fwereade) wrote :

See lp:1168744 -- it's not really a matter of "take old and new" at all, it's a matter of (1) accept a delta and (2) VALIDATE IT. (1) is relatively easy, although it does demand some API fixing, but (2) demands state access to an environ so we can actually do the validation -- it requires essentially the same mechanism as the add-machine prechecker work that axw investigated last year.

Changed in juju-core:
milestone: none → 2.0.0
affects: juju-core → juju
Changed in juju:
milestone: 2.0.0 → none
milestone: none → 2.0.0
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0.0 → 2.0.1
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0.1 → none
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
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.