Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: restructure instancecfg #5518

Merged
merged 3 commits into from Jun 3, 2016
Merged

Conversation

axw
Copy link
Contributor

@axw 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 3 commits June 2, 2016 14:29
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.
@axw
Copy link
Contributor Author

axw commented Jun 3, 2016

Partially $$fixes-1586890$$

@jujubot
Copy link
Collaborator

jujubot commented Jun 3, 2016

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

@jujubot
Copy link
Collaborator

jujubot commented Jun 3, 2016

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

@axw
Copy link
Contributor Author

axw commented Jun 3, 2016

$$fixes-1586890$$

@jujubot
Copy link
Collaborator

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
Labels
None yet
Projects
None yet
2 participants