Cleanup redundant failure reason in InterPodAffinity plugin
Both `ErrReasonAffinityRulesNotMatch` and `ErrReasonAntiAffinityRulesNotMatch` are more precise than `ErrReasonAffinityNotMatch`. Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
@@ -1344,27 +1344,19 @@ func TestNodesWherePreemptionMightHelp(t *testing.T) {
|
|||||||
expected: sets.NewString(),
|
expected: sets.NewString(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ErrReasonAffinityNotMatch should be tried as it indicates that the pod is unschedulable due to inter-pod affinity or anti-affinity",
|
name: "ErrReasonAntiAffinityRulesNotMatch should be tried as it indicates that the pod is unschedulable due to inter-pod anti-affinity",
|
||||||
nodesStatuses: framework.NodeToStatusMap{
|
nodesStatuses: framework.NodeToStatusMap{
|
||||||
"node1": framework.NewStatus(framework.Unschedulable, interpodaffinity.ErrReasonAffinityNotMatch),
|
"node1": framework.NewStatus(framework.Unschedulable, interpodaffinity.ErrReasonAntiAffinityRulesNotMatch),
|
||||||
"node2": framework.NewStatus(framework.UnschedulableAndUnresolvable, nodename.ErrReason),
|
"node2": framework.NewStatus(framework.UnschedulableAndUnresolvable, nodename.ErrReason),
|
||||||
"node3": framework.NewStatus(framework.UnschedulableAndUnresolvable, nodeunschedulable.ErrReasonUnschedulable),
|
"node3": framework.NewStatus(framework.UnschedulableAndUnresolvable, nodeunschedulable.ErrReasonUnschedulable),
|
||||||
},
|
},
|
||||||
expected: sets.NewString("node1", "node4"),
|
expected: sets.NewString("node1", "node4"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "pod with both pod affinity and anti-affinity should be tried",
|
name: "ErrReasonAffinityRulesNotMatch should not be tried as it indicates that the pod is unschedulable due to inter-pod affinity, but ErrReasonAntiAffinityRulesNotMatch should be tried as it indicates that the pod is unschedulable due to inter-pod anti-affinity",
|
||||||
nodesStatuses: framework.NodeToStatusMap{
|
|
||||||
"node1": framework.NewStatus(framework.Unschedulable, interpodaffinity.ErrReasonAffinityNotMatch),
|
|
||||||
"node2": framework.NewStatus(framework.UnschedulableAndUnresolvable, nodename.ErrReason),
|
|
||||||
},
|
|
||||||
expected: sets.NewString("node1", "node3", "node4"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "ErrReasonAffinityRulesNotMatch should not be tried as it indicates that the pod is unschedulable due to inter-pod affinity, but ErrReasonAffinityNotMatch should be tried as it indicates that the pod is unschedulable due to inter-pod affinity or anti-affinity",
|
|
||||||
nodesStatuses: framework.NodeToStatusMap{
|
nodesStatuses: framework.NodeToStatusMap{
|
||||||
"node1": framework.NewStatus(framework.UnschedulableAndUnresolvable, interpodaffinity.ErrReasonAffinityRulesNotMatch),
|
"node1": framework.NewStatus(framework.UnschedulableAndUnresolvable, interpodaffinity.ErrReasonAffinityRulesNotMatch),
|
||||||
"node2": framework.NewStatus(framework.Unschedulable, interpodaffinity.ErrReasonAffinityNotMatch),
|
"node2": framework.NewStatus(framework.Unschedulable, interpodaffinity.ErrReasonAntiAffinityRulesNotMatch),
|
||||||
},
|
},
|
||||||
expected: sets.NewString("node2", "node3", "node4"),
|
expected: sets.NewString("node2", "node3", "node4"),
|
||||||
},
|
},
|
||||||
|
@@ -21,7 +21,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
"k8s.io/kubernetes/pkg/scheduler/framework"
|
"k8s.io/kubernetes/pkg/scheduler/framework"
|
||||||
@@ -34,8 +34,6 @@ const (
|
|||||||
|
|
||||||
// ErrReasonExistingAntiAffinityRulesNotMatch is used for ExistingPodsAntiAffinityRulesNotMatch predicate error.
|
// ErrReasonExistingAntiAffinityRulesNotMatch is used for ExistingPodsAntiAffinityRulesNotMatch predicate error.
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch = "node(s) didn't satisfy existing pods anti-affinity rules"
|
ErrReasonExistingAntiAffinityRulesNotMatch = "node(s) didn't satisfy existing pods anti-affinity rules"
|
||||||
// ErrReasonAffinityNotMatch is used for MatchInterPodAffinity predicate error.
|
|
||||||
ErrReasonAffinityNotMatch = "node(s) didn't match pod affinity/anti-affinity rules"
|
|
||||||
// ErrReasonAffinityRulesNotMatch is used for PodAffinityRulesNotMatch predicate error.
|
// ErrReasonAffinityRulesNotMatch is used for PodAffinityRulesNotMatch predicate error.
|
||||||
ErrReasonAffinityRulesNotMatch = "node(s) didn't match pod affinity rules"
|
ErrReasonAffinityRulesNotMatch = "node(s) didn't match pod affinity rules"
|
||||||
// ErrReasonAntiAffinityRulesNotMatch is used for PodAntiAffinityRulesNotMatch predicate error.
|
// ErrReasonAntiAffinityRulesNotMatch is used for PodAntiAffinityRulesNotMatch predicate error.
|
||||||
@@ -384,15 +382,15 @@ func (pl *InterPodAffinity) Filter(ctx context.Context, cycleState *framework.Cy
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !satisfyPodAffinity(state, nodeInfo) {
|
if !satisfyPodAffinity(state, nodeInfo) {
|
||||||
return framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonAffinityNotMatch, ErrReasonAffinityRulesNotMatch)
|
return framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonAffinityRulesNotMatch)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !satisfyPodAntiAffinity(state, nodeInfo) {
|
if !satisfyPodAntiAffinity(state, nodeInfo) {
|
||||||
return framework.NewStatus(framework.Unschedulable, ErrReasonAffinityNotMatch, ErrReasonAntiAffinityRulesNotMatch)
|
return framework.NewStatus(framework.Unschedulable, ErrReasonAntiAffinityRulesNotMatch)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !satisfyExistingPodsAntiAffinity(state, nodeInfo) {
|
if !satisfyExistingPodsAntiAffinity(state, nodeInfo) {
|
||||||
return framework.NewStatus(framework.Unschedulable, ErrReasonAffinityNotMatch, ErrReasonExistingAntiAffinityRulesNotMatch)
|
return framework.NewStatus(framework.Unschedulable, ErrReasonExistingAntiAffinityRulesNotMatch)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@@ -23,7 +23,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/kubernetes/pkg/scheduler/apis/config"
|
"k8s.io/kubernetes/pkg/scheduler/apis/config"
|
||||||
@@ -140,7 +140,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -164,7 +163,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -243,7 +241,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -366,7 +363,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -421,7 +417,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -446,7 +441,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -477,7 +471,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -553,7 +546,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -603,7 +595,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -653,7 +644,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -714,7 +704,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -775,7 +764,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -912,7 +900,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -946,7 +933,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -972,7 +958,6 @@ func TestRequiredAffinitySingleNode(t *testing.T) {
|
|||||||
node: &node1,
|
node: &node1,
|
||||||
wantStatus: framework.NewStatus(
|
wantStatus: framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1085,7 +1070,6 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
nil,
|
nil,
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1164,12 +1148,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1201,12 +1183,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1250,12 +1230,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1288,12 +1266,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
nil,
|
nil,
|
||||||
@@ -1348,12 +1324,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
nil,
|
nil,
|
||||||
@@ -1458,12 +1432,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1516,12 +1488,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1565,7 +1535,6 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
nil,
|
nil,
|
||||||
@@ -1616,7 +1585,6 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
nil,
|
nil,
|
||||||
@@ -1661,12 +1629,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1713,12 +1679,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAntiAffinityRulesNotMatch,
|
ErrReasonAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -1788,12 +1752,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.Unschedulable,
|
framework.Unschedulable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonExistingAntiAffinityRulesNotMatch,
|
ErrReasonExistingAntiAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
nil,
|
nil,
|
||||||
@@ -1888,12 +1850,10 @@ func TestRequiredAffinityMultipleNodes(t *testing.T) {
|
|||||||
wantStatuses: []*framework.Status{
|
wantStatuses: []*framework.Status{
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
framework.NewStatus(
|
framework.NewStatus(
|
||||||
framework.UnschedulableAndUnresolvable,
|
framework.UnschedulableAndUnresolvable,
|
||||||
ErrReasonAffinityNotMatch,
|
|
||||||
ErrReasonAffinityRulesNotMatch,
|
ErrReasonAffinityRulesNotMatch,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user