cluster-api-provider-hetzner icon indicating copy to clipboard operation
cluster-api-provider-hetzner copied to clipboard

Condition for missing `rootDeviceHints` of `HetznerBareMetalHost`

Open janiskemper opened this issue 1 year ago • 5 comments

/kind feature

Describe the solution you'd like The user has to specify rootDeviceHints of HetznerBareMetalHosts. Currently, no condition shows the user that rootDeviceHints are still missing.

I propose to add a condition that shows whether rootDeviceHints are existing (and valid) or not. This condition can be set on true or false independent of the provisioning of a machine. It is maybe necessary to distinguish rootDeviceHints that are set from those that are validated, because if the controller hasn't gotten the information about the storage devices from the machine yet, then the rootDeviceHints cannot be validated yet.

janiskemper avatar Feb 20 '24 14:02 janiskemper

there is a condition already, also similar to what is mentioned here, and it is set during the provisioning process: https://github.com/syself/cluster-api-provider-hetzner/blob/cd03c29115d2981ece23a6832654d2238c69f0f3/pkg/services/baremetal/host/host.go#L627

What we need additionally, is a condition that shows for a host that is not yet provisioned that this is missing. the message should give information about the fact that users can still wait for the provisioning process to get information about the storage devices, or use ssh and check it manually.

The condition should be set in hetznerbaremetalhost-controller.go before we do reconcileSelectedStates

janiskemper avatar Jun 26 '24 15:06 janiskemper

@janiskemper I would love to work on this issue

sarthaksarthak9 avatar Jul 21 '24 10:07 sarthaksarthak9

sure @sarthaksarthak9, you can try! I won't be able to support much though. Do you have access to Hetzner bare metal servers? Otherwise it'll be difficult

janiskemper avatar Jul 22 '24 06:07 janiskemper

@janiskemper I don't have access to Hetzner bare metal servers and understand it might be difficult without it, I'll focus on other issues for now.

sarthaksarthak9 avatar Jul 23 '24 06:07 sarthaksarthak9

@sarthaksarthak9 you don't need real machines for that. We have tests and mocks. We use envTest for that.

guettli avatar Aug 15 '24 11:08 guettli