@@ -41,6 +41,7 @@ import (
4141 "github.com/openshift/origin/test/e2e/upgrade/adminack"
4242 "github.com/openshift/origin/test/e2e/upgrade/dns"
4343 "github.com/openshift/origin/test/e2e/upgrade/manifestdelete"
44+ mc "github.com/openshift/origin/test/extended/machine_config"
4445 "github.com/openshift/origin/test/extended/prometheus"
4546 "github.com/openshift/origin/test/extended/util/disruption"
4647 "github.com/openshift/origin/test/extended/util/operator"
@@ -625,6 +626,21 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
625626 func () (error , bool ) {
626627 framework .Logf ("Waiting on pools to be upgraded" )
627628 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+
628644 mcps := dc .Resource (schema.GroupVersionResource {
629645 Group : "machineconfiguration.openshift.io" ,
630646 Version : "v1" ,
@@ -641,7 +657,7 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
641657 allUpdated = allUpdated && updated
642658
643659 // 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 {
645661 errMasterUpdating = fmt .Errorf ("the %q pool should be updated before the CVO reports available at the new version" , p .GetName ())
646662 framework .Logf ("Invariant violation detected: %s" , errMasterUpdating )
647663 }
0 commit comments