mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-19 01:54:29 +02:00
make sure upgrade script runs on the master
This commit is contained in:
@@ -83,7 +83,7 @@ func (c *Cluster) majorVersionUpgrade() error {
|
||||
|
||||
var masterPod *v1.Pod
|
||||
|
||||
for _, pod := range pods {
|
||||
for i, pod := range pods {
|
||||
ps, _ := c.patroni.GetMemberData(&pod)
|
||||
|
||||
if ps.State != "running" {
|
||||
@@ -92,7 +92,7 @@ func (c *Cluster) majorVersionUpgrade() error {
|
||||
}
|
||||
|
||||
if ps.Role == "master" {
|
||||
masterPod = &pod
|
||||
masterPod = &pods[i]
|
||||
c.currentMajorVersion = ps.ServerVersion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user