cluster-api-provider-hetzner: Reconcile error for HetznerBareMetalHost and more than one network interface

/kind bug

What steps did you take and what happened: I’m trying to set up k8s cluster with only one node using hetzner-baremetal-control-planes flavor. After generating cluster and adding HetznerBareMetalHost I don’t see any detail about host hardware when doing kubectl describe hetznerbaremetalhost. Here is the log from caph-controller-manager:

Log { "level": "ERROR", "time": "2023-09-21T11:18:53.496Z", "file": "controller/controller.go:324", "message": "Reconciler error", "controller": "hetznerbaremetalhost", "controllerGroup": "infrastructure.cluster.x-k8s.io", "controllerKind": "HetznerBareMetalHost", "HetznerBareMetalHost": { "name": "de1459", "namespace": "de-dev" }, "namespace": "de-dev", "name": "de1459", "reconcileID": "9283fd2c-9da9-4274-aaae-ffbea85dbf64", "error": "failed to reconcile HetznerBareMetalHost de-dev/de1459: action \"registering\" failed: failed to get hardware details: failed to obtain hardware details Nics: failed to unmarshal {\"name\":\"eth0\",\"model\":\"Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)}. Original ssh output name=\"eth0\" model=\"Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)\nIntel Corporation I350 Gigabit Network Connection (rev 01)\" mac=\"f0:2f:74:94:a2:41\" ip=\"162.55.151.48/26\" speedMbps=\"1000\"\nname=\"eth0\" model=\"Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)\nIntel Corporation I350 Gigabit Network Connection (rev 01)\" mac=\"f0:2f:74:94:a2:41\" ip=\"2a01:4f8:262:265f::2/64\" speedMbps=\"1000\": unexpected end of JSON input", "stacktrace": "sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/src/cluster-api-provider-hetzner/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/src/cluster-api-provider-hetzner/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:265\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/src/cluster-api-provider-hetzner/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:226" }

What did you expect to happen: Reconcilation completed successfully

Anything else you would like to add: I assume that’s due to this line: https://github.com/syself/cluster-api-provider-hetzner/blob/v1.0.0-beta.22/pkg/services/baremetal/client/ssh/ssh_client.go#L144 When executed on host, it returns 2 lines:

root@rescue ~ # lspci | grep net | awk '{$1=$2=$3=""; print $0}' | sed "s/^[ \t]*//"
Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
Intel Corporation I350 Gigabit Network Connection (rev 01)

and the script output is like that:

root@rescue ~ # bash nic-info.sh
name="eth0" model="Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
Intel Corporation I350 Gigabit Network Connection (rev 01)" mac="f0:2f:74:94:a2:41" ip="162.55.151.48/26" speedMbps="1000"
name="eth0" model="Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
Intel Corporation I350 Gigabit Network Connection (rev 01)" mac="f0:2f:74:94:a2:41" ip="2a01:4f8:262:265f::2/64" speedMbps="1000"

Environment:

  • cluster-api-provider-hetzner version: v1.0.0-beta.22
  • Kubernetes version: 1.25.12
  • OS (e.g. from /etc/os-release): debian 12

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

@Lenikas is it possible to schedule a call for further debugging?

@guettli please have a look into this in the upcoming week.

@guettli Hello I apologize for the delayed response.

Yes, I have checked the built image, it works. The provisioning completes successfully, and the nodes are added to the cluster.

Thank you so much!

@Lenikas we just released a new version of caph. Should be now usable with clusterctl as well.

@Lenikas please sent me an email at: info@syself.com

@Lenikas is it possible to schedule a call for further debugging?

@guettli please have a look into this in the upcoming week.

Hello @batistein, @guettli!

If relevant, we can schedule a meeting. Alternatively, we can suggest transitioning our communication to a different platform if it’s more convenient for you. Additionally, we can grant you SSH access to the server for debugging purposes.

How long do you think it might take to resolve the issue? It’s important for our team to understand this to plan our next steps. Unfortunately, our team lacks sufficient expertise in Go to quickly resolve this issue.

If you need any further information, we’re ready to provide it.

Thank you!