juju-deployer --diff doesn't support multiple relations between same service pair

Bug #1424052 reported by JuanJo Ciarlante
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
juju-deployer
Fix Released
Medium
William Grant

Bug Description

Doing 'juju-deployer --diff some-openstack.yaml' fails with:
Traceback (most recent call last):
  File "/usr/bin/juju-deployer", line 9, in <module>
    load_entry_point('juju-deployer==0.4.3', 'console_scripts', 'juju-deployer')()
  File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 130, in main
    run()
  File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 223, in run
    diff.Diff(env, deployment, options).run()
  File "/usr/lib/python2.7/dist-packages/deployer/action/diff.py", line 152, in run
    diff = self.do_diff()
  File "/usr/lib/python2.7/dist-packages/deployer/action/diff.py", line 148, in do_diff
    self.load_env()
  File "/usr/lib/python2.7/dist-packages/deployer/action/diff.py", line 34, in load_env
    rels.update(self._load_rels(svc_name))
  File "/usr/lib/python2.7/dist-packages/deployer/action/diff.py", line 49, in _load_rels
    rr_name = self._get_rel_name(svc_name, r_svc)
  File "/usr/lib/python2.7/dist-packages/deployer/action/diff.py", line 62, in _get_rel_name
    raise ValueError("Ambigious relations for service")
ValueError: Ambigious relations for service

Note that juju-deployer properly deploys it, but diff.py logic,
is failing on this YAML excerpt:
  relations:
    - [ ceilometer, "keystone:identity-service" ]
    - [ ceilometer, "keystone:identity-notifications" ]

FYI above relations as per
https://wiki.ubuntu.com/ServerTeam/OpenStackCharms/ReleaseNotes1501#Ceilometer

Related branches

Paul Gear (paulgear)
tags: added: canonical-bootstack
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

so.. idle thoughts.. ibest practice i think is going to be using ensemble (github.com/kapilt/ensemble) for diffs. i haven't gotten around to incorporating it into deployer. but the diff logic there is significantly simpler and more robust as it implements a full backend/mock impl of core.

JuanJo Ciarlante (jjo)
Changed in juju-deployer:
assignee: nobody → JuanJo Ciarlante (jjo)
Revision history for this message
JuanJo Ciarlante (jjo) wrote :

@hazmat: tnx for the feedback, until we have that approach
ready, I'd appreciate your review on linked MP (all tests
pass, verified also against some of our deploys), as it's
quite a critical part of our production workflow, to assess
configs in-sync with environment.

JuanJo Ciarlante (jjo)
Changed in juju-deployer:
assignee: JuanJo Ciarlante (jjo) → nobody
David Britton (dpb)
Changed in juju-deployer:
status: New → In Progress
importance: Undecided → Medium
David Britton (dpb)
Changed in juju-deployer:
assignee: nobody → JuanJo Ciarlante (jjo)
Revision history for this message
Robert Bruce Park (robru) wrote :

This just bit me today, fortunately my second relation between two services was vestigial and I was able to solve the problem by removing a relation. Quite strange though, because this definitely used to work back when I added the second relation, perhaps a year ago.

JuanJo Ciarlante (jjo)
Changed in juju-deployer:
assignee: JuanJo Ciarlante (jjo) → nobody
Revision history for this message
Tom Haddon (mthaddon) wrote :

JuanJo is not going to have time to work on this for the next few weeks, so if we want to progress before then we'll need to find someone else to pick this up.

tags: added: is
William Grant (wgrant)
Changed in juju-deployer:
assignee: nobody → William Grant (wgrant)
Changed in juju-deployer:
status: In Progress → Fix Committed
Tom Haddon (mthaddon)
Changed in juju-deployer:
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.