Relations with subordinate services can be added multiple times
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Fix Released
|
Medium
|
Thomas Herve |
Bug Description
In the case of subordinate services that are joined to a principal with no interface, the relation can be added multiple times on the same unit, which seems to go against the idea of a relation in other parts of juju. I asked quicky in #juju on freenode and was told this seems like a bug.
Here is a console interaction to repeat the problem.
$ juju deploy ubuntu
2013-02-05 16:42:06,899 INFO Searching for charm cs:precise/ubuntu in charm store
2013-02-05 16:42:08,438 INFO Charm deployed as service: 'ubuntu'
2013-02-05 16:42:08,438 INFO 'deploy' command finished successfully
$ mkdir precise
$ cd precise; bzr branch lp:~charmers/charms/precise/landscape-client/trunk landscape-client; cd -
$ juju deploy --repository . local:precise/
2013-02-05 16:48:43,887 INFO Searching for charm local:precise/
2013-02-05 16:48:44,086 INFO Subordinate 'landscape-client' awaiting relationship to principal for deployment.
2013-02-05 16:48:44,086 INFO Charm deployed as service: 'landscape-client'
2013-02-05 16:48:44,087 INFO 'deploy' command finished successfully
$ juju add-relation landscape-client ubuntu
2013-02-05 16:48:57,195 INFO Added juju-info relation to all service units.
2013-02-05 16:48:57,195 INFO 'add_relation' command finished successfully
$ juju add-relation landscape-client ubuntu
2013-02-05 16:48:59,044 INFO Added juju-info relation to all service units.
2013-02-05 16:48:59,044 INFO 'add_relation' command finished successfully
$ juju status
machines:
0:
agent-state: running
dns-name: localhost
instance-id: local
instance-state: running
services:
landscape-client:
charm: local:precise/
relations:
juju-info:
- ubuntu
subordinate: true
subordinate-to:
- ubuntu
ubuntu:
charm: cs:precise/ubuntu-0
relations:
juju-info:
- landscape-client
units:
ubuntu/0:
machine: 0
Notice both landscape-client/0 and landscape-client/1 are "connected" the principal ubuntu/0
Related branches
- Kapil Thangavelu (community): Approve
-
Diff: 32 lines (+6/-3)2 files modifiedjuju/state/tests/test_relation.py (+3/-0)
juju/state/topology.py (+3/-3)
Changed in juju: | |
assignee: | nobody → Thomas Herve (therve) |
Changed in juju: | |
status: | In Progress → Fix Committed |
milestone: | none → 0.7 |
Changed in juju: | |
importance: | Undecided → Medium |
status: | Fix Committed → Fix Released |
I saw this also, and had problems removing the extra relations.