Align Extender's validation with prioritizers.

This commit is contained in:
Klaus Ma 2017-04-28 17:55:25 +08:00
parent 19795ea7c3
commit 64a7bdf641

View File

@ -35,8 +35,8 @@ func ValidatePolicy(policy schedulerapi.Policy) error {
} }
for _, extender := range policy.ExtenderConfigs { for _, extender := range policy.ExtenderConfigs {
if extender.Weight < 0 { if extender.Weight <= 0 {
validationErrors = append(validationErrors, fmt.Errorf("Priority for extender %s should have a non negative weight applied to it", extender.URLPrefix)) validationErrors = append(validationErrors, fmt.Errorf("Priority for extender %s should have a positive weight applied to it", extender.URLPrefix))
} }
} }
return utilerrors.NewAggregate(validationErrors) return utilerrors.NewAggregate(validationErrors)