From 8172e8622611df71a92d4f44d4b9530de0c19c44 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Thu, 10 Oct 2024 09:38:22 +0200 Subject: [PATCH] Add hint on still existing problem --- cmd/metal-api/internal/datastore/switch.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/metal-api/internal/datastore/switch.go b/cmd/metal-api/internal/datastore/switch.go index d5982c19c..2210d7566 100644 --- a/cmd/metal-api/internal/datastore/switch.go +++ b/cmd/metal-api/internal/datastore/switch.go @@ -161,7 +161,10 @@ func (rs *RethinkStore) ConnectMachineWithSwitches(m *metal.Machine) error { s2 := newSwitches[1] cons1 := s1.MachineConnections[m.ID] cons2 := s2.MachineConnections[m.ID] + + // FIXME this error will occur even if Partition.MachineNetworkRequirements.MinimumNeighbors is set to < 2 connectionMapError := fmt.Errorf("twin-switches do not have a connection map that is mirrored crosswise for machine %v, switch %v (connections: %v), switch %v (connections: %v)", m.ID, s1.Name, cons1, s2.Name, cons2) + if len(cons1) != len(cons2) { return connectionMapError }