diff --git a/e2e/tests/test_e2e.py b/e2e/tests/test_e2e.py index 99006819c..6a4bf78ca 100644 --- a/e2e/tests/test_e2e.py +++ b/e2e/tests/test_e2e.py @@ -852,7 +852,7 @@ class EndToEndTestCase(unittest.TestCase): try: k8s.create_with_kubectl("manifests/complete-postgres-manifest.yaml") k8s.wait_for_pod_start("spilo-role=master", self.test_namespace) - k8s.wait_for_pod_start('spilo-role=replica', self.test_namespace) + k8s.wait_for_pod_start("spilo-role=replica", self.test_namespace) self.assert_master_is_unique(self.test_namespace, "acid-test-cluster") except timeout_decorator.TimeoutError: @@ -1501,7 +1501,6 @@ class EndToEndTestCase(unittest.TestCase): } k8s.update_config(patch_delete_annotations) - def get_failover_targets(self, master_node, replica_nodes): ''' If all pods live on the same node, failover will happen to other worker(s) diff --git a/pkg/cluster/sync.go b/pkg/cluster/sync.go index 5e31929ae..a464089f8 100644 --- a/pkg/cluster/sync.go +++ b/pkg/cluster/sync.go @@ -394,11 +394,11 @@ func (c *Cluster) syncStatefulSet() error { masterPod = &pods[i] continue } - c.restartInstance(&pod) + c.syncPostgreSQLConfiguration(&pod) } if masterPod != nil { - c.restartInstance(masterPod) + c.syncPostgreSQLConfiguration(masterPod) } // if we get here we also need to re-create the pods (either leftovers from the old @@ -414,7 +414,7 @@ func (c *Cluster) syncStatefulSet() error { return nil } -func (c *Cluster) restartInstance(pod *v1.Pod) { +func (c *Cluster) syncPostgreSQLConfiguration(pod *v1.Pod) { podName := util.NameFromMeta(pod.ObjectMeta) role := PostgresRole(pod.Labels[c.OpConfig.PodRoleLabel])