Recheck version from Patroni IP. (#2533)
This commit is contained in:
parent
23f4fdb327
commit
ae95c2db6c
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue