just one debug line for syncing volumes

This commit is contained in:
Felix Kunde 2020-11-06 17:22:52 +01:00
parent 84b306365f
commit fe12184f17
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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