Merge pull request #129887 from rhrmo/STOR-2270-make-failedscheduling-event-more-intuitive

Change volume affinity scheduling error message to be more intuitive
This commit is contained in:
Kubernetes Prow Robot 2025-03-03 22:51:48 -08:00 committed by GitHub
commit 58704903c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ const (
// ErrReasonBindConflict is used for VolumeBindingNoMatch predicate error.
ErrReasonBindConflict ConflictReason = "node(s) didn't find available persistent volumes to bind"
// ErrReasonNodeConflict is used for VolumeNodeAffinityConflict predicate error.
ErrReasonNodeConflict ConflictReason = "node(s) had volume node affinity conflict"
ErrReasonNodeConflict ConflictReason = "node(s) didn't match PersistentVolume's node affinity"
// ErrReasonNotEnoughSpace is used when a pod cannot start on a node because not enough storage space is available.
ErrReasonNotEnoughSpace = "node(s) did not have enough free storage"
// ErrReasonPVNotExist is used when a pod has one or more PVC(s) bound to non-existent persistent volume(s)"

View File

@ -1132,7 +1132,7 @@ func TestSchedulerWithVolumeBinding(t *testing.T) {
FindReasons: volumebinding.ConflictReasons{volumebinding.ErrReasonNodeConflict},
},
eventReason: "FailedScheduling",
expectError: makePredicateError("1 node(s) had volume node affinity conflict"),
expectError: makePredicateError("1 node(s) didn't match PersistentVolume's node affinity"),
},
{
name: "unbound/no matches",
@ -1148,7 +1148,7 @@ func TestSchedulerWithVolumeBinding(t *testing.T) {
FindReasons: volumebinding.ConflictReasons{volumebinding.ErrReasonBindConflict, volumebinding.ErrReasonNodeConflict},
},
eventReason: "FailedScheduling",
expectError: makePredicateError("1 node(s) didn't find available persistent volumes to bind, 1 node(s) had volume node affinity conflict"),
expectError: makePredicateError("1 node(s) didn't find available persistent volumes to bind, 1 node(s) didn't match PersistentVolume's node affinity"),
},
{
name: "unbound/found matches/bind succeeds",