Skip to content

Commit

Permalink
Merge pull request #9101 from rook/mergify/bp/release-1.7/pr-9098
Browse files Browse the repository at this point in the history
core: Allow downgrade of all daemons consistently (backport #9098)
  • Loading branch information
mergify[bot] committed Nov 4, 2021
2 parents 648bb48 + eedf93d commit 7aa1f6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/operator/ceph/cluster/version.go
Expand Up @@ -105,7 +105,8 @@ func diffImageSpecAndClusterRunningVersion(imageSpecVersion cephver.CephVersion,
}

if cephver.IsInferior(imageSpecVersion, clusterRunningVersion) {
return true, errors.Errorf("image spec version %s is lower than the running cluster version %s, downgrading is not supported", imageSpecVersion.String(), clusterRunningVersion.String())
logger.Warningf("image spec version %s is lower than the running cluster version %s, downgrading is not supported", imageSpecVersion.String(), clusterRunningVersion.String())
return true, nil
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/operator/ceph/cluster/version_test.go
Expand Up @@ -74,8 +74,9 @@ func TestDiffImageSpecAndClusterRunningVersion(t *testing.T) {
err = json.Unmarshal([]byte(fakeRunningVersions), &dummyRunningVersions3)
assert.NoError(t, err)

// Allow the downgrade
m, err = diffImageSpecAndClusterRunningVersion(fakeImageVersion, dummyRunningVersions3)
assert.Error(t, err)
assert.NoError(t, err)
assert.True(t, m)

// 4 test - spec version is higher than running cluster --> we upgrade
Expand Down

0 comments on commit 7aa1f6a

Please sign in to comment.