Log result.

This commit is contained in:
Jan Mußler 2021-02-26 14:50:38 +01:00
parent 636a9a8191
commit 08c8fc2dae
1 changed files with 3 additions and 1 deletions

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])
}
}