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

Bug #1454678 reported by Björn Tillenius on 2015-05-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
High
Andrew Wilkins
1.24
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) on 2015-05-15
tags: added: relation-set
Curtis Hovey (sinzui) on 2015-05-22
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.25.0
Ian Booth (wallyworld) on 2015-06-05
Changed in juju-core:
status: Triaged → Fix Committed
assignee: nobody → Andrew Wilkins (axwalk)
Curtis Hovey (sinzui) on 2015-06-05
Changed in juju-core:
status: Fix Committed → Fix Released
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) on 2015-06-18
Changed in juju-core:
status: Triaged → In Progress
Andrew Wilkins (axwalk) wrote :

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

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.

Andrew Wilkins (axwalk) on 2015-06-19
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2015-06-25
Changed in juju-core:
status: Fix Committed → Fix Released
tags: added: kanban-cross-team
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers