mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-07 17:39:34 +02:00
Avoid re-creating master pod if it is empty during sync. (#58)
Fixes #59
This commit is contained in:
+7
-7
@@ -140,14 +140,14 @@ func (c *Cluster) recreatePods() error {
|
||||
}
|
||||
if masterPod.Name == "" {
|
||||
c.logger.Warningln("No master pod in the cluster")
|
||||
}
|
||||
} else {
|
||||
//TODO: do manual failover
|
||||
//TODO: specify master, leave new master empty
|
||||
c.logger.Infof("Recreating master pod '%s'", util.NameFromMeta(masterPod.ObjectMeta))
|
||||
|
||||
//TODO: do manual failover
|
||||
//TODO: specify master, leave new master empty
|
||||
c.logger.Infof("Recreating master pod '%s'", util.NameFromMeta(masterPod.ObjectMeta))
|
||||
|
||||
if err := c.recreatePod(masterPod); err != nil {
|
||||
return fmt.Errorf("could not recreate master pod '%s': %v", util.NameFromMeta(masterPod.ObjectMeta), err)
|
||||
if err := c.recreatePod(masterPod); err != nil {
|
||||
return fmt.Errorf("could not recreate master pod '%s': %v", util.NameFromMeta(masterPod.ObjectMeta), err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user