lp:~dave-cheney/juju-core/go-environs-config-fix
- Get this branch:
- bzr branch lp:~dave-cheney/juju-core/go-environs-config-fix
Branch merges
- The Go Language Gophers: Pending requested
-
Diff: 35 lines (+31/-0)1 file modifiedenvirons/config/current.go (+31/-0)
Branch information
Recent revisions
- 361. By Roger Peppe
-
state: make agents have proposed tools not versions.
With the proposed upgrade changes, we want to propose
a version of the tools and a URL to find the tools.
To do that, we move the Tool type into state and
make the old agentVersion type use it, renaming
it to agentTools.R=niemeyer
CC=
https://codereview. appspot. com/6441078 - 360. By Roger Peppe
-
version: rename Version to Number, BinaryVersion to Binary.
Also implement Parse and String for Binary.
R=niemeyer
CC=
https://codereview. appspot. com/6458053 - 359. By Roger Peppe
-
environs: add ListTools function and related refactoring.
With the proposed upgrade scheme, we will want to explicitly
ask machines to run a particular version of the juju tools.
That means that the upgrader needs to be able to decide for
itself which tools are appropriate, so we factor out ListTools
so it doesn't have to list the storage for each agent.As a knock-on effect, Environ.
StartInstance now takes
the tools to start.R=fwereade, niemeyer
CC=
https://codereview. appspot. com/6449062 - 358. By William Reade
-
reworked ClientContext to HookContext
HookContext now offers facilities sufficient to implement relation-get,
relation-set, relation-ids, and relation-list. Expect followups
implementing those shortly; for now, sigh, and observe the annoyingly
large amount of test changes that support what STM to be a worthwhile
simplification of the hook context as a whole.R=rog, niemeyer
CC=
https://codereview. appspot. com/6445058 - 357. By William Reade
-
add RelationContext type
The RelationContext manages a single relation's unit settings, as a step
towards implementing relation-aware jujuc commands. It exposes features that
will be used directly by the relation-get, relation-set, relation-list and
relation-ids commands; the interface is designed to allow convenient
creation from uniter.RelationState instances, and convenient updates from
uniter.HookInfo values.This doesn't yet fit cleanly with the ClientContext type, but integrating
the types will have somewhat noisy consequences, so the RelationContext is
currently exercised alone. Expect an imminent followup integrating
RelationContext into ClientContext as follows:drop LocalUnitName string; add Unit *state.Unit
drop RelationName string; add RelationId int
keep RemoteUnitName
add Relations map[int]*RelationContex t, keyed on relation id ...and:
change name to HookContext
We expect every HookContext to contain full details of all relations the
unit is currently participating in, in Relations; this is needed to allow
commands like relation-ids and relation-list to run regardless of context.
The relation-specific JUJU_RELATION and JUJU_RELATION_ID environment
variables (along with JUJU_REMOTE_UNIT where apropriate) would be set when
RelationId were valid (ie it must not be -1, and it must bea valid key into
Relations).R=rog, niemeyer
CC=
https://codereview. appspot. com/6448074 - 356. By William Reade
-
implement --format changes as discussed live
* Nothing has a --test flag
* YAML output now has trailing newlines stripped
* --format now accepts "smart", everywhere except statusR=rog, niemeyer
CC=
https://codereview. appspot. com/6448090 - 355. By William Reade
-
implement RelationState persistence
RelationState gets a new field, Path, and two new methods:
(*RelationState) Validate(HookInfo) error
...which allows a client to verify the sanity of a hook before
it is run, and:(*RelationState) Commit(HookInfo) error
...which persists the state change to disk, and should be called on
successful execution of a hook, or resolution of an error state.
RelationState is aggressive about error detection and should always
write consistent states; errors while committing a hook should not
cause any change to the RelationState or its persistence directory.A new AllRelationStates function, which scans a complete relations
directory and returns a map of relation id to *RelationState stored
therein, will be convenient when reconciling persisted relation state
against the unit's service's latest relation membership.R=rog, niemeyer
CC=
https://codereview. appspot. com/6453061 - 354. By Roger Peppe
-
state: implement MachineInfoWatcher
R=niemeyer
CC=
https://codereview. appspot. com/6447054 - 353. By William Reade
-
add RelationState type...
...and use it to reconcile HookQueue state with initial watcher event on
load.As part of this, I added a RelationId to HookQueue, and return it in every
HookInfo, so that we can identify what relation the hook is actually meant
to run against.R=niemeyer
CC=
https://codereview. appspot. com/6441047
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:~juju/juju-core/trunk