Recheck version from Patroni IP. (#2533)

This commit is contained in:
Jan Mussler
2024-02-29 12:12:02 +01:00
committed by GitHub
parent 23f4fdb327
commit ae95c2db6c
+7
View File
@@ -17,6 +17,7 @@ var VersionMap = map[string]int{
"13": 130000,
"14": 140000,
"15": 150000,
"16": 160000,
}
// IsBiggerPostgresVersion Compare two Postgres version numbers
@@ -97,6 +98,12 @@ func (c *Cluster) majorVersionUpgrade() error {
}
}
// Recheck version with newest data from Patroni
if c.currentMajorVersion >= desiredVersion {
c.logger.Infof("recheck cluster version is already up to date. current: %d, min desired: %d", c.currentMajorVersion, desiredVersion)
return nil
}
numberOfPods := len(pods)
if allRunning && masterPod != nil {
c.logger.Infof("healthy cluster ready to upgrade, current: %d desired: %d", c.currentMajorVersion, desiredVersion)