state: isolate/generalise refcounting #6040

Merged
merged 1 commit into from Aug 22, 2016

Conversation

Projects
None yet
3 participants
Contributor

fwereade commented Aug 19, 2016

Refcount values are (1) implied by the rest of a model description and
(2) pure implementation details necessitated by mgo/txn. They've been
dropped from description.Application; refcount sanity is now maintained
implicitly during import by the add*Ops-level funcs.

Refcount operations themselves have been extracted to refcounts_ns.go
...and the "settingsrefs" collection has been renamed to "refcounts",
reflecting its broader purpose.

Charm refcounts have been added, but nothing currently holds references
to them.

This is identical to PR5939, except that nsRefcounts.JustRemoveOp now accepts a negative value to indicate "don't assert anything, just kill it". To QA, deploy ~/containers/bundle/elk-stack and wait for all machines to be started; then destroy-controller --destroy-all-models, and check that everything gets cleaned up.

The deploy isn't clean, which probably doesn't matter for this specific branch. There's a problem with kibana:

kibana/0 error idle 2 54.196.108.173 80/tcp,9200/tcp hook failed: "rest-relation-changed" for elasticsearch:client
logstash/0 blocked idle 3 54.197.94.74 Missing JRE
zulu8/0 error idle 54.197.94.74 hook failed: "java-relation-joined" for zulu8:java
unit-kibana-0: 12:47:32 INFO worker.uniter.jujuc running hook tool "relation-get" ["private-address" "-"]
unit-kibana-0: 12:47:32 INFO unit.kibana/0.rest-relation-changed error: "-" is not a valid unit

Deployed to AWS. Both kill-controller and destroy-controller (two separate deploys) worked fine.

state: isolate/generalise refcounting
Refcount values are (1) implied by the rest of a model description and
(2) pure implementation details necessitated by mgo/txn. They've been
dropped from description.Application; refcount sanity is now maintained
implicitly during import by the add*Ops-level funcs.

Refcount operations themselves have been extracted to refcounts_ns.go
...and the "settingsrefs" collection has been renamed to "refcounts",
reflecting its broader purpose.

Charm refcounts have been added, but nothing currently holds references
to them.
Contributor

fwereade commented Aug 22, 2016

Thanks Michael. Sorry the instructions weren't clear: the point was indeed to safely tidy up non-clean deploys.

LGTM

Contributor

fwereade commented Aug 22, 2016

$$merge$$

Contributor

jujubot commented Aug 22, 2016

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

Contributor

jujubot commented Aug 22, 2016

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

Contributor

fwereade commented Aug 22, 2016

mongo failures; $$merge$$

Contributor

jujubot commented Aug 22, 2016

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

Contributor

jujubot commented Aug 22, 2016

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

Contributor

fwereade commented Aug 22, 2016

mongo again; /sigh; $$merge$$

Contributor

jujubot commented Aug 22, 2016

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

@jujubot jujubot merged commit 768a90e into juju:master Aug 22, 2016

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