Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Allow downgrade of all daemons consistently #9098

Merged
merged 1 commit into from Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/operator/ceph/cluster/version.go
Expand Up @@ -109,7 +109,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 @@ -76,8 +76,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