Skip to content
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 internal/scheduling/nova/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func newNovaRequest(instanceUUID, projectID, flavorName, flavorGroup string, vcp

extraSpecs := map[string]string{
"capabilities:hypervisor_type": "qemu",
"hw_version": flavorGroup,
"quota:hw_version": flavorGroup,
}

var schedulerHints map[string]any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (s *FilterHasEnoughCapacity) Run(traceLog *slog.Logger, request api.Externa
// For committed resource reservations: unlock resources only if:
// 1. Project ID matches
// 2. ResourceGroup matches the flavor's hw_version
reservation.Spec.CommittedResourceReservation.MatchesGroup(request.Spec.Data.ProjectID, request.Spec.Data.Flavor.Data.ExtraSpecs["hw_version"]):
reservation.Spec.CommittedResourceReservation.MatchesGroup(request.Spec.Data.ProjectID, request.Spec.Data.Flavor.Data.ExtraSpecs["quota:hw_version"]):
traceLog.Info("unlocking resources reserved by matching committed resource reservation with allocation",
"reservation", reservation.Name,
"instanceUUID", request.Spec.Data.InstanceUUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func newNovaRequestWithIntent(instanceUUID, projectID, flavorName, flavorGroup s

extraSpecs := map[string]string{
"capabilities:hypervisor_type": "qemu",
"hw_version": flavorGroup,
"quota:hw_version": flavorGroup,
}

var schedulerHints map[string]any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *FilterQuotaEnforcement) Run(traceLog *slog.Logger, request api.External
// field is in the trace log.
projectID := request.Spec.Data.ProjectID
az := request.Spec.Data.AvailabilityZone
hwVersion := request.Spec.Data.Flavor.Data.ExtraSpecs["hw_version"]
hwVersion := request.Spec.Data.Flavor.Data.ExtraSpecs["quota:hw_version"]

if projectID == "" {
traceLog.Warn("no project ID in request, skipping quota enforcement")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func makeQuotaEnforcementRequest(projectID, az, hwVersion string, memoryMB, numI
VCPUs: 4,
}
if hwVersion != "" {
flavor.ExtraSpecs = map[string]string{"hw_version": hwVersion}
flavor.ExtraSpecs = map[string]string{"quota:hw_version": hwVersion}
} else {
flavor.ExtraSpecs = map[string]string{}
}
Expand Down