@@ -41,6 +41,7 @@ import (
41
41
"github.com/openshift/origin/test/e2e/upgrade/adminack"
42
42
"github.com/openshift/origin/test/e2e/upgrade/dns"
43
43
"github.com/openshift/origin/test/e2e/upgrade/manifestdelete"
44
+ mc "github.com/openshift/origin/test/extended/machine_config"
44
45
"github.com/openshift/origin/test/extended/prometheus"
45
46
"github.com/openshift/origin/test/extended/util/disruption"
46
47
"github.com/openshift/origin/test/extended/util/operator"
@@ -625,6 +626,21 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
625
626
func () (error , bool ) {
626
627
framework .Logf ("Waiting on pools to be upgraded" )
627
628
if err := wait .PollImmediate (10 * time .Second , 30 * time .Minute , func () (bool , error ) {
629
+
630
+ nodes , err := kubeClient .CoreV1 ().Nodes ().List (context .Background (), metav1.ListOptions {})
631
+ if err != nil {
632
+ framework .Logf ("error getting nodes %v" , err )
633
+ return false , nil
634
+ }
635
+
636
+ allNodesReady := true
637
+ for _ , node := range nodes .Items {
638
+ if ! mc .IsNodeReady (node ) {
639
+ allNodesReady = false
640
+ break
641
+ }
642
+ }
643
+
628
644
mcps := dc .Resource (schema.GroupVersionResource {
629
645
Group : "machineconfiguration.openshift.io" ,
630
646
Version : "v1" ,
@@ -641,7 +657,7 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
641
657
allUpdated = allUpdated && updated
642
658
643
659
// Invariant: when CVO reaches level, MCO is required to have rolled out control plane updates
644
- if p .GetName () == "master" && requiresUpdate && errMasterUpdating == nil {
660
+ if p .GetName () == "master" && requiresUpdate && ! allNodesReady && errMasterUpdating == nil {
645
661
errMasterUpdating = fmt .Errorf ("the %q pool should be updated before the CVO reports available at the new version" , p .GetName ())
646
662
framework .Logf ("Invariant violation detected: %s" , errMasterUpdating )
647
663
}
0 commit comments