mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 06:38:55 +02:00
Recheck version from Patroni IP. (#2533)
This commit is contained in:
@@ -17,6 +17,7 @@ var VersionMap = map[string]int{
|
|||||||
"13": 130000,
|
"13": 130000,
|
||||||
"14": 140000,
|
"14": 140000,
|
||||||
"15": 150000,
|
"15": 150000,
|
||||||
|
"16": 160000,
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsBiggerPostgresVersion Compare two Postgres version numbers
|
// 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)
|
numberOfPods := len(pods)
|
||||||
if allRunning && masterPod != nil {
|
if allRunning && masterPod != nil {
|
||||||
c.logger.Infof("healthy cluster ready to upgrade, current: %d desired: %d", c.currentMajorVersion, desiredVersion)
|
c.logger.Infof("healthy cluster ready to upgrade, current: %d desired: %d", c.currentMajorVersion, desiredVersion)
|
||||||
|
|||||||
Reference in New Issue
Block a user