Support smart formatting for relation-ids command

Bug #988065 reported by Jim Baker
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
High
Jim Baker
juju (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Unassigned

Bug Description

== SRU Justification ==

=== Impact ===
Charms written in shell, which is the bulk of charms, cannot make use of the output of this command. Also charms written using the documentation as a guide will not work because the docs say it works this way.

=== Test Case ===
1. juju bootstrap
2. juju deploy --repository /usr/share/docs/juju/examples local:mysql
3. juju deploy --repository /usr/share/docs/juju/examples local:wordpress
4. juju debug-hooks wordpress/0 db
5. juju add-relation mysql wordpress
6. When the db-relation-joined hook window opens up run 'relation-ids'. Affected versions will print out json, while fixed versions will print out a list, something like "db:0\n"

=== Dev fix ===

Fixed in upstream commit 532

=== Regression Potential ===

Medium. Charms may have already been written that are using the broken behavior. They will have to add --format=json but other than that will work fine. This is mitigated by the fact that the official PPA version is already fixed, and many users, including the charm store automated testing suite use that version.

== Original Bug Description ==

Adds format_smart method for RelationIdsCli, which outputs whitespace separated (to be precise, per line) relation idents.

Related branches

Jim Baker (jimbaker)
Changed in juju:
assignee: nobody → Jim Baker (jimbaker)
milestone: none → honolulu
status: New → In Progress
Jim Baker (jimbaker)
Changed in juju:
status: In Progress → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

How serious is this bug? Worth updating juju in precise?

Revision history for this message
Jim Baker (jimbaker) wrote :

I believe it is worth updating in precise:

1) The fix is small and contained
2) It fixes an important deviation in behavior for shell users; prior to this change, output is always json, which is difficult for shell programs to parse without a helper
3) The fixed feature likely is only starting to see experimental usage now, but should become more important for a number of use cases in relation orchestration in the near term

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Ok sounds pretty important, though I worry about regressing charms that are written between now and this being released in Ubuntu.

Since it was already merged, I'm moving it to galapagos.

Changed in juju:
milestone: honolulu → galapagos
Changed in juju:
importance: Undecided → High
description: updated
Changed in juju (Ubuntu):
status: New → Fix Released
Changed in juju (Ubuntu Precise):
status: New → Triaged
Changed in juju (Ubuntu):
importance: Undecided → High
Changed in juju (Ubuntu Precise):
importance: Undecided → High
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Jim, or anyone else affected,

Accepted juju into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in juju (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Verified working in precise-proposed:

root@ip-10-244-15-92:/var/lib/juju/units/mysql-0/charm# relation-ids
db:0
db:1
root@ip-10-244-15-92:/var/lib/juju/units/mysql-0/charm# apt-cache policy juju
juju:
  Installed: 0.5+bzr531-0ubuntu1.1
  Candidate: 0.5+bzr531-0ubuntu1.1
  Version table:
 *** 0.5+bzr531-0ubuntu1.1 0
        500 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.5+bzr531-0ubuntu1 0
        500 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages

tags: added: verification-done
removed: verification-needed
James Page (james-page)
Changed in juju (Ubuntu Precise):
milestone: none → ubuntu-12.04.1
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package juju - 0.5+bzr531-0ubuntu1.2

---------------
juju (0.5+bzr531-0ubuntu1.2) precise-proposed; urgency=low

  * d/p/upstream-541-542.patch: fix shell script to make proposed work
    for local provider. (LP: #1007657)

juju (0.5+bzr531-0ubuntu1.1) precise-proposed; urgency=low

  * d/p/upstream-532.patch: use proper whitespace separation in
    relation-ids. (LP: #988065)
  * d/p/upstream-533.patch: workaround to suppress Zookeeper logging
    which goes out of control in local provider on Reboot.(LP: #958312)
  * d/p/upstream-534.patch: fix to stop juju-log and relation-set commands
    outputting "{}" to stdout, which can break some programs and makes it
    difficult to use them in a debug-hooks session. (LP: #915506)
  * d/p/upstream-537.patch: make HTTPS apt sources usable inside local
    provider. (LP: #993034)
  * d/p/upstream-538.patch: Add support to install juju from proposed
    pocket to test proposed SRU's. (LP: #926550)
 -- Clint Byrum <email address hidden> Mon, 18 Jun 2012 14:00:56 -0700

Changed in juju (Ubuntu Precise):
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.