enhance e2e test and improve log messages in sync

This commit is contained in:
Felix Kunde
2021-07-16 14:54:04 +02:00
parent ebc1d6ad9f
commit ce522ffeeb
2 changed files with 14 additions and 7 deletions
+3 -3
View File
@@ -273,7 +273,7 @@ func (c *Cluster) syncStatefulSet() error {
pods, err := c.listPods()
if err != nil {
c.logger.Infof("could not list pods of the statefulset: %v", err)
c.logger.Warnf("could not list pods of the statefulset: %v", err)
}
// NB: Be careful to consider the codepath that acts on podsRollingUpdateRequired before returning early.
@@ -388,7 +388,7 @@ func (c *Cluster) syncStatefulSet() error {
// since those parameters require PostgreSQL restart.
pods, err = c.listPods()
if err != nil {
c.logger.Infof("could not list pods of the statefulset: %v", err)
c.logger.Warnf("could not get list of pods to apply special PostgreSQL parameters only to be set via Patroni API: %v", err)
}
for i, pod := range pods {
@@ -407,7 +407,7 @@ func (c *Cluster) syncStatefulSet() error {
instanceRestartRequired, err = c.checkAndSetGlobalPostgreSQLConfiguration(&pod, config)
if err != nil {
return fmt.Errorf("could not set cluster-wide PostgreSQL configuration options: %v", err)
return fmt.Errorf("could not set PostgreSQL configuration options for pod %s: %v", podName, err)
}
if instanceRestartRequired {