mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 17:51:56 +02:00
just one debug line for syncing volumes
This commit is contained in:
@@ -672,15 +672,13 @@ func (c *Cluster) Update(oldSpec, newSpec *acidv1.Postgresql) error {
|
||||
// Volume
|
||||
if oldSpec.Spec.Size != newSpec.Spec.Size {
|
||||
c.logVolumeChanges(oldSpec.Spec.Volume, newSpec.Spec.Volume)
|
||||
|
||||
c.logger.Debugf("syncing volumes using %q resize mode", c.OpConfig.StorageResizeMode)
|
||||
if c.OpConfig.StorageResizeMode == "pvc" {
|
||||
c.logger.Debugf("syncing persistent volume claims using %q resize mode", c.OpConfig.StorageResizeMode)
|
||||
if err := c.syncVolumeClaims(); err != nil {
|
||||
c.logger.Errorf("could not sync persistent volume claims: %v", err)
|
||||
updateFailed = true
|
||||
}
|
||||
} else if c.OpConfig.StorageResizeMode == "ebs" {
|
||||
c.logger.Debugf("syncing persistent volumes using %q resize mode", c.OpConfig.StorageResizeMode)
|
||||
if err := c.syncVolumes(); err != nil {
|
||||
c.logger.Errorf("could not sync persistent volumes: %v", err)
|
||||
updateFailed = true
|
||||
|
||||
+1
-2
@@ -57,8 +57,8 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
|
||||
return err
|
||||
}
|
||||
|
||||
c.logger.Debugf("syncing volumes using %q resize mode", c.OpConfig.StorageResizeMode)
|
||||
if c.OpConfig.StorageResizeMode == "pvc" {
|
||||
c.logger.Debugf("syncing persistent volume claims using %q resize mode", c.OpConfig.StorageResizeMode)
|
||||
if err = c.syncVolumeClaims(); err != nil {
|
||||
err = fmt.Errorf("could not sync persistent volume claims: %v", err)
|
||||
return err
|
||||
@@ -70,7 +70,6 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
|
||||
// TODO: handle the case of the cluster that is downsized and enlarged again
|
||||
// (there will be a volume from the old pod for which we can't act before the
|
||||
// the statefulset modification is concluded)
|
||||
c.logger.Debugf("syncing persistent volumes using %q resize mode", c.OpConfig.StorageResizeMode)
|
||||
if err = c.syncVolumes(); err != nil {
|
||||
err = fmt.Errorf("could not sync persistent volumes: %v", err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user