outposts: remote docker ssh fixes (#3691)
* improve error logging for SSH connections Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * "fix" host key checking Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
1169efaf97
commit
df4200992c
|
@ -61,7 +61,9 @@ class DockerClient(UpstreamDockerClient, BaseClient):
|
|||
tls=tls_config,
|
||||
)
|
||||
except SSHException as exc:
|
||||
raise ServiceConnectionInvalid from exc
|
||||
if self.ssh:
|
||||
self.ssh.cleanup()
|
||||
raise ServiceConnectionInvalid(exc) from exc
|
||||
# Ensure the client actually works
|
||||
self.containers.list()
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class KubernetesClient(ApiClient, BaseClient):
|
|||
load_kube_config_from_dict(connection.kubeconfig, client_configuration=config)
|
||||
super().__init__(config)
|
||||
except ConfigException as exc:
|
||||
raise ServiceConnectionInvalid from exc
|
||||
raise ServiceConnectionInvalid(exc) from exc
|
||||
|
||||
def fetch_state(self) -> OutpostServiceConnectionState:
|
||||
"""Get version info"""
|
||||
|
|
|
@ -54,6 +54,8 @@ class DockerInlineSSH:
|
|||
self.header,
|
||||
f"Host {self.host}\n",
|
||||
f" IdentityFile {key_path}\n",
|
||||
" StrictHostKeyChecking No\n",
|
||||
" UserKnownHostsFile /dev/null\n",
|
||||
f"{FOOTER}\n",
|
||||
"\n",
|
||||
]
|
||||
|
|
Reference in New Issue