kubermatic / kubeone

Kubermatic KubeOne automate cluster operations on all your cloud, on-prem, edge, and IoT environments.
https://kubeone.io
Apache License 2.0
1.38k stars 234 forks source link

Could not retrieve signers for SSH agent (after upgrading from kubeone 1.4.0 to 1.4.3) (happens since 1.4.1) #2047

Closed kimar closed 2 years ago

kimar commented 2 years ago

What happened?

Hardware used: MacBook Pro M1 Max 2021 (Apple Silicon)

Software used Kubeone 1.4.3 (darwin-arm64)

Expected behavior

The cluster is force upgraded using kubeone v1.4.3

How to reproduce the issue?

Try to use kubeone 1.4.3 on a MBP using id_ed25519 ssh key

What KubeOne version are you using?

```console $ kubeone version { "kubeone": { "major": "1", "minor": "4", "gitVersion": "1.4.3", "gitCommit": "717787f2287964e5793d80ec8ca2c2169936b0ac", "gitTreeState": "", "buildDate": "2022-05-11T14:18:03Z", "goVersion": "go1.18.1", "compiler": "gc", "platform": "darwin/arm64" }, "machine_controller": { "major": "1", "minor": "43", "gitVersion": "v1.43.2", "gitCommit": "", "gitTreeState": "", "buildDate": "", "goVersion": "", "compiler": "", "platform": "linux/amd64" } } ```

Provide your KubeOneCluster manifest here (if applicable)

```yaml apiVersion: kubeone.k8c.io/v1beta2 kind: KubeOneCluster versions: kubernetes: 1.23.6 cloudProvider: hetzner: {} external: true ```

What cloud provider are you running on?

Hetzner Cloud

What operating system are you running in your cluster?

Ubuntu 20.04

Additional information

I've tried kubeone versions 1.4.0, 1.4.1, 1.4.2, 1.4.3 the last working version is 1.4.0, from v1.4.1 on all releases are failing for me. Maybe some upgrade in the Go library to create the signer is somehow malfunctioning with my setup?

➜ kubeone apply -m kubeone.yaml -t tf.json --force-upgrade
INFO[14:05:14 CEST] Determine hostname...
ERRO[14:05:14 CEST] failed to connect to xx.xx.xx.xx: could not retrieve signers for SSH agent  node=xx.xx.xx.xx
ERRO[14:05:14 CEST] failed to connect to xx.xx.xx.xx: could not retrieve signers for SSH agent  node=xx.xx.xx.xx
ERRO[14:05:14 CEST] failed to connect to xx.xx.xx.xx: could not retrieve signers for SSH agent  node=xx.xx.xx.xx
WARN[14:05:14 CEST] Task failed, error was: at least one of the tasks has encountered an error
xmudrii commented 2 years ago

Looks like this is a regression. I’ll take a look.

xmudrii commented 2 years ago

@kimar I'm not able to reproduce this issue with an ed25519 key. Do you have ssh-agent configured? Can you try following the instructions in Configuring SSH (Configuring ssh-agent section)?

xmudrii commented 2 years ago

@kimar Also, do you see your key when you run ssh-add -l?

kimar commented 2 years ago

@xmudrii damn, that was it, I haven't even checked because I thought that the ssh client (which was able to connect just fine) was using the key from the agent, turns it it apparently wasn't added to the agent.

After adding it everything works as expected.

Thanks for digging into it and sorry for wasting your time.