juju-run gives a poor error when the unit is ambiguous
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
High
|
Unassigned |
Bug Description
juju-run --help claims that you can pass an empty string to -u, but this doesn't appear to be true.
| root@grafana-1:~# juju-run --help
[...]
| If the there's one and only one unit on this host, <unit-name>
| is automatically inferred and the positional argument is not needed.
| If -u is passed an empty string, this behaviour is also observed.
^^^^^
|
| Examples:
| juju-run app/0 hostname -f
| juju-run --no-context -- hostname -f
| juju-run "hostname -f"
| juju-run -u "" -- hostname -f
| juju-run -u app/0 "hostname -f"
| juju-run -u app/0 -- hostname -f
|
| The commands are executed with '/bin/bash -s', and the output returned.
| root@grafana-1:~# juju-run -u "" -- hostname -f
| ERROR no unit
| root@grafana-1:~#
tags: | added: ju-10 |
tags: | added: ju-19 |
tags: | removed: ju-10 ju-19 |
Changed in juju: | |
milestone: | 2.9-next → none |
This appears to be the help for a plugin. I've marked it invalid for the Juju project.