Skip to content

Commit 772f0ca

Browse files
authored
Fix volume sync order. (zalando#1340)
1 parent c1c0d5f commit 772f0ca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/cluster/sync.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,18 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
5353
return err
5454
}
5555

56+
// sync volume may already transition volumes to gp3, if iops/throughput or type is specified
57+
if err = c.syncVolumes(); err != nil {
58+
return err
59+
}
60+
5661
if c.OpConfig.EnableEBSGp3Migration {
5762
err = c.executeEBSMigration()
5863
if nil != err {
5964
return err
6065
}
6166
}
6267

63-
if err = c.syncVolumes(); err != nil {
64-
return err
65-
}
66-
6768
if err = c.enforceMinResourceLimits(&c.Spec); err != nil {
6869
err = fmt.Errorf("could not enforce minimum resource limits: %v", err)
6970
return err

0 commit comments

Comments
 (0)