Fixing commands due to string[]
This commit is contained in:
parent
f4027ac3f0
commit
13c6c76e1b
|
|
@ -1,8 +1,6 @@
|
|||
package cluster
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/zalando/postgres-operator/pkg/spec"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
|
@ -80,8 +78,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 of %d pods", masterPod.Name, numberOfPods)
|
||||
command := fmt.Sprintf("/bin/su postgres -c \"/usr/bin/python3 /scripts/inplace_upgrade.py %d 2>&1 | tee last_upgrade.log\"", numberOfPods)
|
||||
_, err := c.ExecCommand(podName, command)
|
||||
_, err := c.ExecCommand(podName, "/bin/su", "postgres", "-c", "\"/usr/bin/python3 /scripts/inplace_upgrade.py %d 2>&1 | tee last_upgrade.log\"")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue