Skip to content

Commit

Permalink
Merge pull request #231 from dougsland/release-4.13
Browse files Browse the repository at this point in the history
OCPBUGS-11138: fix isUpgradeStillRunning()
  • Loading branch information
openshift-merge-robot committed Apr 1, 2023
2 parents 5847e89 + b90fab1 commit 52a2de9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkg/config/node.go
Expand Up @@ -271,7 +271,7 @@ func IsTheSameConfig(nodes []v1.Node) bool {
// - kubeconfigPath as string
//
// Returns:
// - true (same config), false or error
// - true (different config - upgrade still running), false (upgrade complete) or error
func IsUpgradeStillRunning(kubeconfigPath string) (bool, error) {
nodes, err := GetNodes(kubeconfigPath)
if err != nil {
Expand All @@ -281,15 +281,13 @@ func IsUpgradeStillRunning(kubeconfigPath string) (bool, error) {
// Go to all node types identified in GetNodes()
for nodeRole := range nodes {
nodesConfigs := IsTheSameConfig(nodes[nodeRole])
if err != nil {
return false, err
}

if nodesConfigs {
return false, nil
if !nodesConfigs {
// at least one node group config is different
return true, nil
}
}
return true, nil
return false, nil
}

func GetIngressConfig(kubeconfigPath string, vips []string) (IngressConfig, error) {
Expand Down

0 comments on commit 52a2de9

Please sign in to comment.