More logging along the major upgrade.

This commit is contained in:
Jan Mußler 2021-02-23 14:08:52 +01:00
parent 510985ffd8
commit 1d657f4295
1 changed files with 4 additions and 1 deletions

View File

@ -68,8 +68,11 @@ func (c *Cluster) majorVersionUpgrade() error {
numberOfPods := len(pods) numberOfPods := len(pods)
if allRunning && masterPod != nil { if allRunning && masterPod != nil {
if c.currentMajorVersion < c.GetDesiredMajorVersionAsInt() { desiredVersion := c.GetDesiredMajorVersionAsInt()
c.logger.Infof("Cluster healthy with version: %d desired: %d", c.currentMajorVersion, desiredVersion)
if c.currentMajorVersion < desiredVersion {
podName := &spec.NamespacedName{Namespace: masterPod.Namespace, Name: masterPod.Name} podName := &spec.NamespacedName{Namespace: masterPod.Namespace, Name: masterPod.Name}
c.logger.Infof("Triggering major version upgrade on pod %s", masterPod.Name)
c.ExecCommand(podName, fmt.Sprintf("python3 /scripts/inplace_upgrade.py %d", numberOfPods)) c.ExecCommand(podName, fmt.Sprintf("python3 /scripts/inplace_upgrade.py %d", numberOfPods))
} }
} }