Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lower-case Server UUIDs #161

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading