postgres-operator/pkg/cluster
Oleksii Kliukin e90a01050c
Switchover must wait for the inner goroutine before it returns. (#343)
* Switchover must wait for the inner goroutine before it returns.

Otherwise, two corner cases may happen:

 - waitForPodLabel writes to the podLabelErr channel that has been
   already closed by the outer routine

 - the outer routine exists and the caller subscribes to the pod
   the inner goroutine has already subscribed to, resulting in panic.

 The previous commit fe47f9ebea
 that touched that code added the cancellation channel, but didn't bother
 to actually wait for the goroutine to be cancelled.

 Per report and review from @valer-cara.
 Original issue: https://github.com/zalando-incubator/postgres-operator/issues/342
2018-07-16 11:50:35 +02:00
..
cluster.go Switchover must wait for the inner goroutine before it returns. (#343) 2018-07-16 11:50:35 +02:00
cluster_test.go Improve the pod moving behavior during the Kubernetes cluster upgrade. (#281) 2018-05-03 10:20:24 +02:00
exec.go Fix exec into pods to resize volumes for multi-container pods. 2018-06-04 14:51:39 +02:00
filesystems.go Make use of kubernetes client-go v4 2017-07-25 15:25:17 +02:00
k8sres.go Use the StorageClassName field of the volumeClaimTemplate. (#338) 2018-07-16 11:49:58 +02:00
k8sres_test.go Deprecate old LB options, fix endpoint sync. (#287) 2018-05-15 15:19:18 +02:00
pg.go Some improvements for golint, ineffassign and misspell 2018-02-19 17:46:31 +01:00
pod.go Use Patroni API to set bootstrap-only options. (#299) 2018-05-29 12:35:25 +02:00
resources.go Use Patroni API to set bootstrap-only options. (#299) 2018-05-29 12:35:25 +02:00
sync.go Make AWS region configurable in the operator cofig map (#333) 2018-06-27 17:29:02 +02:00
types.go add comments on roles 2017-09-11 17:44:32 +02:00
util.go Minor import fix 2018-05-15 16:53:12 +02:00
volumes.go Be lenient when asked to shrink a persisten volume. 2018-05-24 11:17:42 +02:00