"relation-set --file -" doesn't seem to work
| 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 |
| tags: | added: relation-set |
| Changed in juju-core: | |
| status: | New → Triaged |
| importance: | Undecided → High |
| milestone: | none → 1.25.0 |
| Changed in juju-core: | |
| status: | Triaged → Fix Committed |
| assignee: | nobody → Andrew Wilkins (axwalk) |
| Changed in juju-core: | |
| status: | Fix Committed → Fix Released |
| Changed in juju-core: | |
| status: | Triaged → In Progress |
| Andrew Wilkins (axwalk) wrote : | #2 |
New fix proposed on master: https:/
| Andrew Wilkins (axwalk) wrote : | #3 |
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) wrote : | #4 |
Attempt 3: https:/
| Changed in juju-core: | |
| status: | In Progress → Fix Committed |
| Changed in juju-core: | |
| status: | Fix Committed → Fix Released |
| tags: | added: kanban-cross-team |


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.