juju-log and relation-set outputs {}

Bug #915506 reported by Nick Barcet
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Benjamin Saller
juju (Ubuntu)
Fix Released
Fix Released

Bug Description

== SRU Justification ==

=== Impact ===

This causes some charms to have to add complex output control logic for calling juju-log.

=== Test Case ===

1. juju bootstrap
2. juju deploy --repository /usr/share/doc/juju/examples local:mysql
3. juju debug-hooks mysql/0
4. upon seeing the install window open, type 'juju-log foo'. Affected versions will show '{}', unaffected versions will return without printing anything.

=== Dev Fix ===

This was fixed in upstream commit 534

=== Regression Potential ===

Low. Charms *MIGHT* have been written in a way where not printing {} would cause issues, but this is very unlikely and is easy to work around.

== Original Bug Description ==

using juju with lxc provider on oneiric.

Enter debugging session on a unit with 'juju debug-hooks' and catch an event.
At the console type 'juju-log "test"'
The standard output receives a {}

This is really anoying if you called juju-log within a function which standard output is important to you...

Related branches

Revision history for this message
Nick Barcet (nijaba) wrote :

strace of the call to juju-log on the lxc container

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

nothing to do with lxc, also applies to relation-set

Changed in juju:
status: New → Confirmed
summary: - juju-log outputs {} on lxc
+ juju-log and relation-set outputs {}
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

the hook cli return values are hooked up directly to a renderer, a no value magic output should resolve.

Changed in juju:
importance: Undecided → Low
Changed in juju:
milestone: none → florence
Changed in juju:
milestone: florence → galapagos
Changed in juju:
assignee: nobody → Benjamin Saller (bcsaller)
Changed in juju:
milestone: galapagos → honolulu
status: Confirmed → In Progress
Changed in juju:
status: In Progress → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Re-targetting to galapagos so we can track all the bugs that get merged before 12.04.1

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

Hello Nick, 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# apt-cache policy 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
root@ip-10-244-15-92:/var/lib/juju/units/mysql-0/charm# juju-log foo

tags: added: verification-done
removed: verification-needed
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

Bug attachments