@@ -36,6 +36,8 @@ import (
3636 "sigs.k8s.io/controller-runtime/pkg/client"
3737 "sigs.k8s.io/yaml"
3838
39+ machineconfigv1 "github.com/openshift/api/machineconfiguration/v1"
40+
3941 "github.com/k8stopologyawareschedwg/deployer/pkg/deployer"
4042 nrtv1alpha2 "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/apis/topology/v1alpha2"
4143
@@ -102,6 +104,7 @@ func SetupWithOptions(name string, nrtList nrtv1alpha2.NodeResourceTopologyList,
102104 randomizeName := (options & OptionRandomizeName ) == OptionRandomizeName
103105 avoidCooldown := (options & OptionAvoidCooldown ) == OptionAvoidCooldown
104106 staticClusterData := (options & OptionStaticClusterData ) == OptionStaticClusterData
107+
105108 ginkgo .By ("set up the test namespace" )
106109 ns , err := setupNamespace (e2eclient .Client , name , randomizeName )
107110 if err != nil {
@@ -133,6 +136,44 @@ func SetupWithOptions(name string, nrtList nrtv1alpha2.NodeResourceTopologyList,
133136 }
134137 klog .Infof ("set up the fixture reference NRT List: %s" , intnrt .ListToString (nrtList .Items , " fixture initial" ))
135138
139+ ginkgo .By ("warn about not updated MCPs" )
140+ var mcps machineconfigv1.MachineConfigPoolList
141+ err = wait .PollUntilContextTimeout (ctx , 10 * time .Second , 30 * time .Second , true , func (ctx context.Context ) (bool , error ) {
142+ err := e2eclient .Client .List (ctx , & mcps )
143+ return err == nil , nil
144+ })
145+ if err != nil {
146+ klog .Errorf ("failed to pull MCP items: %v" , err )
147+ } else {
148+ for _ , mcp := range mcps .Items {
149+ conditions := mcp .Status .Conditions
150+ klog .InfoS ("MCP status" , "name" , mcp .Name , "conditions" , conditions )
151+ for _ , condition := range conditions {
152+ if condition .Type == machineconfigv1 .MachineConfigPoolUpdated {
153+ if condition .Status != corev1 .ConditionTrue {
154+ klog .Warningf ("MCP %q is not updated" , mcp .Name )
155+ break
156+ }
157+ }
158+ }
159+ }
160+ }
161+ ginkgo .By ("warn about unschedulable nodes" )
162+ var nodes corev1.NodeList
163+ err = wait .PollUntilContextTimeout (ctx , 10 * time .Second , 30 * time .Second , true , func (ctx context.Context ) (bool , error ) {
164+ err := e2eclient .Client .List (ctx , & nodes )
165+ return err == nil , nil
166+ })
167+ if err != nil {
168+ klog .Errorf ("failed to pull cluster nodes: %v" , err )
169+ } else {
170+ for _ , node := range nodes .Items {
171+ if node .Spec .Unschedulable {
172+ klog .Warningf ("Node %q is unschedulable" , node .Name )
173+ }
174+ }
175+ }
176+
136177 return & Fixture {
137178 Client : e2eclient .Client ,
138179 K8sClient : e2eclient .K8sClient ,
0 commit comments