Skip to content

Commit 6afb778

Browse files
Consider empty az in filter_correct_az
1 parent d5429a5 commit 6afb778

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/scheduler/nova/plugins/shared/filter_correct_az.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ func (s *FilterCorrectAZStep) GetName() string { return "filter_correct_az" }
2222
// Only get hosts in the requested az.
2323
func (s *FilterCorrectAZStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error) {
2424
result := s.PrepareResult(request)
25+
if request.Spec.Data.AvailabilityZone == "" {
26+
traceLog.Debug("no availability zone requested, skipping filter_correct_az step")
27+
return result, nil
28+
}
2529
var computeHostsInAZ []string
2630
if _, err := s.DB.SelectTimed("scheduler-nova", &computeHostsInAZ, `
2731
SELECT DISTINCT compute_host

0 commit comments

Comments
 (0)