juju fails silently when .ssh/config has a ControlMaster set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
juju bootstrap times out after 10m instead of retrying, if ~/.ssh/config has a wildcard ControlMaster and ControlPersist
$ grep -A6 'Host \*$' ~/.ssh/config
Host *
ControlPath ~/.ssh/
$ juju bootstrap -e azure
Launching instance
- juju-azure-
Waiting for address
Attempting to connect to 10.0.0.4:22
Attempting to connect to juju-azure-
ERROR bootstrap failed: waited for 10m0s without being able to connect: ssh: connect to host juju-azure-
Stopping instance...
Bootstrap failed, destroying environment
ERROR waited for 10m0s without being able to connect: ssh: connect to host juju-azure-
I can work around this by modifying my .ssh/config. IMO this is still a bug, and this patch should be considered:
diff --git a/utils/
index d266e28..359fa31 100644
--- a/utils/
+++ b/utils/
@@ -14,7 +14,7 @@ import (
)
-var opensshCommonOp
+var opensshCommonOp
// default identities will not be attempted if
// -i is specified and they are not explicitly
description: | updated |
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → next-stable |
tags: | added: bootstrap ssh |
Changed in juju-core: | |
importance: | High → Medium |
milestone: | next-stable → none |
Changed in juju-core: | |
status: | Triaged → Won't Fix |
I find the use of my configured control master useful. It speeds up connections. For machines where I use two-factor auth (not Juju stuff yet, but it'd be nice not to rule that out), it saves me having to re-auth all the time. Even without that, the connection time speedup is noticeable and I think it helps with charm development iteration considerably.
So I'd like disabling control socket use to be considered a workaround, rather than a solution, and I'd like the option to have Juju to continue using mine when I do "juju ssh".
I also wonder if this is an Azure-specific bug perhaps? I've used (not current; older) versions of Juju with a control socket enabled, noticed that "juju ssh" was using it, and didn't notice any problems. My settings were:
Host * control/ %r@%h:% p
ControlMaster auto
ControlPath ~/.ssh/
ControlPersist 3600