all: restructure instancecfg #5518

Merged
merged 3 commits into from Jun 3, 2016

Conversation

Projects
None yet
2 participants
Member

axw commented Jun 2, 2016

We restructure instancecfg.InstanceConfig such that the
common, controller-specific, and bootstrap-specific parts
are separated. We also define a structure in instancecfg
that is serialised and sent through to the bootstrap agent,
which can deserialise it into the same format. This will
simplify the task of adding bootstrap-agent parameters.

These changes shook out a couple of bugs (filed), and
some inappropriate uses of InstanceConfig (removed/rewritten).
We no longer expect MongoInfo to be present in non-controller
machines, and so we remove it from the common instance config.

container/kvm was relying on InstanceConfig.Constraints,
which is really inappropriate: those constraints are meant
to be for initialising the state database. The CreateContainer
method now takes a constraints.Value, which is passed by the
provisioner from StartInstanceParams.

Custom image metadata no longer needs to be written to the
blob store in Mongo, so that code has been removed from
cmd/jujud/bootstrap.go. Consequently, we no longer need to
marshal the metadata to the on-disk format, and we can keep
it in the in-memory format and avoid the simplestreams
marshal/unmarshal dance we used to do.

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

axw added some commits Jun 1, 2016

all: restructure instancecfg
We restructure instancecfg.InstanceConfig such that the
common, controller-specific, and bootstrap-specific parts
are separated. We also define a structure in instancecfg
that is serialised and sent through to the bootstrap agent,
which can deserialise it into the same format. This will
simplify the task of adding bootstrap-agent parameters.

These changes shook out a couple of bugs (filed), and
some inappropriate uses of InstanceConfig (removed/rewritten).
We no longer expect MongoInfo to be present in non-controller
machines, and so we remove it from the common instance config.

container/kvm was relying on InstanceConfig.Constraints,
which is really inappropriate: those constraints are meant
to be for initialising the state database. The CreateContainer
method now takes a constraints.Value, which is passed by the
provisioner from StartInstanceParams.

Custom image metadata no longer needs to be written to the
blob store in Mongo, so that code has been removed from
cmd/jujud/bootstrap.go. Consequently, we no longer need to
marshal the metadata to the on-disk format, and we can keep
it in the in-memory format and avoid the simplestreams
marshal/unmarshal dance we used to do.
Member

axw commented Jun 3, 2016

Partially $$fixes-1586890$$

Contributor

jujubot commented Jun 3, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jun 3, 2016

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/7971

Member

axw commented Jun 3, 2016

$$fixes-1586890$$

Contributor

jujubot commented Jun 3, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 978632a into juju:master Jun 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment