mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 02:41:26 +02:00
Switch user for migration.
This commit is contained in:
@@ -73,7 +73,7 @@ func (c *Cluster) majorVersionUpgrade() error {
|
||||
if c.currentMajorVersion < desiredVersion {
|
||||
podName := &spec.NamespacedName{Namespace: masterPod.Namespace, Name: masterPod.Name}
|
||||
c.logger.Infof("triggering major version upgrade on pod %s", masterPod.Name)
|
||||
_, err := c.ExecCommand(podName, fmt.Sprintf("python3 /scripts/inplace_upgrade.py %d | tee last_upgrade.log", numberOfPods))
|
||||
_, err := c.ExecCommand(podName, fmt.Sprintf("su postgres -c \"python3 /scripts/inplace_upgrade.py %d 2>&1 | tee last_upgrade.log\"", numberOfPods))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user