"relation-set --file -" doesn't seem to work

Bug #1454678 reported by Björn Tillenius
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Andrew Wilkins
1.24
Fix Released
High
Andrew Wilkins

Bug Description

With Juju 1.23.2, I'm not able to get "relation-set --file -" to read the file from stdin.

As a test, I have a file settings.yaml:

  {foo: bar}

To begin with the values isn't set:

  landscape:~> juju run --unit landscape-server/0 'relation-get -r amqp:4 - landscape-server/0'
  private-address: 10.0.3.61

Now we try with --file -:

  landscape:~> juju run --unit landscape-server/0 'cat /tmp/settings.yaml | relation-set -r amqp:4 --file -'

The value still isn't set:

  landscape:~> juju run --unit landscape-server/0 'relation-get -r amqp:4 - landscape-server/0'
  private-address: 10.0.3.61

Now, using --file settings.yaml seems to work, though:

  landscape:~> juju run --unit landscape-server/0 'relation-set -r amqp:4 --file /tmp/settings.yaml'
  landscape:~> juju run --unit landscape-server/0 'relation-get -r amqp:4 - landscape-server/0'
  foo: bar
  private-address: 10.0.3.61

Am I doing something wrong?

tags: added: landscape
Curtis Hovey (sinzui)
tags: added: relation-set
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.25.0
Ian Booth (wallyworld)
Changed in juju-core:
status: Triaged → Fix Committed
assignee: nobody → Andrew Wilkins (axwalk)
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
Revision history for this message
Jesse Meek (waigani) wrote :

The fix has been reverted as it introduced this bug: https://bugs.launchpad.net/juju-core/+bug/1463117. Please see the comments on that bug.

Changed in juju-core:
status: Fix Released → Triaged
Andrew Wilkins (axwalk)
Changed in juju-core:
status: Triaged → In Progress
Revision history for this message
Andrew Wilkins (axwalk) wrote :

New fix proposed on master: https://github.com/juju/juju/pull/2594

Revision history for this message
Andrew Wilkins (axwalk) wrote :

I've canned PR2594 because it would break gocharm. I'll repropose later, similar to what I originally proposed but with some changes to make reading of stdin conditional.

Revision history for this message
Andrew Wilkins (axwalk) wrote :
Andrew Wilkins (axwalk)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
David Britton (dpb)
tags: added: kanban-cross-team
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.