Relations with subordinate services can be added multiple times

Bug #1116876 reported by David Britton
16
This bug affects 3 people
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/landscape-client
2013-02-05 16:48:43,887 INFO Searching for charm local:precise/landscape-client in local charm repository: /home/dpb/src
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/landscape-client-5
    relations:
      juju-info:
      - ubuntu
    subordinate: true
    subordinate-to:
    - ubuntu
  ubuntu:
    charm: cs:precise/ubuntu-0
    relations:
      juju-info:
      - landscape-client
    units:
      ubuntu/0:
        agent-state: started
        machine: 0
        public-address: 10.0.3.66
        subordinates:
          landscape-client/0:
            agent-state: started
          landscape-client/1:
            agent-state: started

Notice both landscape-client/0 and landscape-client/1 are "connected" the principal ubuntu/0

Related branches

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

I saw this also, and had problems removing the extra relations.

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

"juju remove-relation XXX-extra-packages XXX"

gives:

"ERROR Unsupported attempt to destroy subordinate service 'XXX' while principal service 'XXX-extra-packages' is related"

Changed in juju:
status: New → Confirmed
summary: - relations with subordinate services can be added multiple times
+ Relations with subordinate services can be added multiple times
Thomas Herve (therve)
Changed in juju:
assignee: nobody → Thomas Herve (therve)
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Fixed in PPA: "ERROR Relation juju-info already exists between A and B".

Changed in juju:
status: Confirmed → In Progress
Changed in juju:
status: In Progress → Fix Committed
milestone: none → 0.7
Martin Packman (gz)
Changed in juju:
importance: Undecided → Medium
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.