Skip to content

Commit

Permalink
Use lower-case Server UUIDs (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler authored Nov 1, 2024
1 parent 6ae1ff4 commit fc6ef61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bmc/redfish.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func (r *RedfishBMC) getSystemByUUID(systemUUID string) (*redfish.ComputerSystem
return nil, err
}
for _, system := range systems {
if system.UUID == systemUUID {
if strings.ToLower(system.UUID) == systemUUID {
return system, nil
}
}
Expand Down
3 changes: 2 additions & 1 deletion internal/controller/bmc_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package controller
import (
"context"
"fmt"
"strings"

"k8s.io/apimachinery/pkg/api/errors"

Expand Down Expand Up @@ -166,7 +167,7 @@ func (r *BMCReconciler) discoverServers(ctx context.Context, log logr.Logger, bm
Name: GetServerNameFromBMCandIndex(i, bmcObj),
},
Spec: metalv1alpha1.ServerSpec{
UUID: s.UUID,
UUID: strings.ToLower(s.UUID), // always use lower-case uuids
BMCRef: &v1.LocalObjectReference{Name: bmcObj.Name},
},
}
Expand Down

0 comments on commit fc6ef61

Please sign in to comment.