move InferRemoteUnit inside runner factory, integration tests passing, unit tests broken
fix operation tests
fix uniter/runner tests/code
state: removed unnecessary docID calls

Many calls to State.docID() are now unnecessary since the introduction
of envStateCollection.

This change also adds the openedPorts and subnets collections to the
list of those which contain data for multiple environments.
Move state/storage.go to state/storage/

This moves storage (blobstore) code out of state,
and into the state/storage package. The storage code
is inconsequential to state itself, it just happens
to be co-resident in the Mongo database.

The moved code does not depend on state, but instead
takes an environment UUID and an mgo.Session derived
from a state.State.

In the future we should also move the ToolStorage
code, removing the dependency of state on blobstore
altogether.
worker/certupdater: add "juju-apiserver" as DNS name

The in-tree API clients are using "juju-apiserver" as the
hostname to verify when connecting to the API server,
rather than the actual hostname. The certupdater worker
was not setting this as a DNS name in the certificates it
generates. The Azure provider doesn't record any public IP
addresses, so the verification always takes place and always
fails.

We fix this by adding "juju-apiserver" as a DNS name in the
certificates. Ideally the clients should be using the actual
hostname used to connect with, but this will break backwards-
compatibility with older versions of Juju.

Fixes https://bugs.launchpad.net/juju-core/+bug/1400348
Merge pull request #1287 from axw/lp1400348-certupdater-jujuapiserver

worker/certupdater: add "juju-apiserver" as DNS name

The in-tree API clients are using "juju-apiserver" as the
hostname to verify when connecting to the API server,
rather than the actual hostname. The certupdater worker
was not setting this as a DNS name in the certificates it
generates. The Azure provider doesn't record any public IP
addresses, so the verification always takes place and always
fails.

We fix this by adding "juju-apiserver" as a DNS name in the
certificates. Ideally the clients should be using the actual
hostname used to connect with, but this will break backwards-
compatibility with older versions of Juju.

Fixes https://bugs.launchpad.net/juju-core/+bug/1400348
Merge pull request #1283 from fwereade/runner-infer-remote-unit

move InferRemoteUnit inside runner.Factory

This is a step towards fixing the juju-run data race; by waiting until we're inside the RunCommands operation before checking args against current state, we are (1) more likely to be checking against current reality and (2) will soon be able to eliminate the race (once we've moved the relationer changes inside their own operations, and ensured that the operations themselves are serialized).

(Review request: http://reviews.vapour.ws/r/598/)
Merge pull request #1279 from mjs/docid-removal

state: removed unnecessary docID calls

Many calls to State.docID() are now unnecessary since the introduction of envStateCollection.

This change also adds the openedPorts and subnets collections to the list of those which contain data for multiple environments.

(Review request: http://reviews.vapour.ws/r/594/)
Merge pull request #1282 from axw/state-storage-move

Move state/storage.go to state/storage/

This moves storage (blobstore) code out of state,
and into the state/storage package. The storage code
is inconsequential to state itself, it just happens
to be co-resident in the Mongo database.

The moved code does not depend on state, but instead
takes an environment UUID and an mgo.Session derived
from a state.State.

In the future we should also move the ToolStorage
code, removing the dependency of state on blobstore
altogether.

(Review request: http://reviews.vapour.ws/r/597/)