Add --all-units flag to `juju exec`
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Wishlist
|
Unassigned |
Bug Description
I have noticed it in older versions as well but I haven't reported it until now.
When --all is used instead of --application or --unit no context is added and one cannot use hook tools.
juju version
2.2.3-xenial-amd64
juju run --all 'leader-get'
- MachineId: "0"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
- MachineId: "1"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
- MachineId: "2"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
- MachineId: "3"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
- MachineId: "4"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
- MachineId: "5"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
- MachineId: "6"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
- MachineId: "7"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
- MachineId: "8"
ReturnCode: 127
Stderr: |
/tmp/
Stdout: ""
juju run --all 'env'
http://
Same for --unit yields expected results:
juju run --unit kubernetes-worker/0 'leader-get'
{}
juju run --unit kubernetes-worker/0 'env'
JUJU_API_
JUJU_UNIT_
CHARM_DIR=
JUJU_ACTION_
JUJU_METER_INFO=
JUJU_CHARM_
NO_PROXY=
JUJU_SLA=
PATH=/var/
JUJU_ACTION_
JUJU_ACTION_
JUJU_MACHINE_ID=6
PWD=/var/
JUJU_PRINCIPAL_
JUJU_CONTEXT_
SHLVL=1
JUJU_AVAILABILI
JUJU_MODEL_
no_proxy=
DEBIAN_
APT_LISTCHANGES
JUJU_METER_
JUJU_MODEL_
JUJU_AGENT_
_=/usr/bin/env
summary: |
- no context added for commands executed via juju run --all + juju run --all-units |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
--all means all machines not all units. And there is no hook context for a
machine.
On Sep 3, 2017 19:50, "Dmitrii Shcherbakov" <email address hidden>
wrote:
> Public bug reported: exec423897953/ script. sh: line 1: leader-get: command not exec855188809/ script. sh: line 1: leader-get: command not exec879909396/ script. sh: line 1: leader-get: command not exec086721957/ script. sh: line 1: leader-get: command not exec844669457/ script. sh: line 1: leader-get: command not exec445768926/ script. sh: line 1: leader-get: command not exec544412598/ script. sh: line 1: leader-get: command not exec826609010/ script. sh: line 1: leader-get: command not exec623228081/ script. sh: line 1: leader-get: command not paste.ubuntu. com/25458703/ ADDRESSES= 10.232. 5.91:17070 NAME=kubernetes -worker/ 0 /var/lib/ juju/agents/ unit-kubernetes -worker- 0/charm TAG=action- b0cdfa87- bafa-466a- 83d6-44f532a4dc ff DIR=/var/ lib/juju/ agents/ unit-kubernetes -worker- 0/charm 127.0.0. 1,::1,localhost unsupported lib/juju/ tools/unit- kubernetes- worker- 0:/usr/ /usr/local/ bin:/usr/ sbin:/usr/ bin:/sbin: /bin UUID=b0cdfa87- bafa-466a- 83d6-44f532a4dc ff NAME=juju- run lib/juju/ agents/ unit-kubernetes -worker- 0/charm UNIT= ID=kubernetes- worker/ 0-juju- run-18996509359 21258530 TY_ZONE= Valravn UUID=aee3ef84- 6bd7-42bc- 8bad-0269f49201 48 127.0.0. 1,::1,localhost FRONTEND= noninteractive _FRONTEND= none STATUS= RED NAME=default SOCKET= @/var/lib/ juju/agents/ unit-kubernetes - 0/agent. socket
>
> I have noticed it in older versions as well but I haven't reported it
> until now.
>
> When --all is used instead of --application or --unit no context is
> added and one cannot use hook tools.
>
> juju version
> 2.2.3-xenial-amd64
>
> juju run --all 'leader-get'
> - MachineId: "0"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
> - MachineId: "1"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
> - MachineId: "2"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
> - MachineId: "3"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
> - MachineId: "4"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
> - MachineId: "5"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
> - MachineId: "6"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
> - MachineId: "7"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
> - MachineId: "8"
> ReturnCode: 127
> Stderr: |
> /tmp/juju-
> found
> Stdout: ""
>
> juju run --all 'env'
> http://
>
>
> Same for --unit yields expected results:
>
> juju run --unit kubernetes-worker/0 'leader-get'
> {}
>
> juju run --unit kubernetes-worker/0 'env'
> JUJU_API_
> JUJU_UNIT_
> CHARM_DIR=
> JUJU_ACTION_
> JUJU_METER_INFO=
> JUJU_CHARM_
> NO_PROXY=
> JUJU_SLA=
> PATH=/var/
> local/sbin:
> JUJU_ACTION_
> JUJU_ACTION_
> JUJU_MACHINE_ID=6
> PWD=/var/
> JUJU_PRINCIPAL_
> JUJU_CONTEXT_
> SHLVL=1
> JUJU_AVAILABILI
> JUJU_MODEL_
> no_proxy=
> DEBIAN_
> APT_LISTCHANGES
> JUJU_METER_
> JUJU_MODEL_
> JUJU_AGENT_
> worker-
> _=/usr/bin/env
>
> ** Affects: juju
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because y...