`juju exec --unit` doesn't work against a manually added machine
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
High
|
Unassigned |
Bug Description
tl;dr: If you `juju add-machine ssh:...` a machine then deploy a unit to it, you won't be able to `juju exec --unit` to it. However `juju exec --machine` works.
Long description:
I've deployed a LXD VM (essentially `lxc launch images:ubuntu/22.04 microk8s`), added openssh-server to it, injected `~/.local/
This seemed to have worked fine according to `juju status`:
$ juju status
Model Controller Cloud/Region Version SLA Timestamp
microk8s overlord juju-lxd/default 3.1.0 unsupported 16:59:13-05:00
App Version Status Scale Charm Channel Rev Exposed Message
microk8s active 1 microk8s stable 27 no
Unit Workload Agent Machine Public address Ports Message
microk8s/0* active idle 1 10.184.166.111 80,443,16443/tcp
Machine State Address Inst id Base AZ Message
1 started 10.184.166.111 manual:
However, `juju exec --unit` keeps timing out:
$ juju exec --debug --unit microk8s/0 -- hostname
17:01:21 INFO juju.cmd supercommand.go:56 running juju [3.1.0 924c9e190eb56d9
17:01:21 DEBUG juju.cmd supercommand.go:57 args: []string{
17:01:21 INFO juju.juju api.go:86 connecting to API addresses: [10.184.
17:01:21 DEBUG juju.api apiclient.go:1167 successfully dialed "wss://
17:01:21 INFO juju.api apiclient.go:702 connection established to "wss://
17:01:21 INFO cmd common.go:375 Running operation 55 with 1 task
17:01:21 INFO cmd common.go:375 - task 56 on unit-microk8s-0
17:01:21 INFO cmd common.go:375
17:01:21 INFO cmd common.go:375 Waiting for task 56...
17:06:21 DEBUG juju.api monitor.go:35 RPC connection died
ERROR timed out waiting for results from: unit microk8s/0
17:06:21 DEBUG cmd supercommand.go:548 error stack:
github.
github.
But `juju exec --machine` works OK:
$ juju exec --wait 10s --debug --machine 1 -- hostname
17:11:21 INFO juju.cmd supercommand.go:56 running juju [3.1.0 924c9e190eb56d9
17:11:21 DEBUG juju.cmd supercommand.go:57 args: []string{
17:11:21 INFO juju.juju api.go:86 connecting to API addresses: [10.184.
17:11:21 DEBUG juju.api apiclient.go:1167 successfully dialed "wss://
17:11:21 INFO juju.api apiclient.go:702 connection established to "wss://
17:11:21 INFO cmd common.go:375 Running operation 57 with 1 task
17:11:21 INFO cmd common.go:375 - task 58 on machine-1
17:11:21 INFO cmd common.go:375
17:11:21 INFO cmd common.go:375 Waiting for task 58...
microk8s
17:11:23 DEBUG juju.api monitor.go:35 RPC connection died
17:11:23 INFO cmd supercommand.go:555 command finished
There isn't much interesing in the controller logs:
$ juju debug-log -m controller --level error --replay
machine-0: 21:58:35 ERROR juju.mongo could not set the value of "/proc/
machine-0: 21:58:35 ERROR juju.mongo could not set the value of "/sys/kernel/
machine-0: 21:58:35 ERROR juju.mongo could not set the value of "/sys/kernel/
machine-0: 21:58:35 ERROR juju.mongo could not set the value of "/proc/
machine-0: 21:58:35 ERROR juju.worker.
machine-0: 21:58:40 ERROR juju.worker.
machine-0: 21:58:40 ERROR juju.worker.
machine-0: 21:58:40 ERROR juju.worker.logger connection is shut down
machine-0: 21:58:40 ERROR juju.worker.
machine-0: 21:58:40 ERROR juju.worker.
machine-0: 21:58:40 ERROR juju.worker.
unit-controller-0: 21:58:41 ERROR juju.worker.
machine-0: 22:10:31 ERROR juju.apiserver debug-log handler error: sending failed: write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 22:10:32 ERROR juju.rpc error writing response: *tls.permanentError write tcp 10.184.
machine-0: 15:21:46 ERROR juju.mongo could not set the value of "/sys/kernel/
machine-0: 15:21:46 ERROR juju.mongo could not set the value of "/proc/
machine-0: 15:21:46 ERROR juju.mongo could not set the value of "/proc/
machine-0: 15:21:46 ERROR juju.mongo could not set the value of "/sys/kernel/
machine-0: 15:21:46 ERROR juju.worker.
machine-0: 15:21:50 ERROR juju.worker.
machine-0: 15:26:02 ERROR juju.mongo could not set the value of "/sys/kernel/
machine-0: 15:26:02 ERROR juju.mongo could not set the value of "/sys/kernel/
machine-0: 15:26:02 ERROR juju.mongo could not set the value of "/proc/
machine-0: 15:26:02 ERROR juju.mongo could not set the value of "/proc/
machine-0: 15:26:02 ERROR juju.worker.
machine-0: 15:26:06 ERROR juju.worker.
machine-0: 15:26:10 ERROR juju.worker.
machine-0: 15:52:14 ERROR juju.worker.
machine-0: 15:52:14 ERROR juju.worker.
machine-0: 09:59:49 ERROR juju.mongo could not set the value of "/proc/
machine-0: 09:59:49 ERROR juju.mongo could not set the value of "/proc/
machine-0: 09:59:49 ERROR juju.mongo could not set the value of "/sys/kernel/
machine-0: 09:59:49 ERROR juju.mongo could not set the value of "/sys/kernel/
machine-0: 09:59:50 ERROR juju.worker.
machine-0: 09:59:53 ERROR juju.worker.
machine-0: 09:59:58 ERROR juju.worker.
machine-0: 16:15:49 ERROR juju.apiserver debug-log handler error: sending failed: write tcp 10.184.
machine-0: 16:17:07 ERROR juju.apiserver debug-log handler error: sending failed: write tcp 10.184.
machine-0: 16:17:07 ERROR juju.apiserver debug-log handler error: sending failed: write tcp 10.184.
machine-0: 16:28:12 ERROR juju.apiserver debug-log handler error: sending failed: write tcp 10.184.
Those "broken pipe" seemed related but they don't correlate with failed `juju exec` as I've run 10s of failed/timed out exec.
This has be discussed and initially triaged by @hmlanigan (thanks!) here https:/
Additional information:
$ snap list juju
Name Version Rev Tracking Publisher Notes
juju 3.1.0 22136 3.1/stable canonical✓ -
description: | updated |
tags: | added: add-machine add-unit exec |
Changed in juju: | |
importance: | Undecided → High |
status: | New → Triaged |
tags: | added: ssh |