mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #105196 from yibozhuang/improve-scheduler-pv-not-exist-err
Enhance ErrReasonPVNotExist in volumebinding scheduler plugin
This commit is contained in:
		@@ -69,8 +69,8 @@ const (
 | 
				
			|||||||
	ErrReasonNodeConflict ConflictReason = "node(s) had volume node affinity conflict"
 | 
						ErrReasonNodeConflict ConflictReason = "node(s) had volume node affinity conflict"
 | 
				
			||||||
	// ErrReasonNotEnoughSpace is used when a pod cannot start on a node because not enough storage space is available.
 | 
						// 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"
 | 
						ErrReasonNotEnoughSpace = "node(s) did not have enough free storage"
 | 
				
			||||||
	// ErrReasonPVNotExist is used when a PVC can't find the bound persistent volumes"
 | 
						// ErrReasonPVNotExist is used when a pod has one or more PVC(s) bound to non-existent persistent volume(s)"
 | 
				
			||||||
	ErrReasonPVNotExist = "pvc(s) bound to non-existent pv(s)"
 | 
						ErrReasonPVNotExist = "node(s) unavailable due to one or more pvc(s) bound to non-existent pv(s)"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// BindingInfo holds a binding between PV and PVC.
 | 
					// BindingInfo holds a binding between PV and PVC.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -260,7 +260,7 @@ func TestVolumeBinding(t *testing.T) {
 | 
				
			|||||||
				podVolumesByNode: map[string]*PodVolumes{},
 | 
									podVolumesByNode: map[string]*PodVolumes{},
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			wantFilterStatus: []*framework.Status{
 | 
								wantFilterStatus: []*framework.Status{
 | 
				
			||||||
				framework.NewStatus(framework.UnschedulableAndUnresolvable, `pvc(s) bound to non-existent pv(s)`),
 | 
									framework.NewStatus(framework.UnschedulableAndUnresolvable, `node(s) unavailable due to one or more pvc(s) bound to non-existent pv(s)`),
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			wantScores: []int64{
 | 
								wantScores: []int64{
 | 
				
			||||||
				0,
 | 
									0,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user