Skip to content

Commit

Permalink
🌱 Skip machines with one WWN, if RAID is desired.
Browse files Browse the repository at this point in the history
  • Loading branch information
guettli committed Feb 13, 2024
1 parent 81374d3 commit 10785c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/services/baremetal/baremetal/baremetal.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ func (s *Service) chooseHost(ctx context.Context) (*infrav1.HetznerBareMetalHost
availableHosts := make([]*infrav1.HetznerBareMetalHost, 0, len(hosts.Items))

for i, host := range hosts.Items {
if s.scope.BareMetalMachine.Spec.InstallImage.Swraid == 1 {
// Machine should have RAID. Skip machines which have only one WWN
if len(host.Spec.RootDeviceHints.Raid.WWN) < 2 {
continue
}
}
if host.Spec.ConsumerRef != nil && consumerRefMatches(host.Spec.ConsumerRef, s.scope.BareMetalMachine) {
helper, err := patch.NewHelper(&hosts.Items[i], s.scope.Client)
if err != nil {
Expand Down

0 comments on commit 10785c7

Please sign in to comment.