Log result. (#1387)

This commit is contained in:
Jan Mussler
2021-02-26 14:54:26 +01:00
committed by GitHub
parent 636a9a8191
commit e837751ae0
+3 -1
View File
@@ -86,10 +86,12 @@ func (c *Cluster) majorVersionUpgrade() error {
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)
upgradeCommand := fmt.Sprintf("/usr/bin/python3 /scripts/inplace_upgrade.py %d 2>&1 | tee last_upgrade.log", numberOfPods)
_, err := c.ExecCommand(podName, "/bin/su", "postgres", "-c", upgradeCommand)
result, err := c.ExecCommand(podName, "/bin/su", "postgres", "-c", upgradeCommand)
if err != nil {
return err
}
c.logger.Infof("upgrade action triggered and command completed: %s", result[:50])
}
}