Merge pull request #13207 from travisn/remove-pacific
core: Remove support for ceph pacific
This commit is contained in:
50 files changed
+119
-421
No files matched your search
@@ -108,41 +108,6 @@ jobs:
|
||||
name: canary-arm64
|
||||
path: test
|
||||
|
||||
smoke-suite-pacific-devel:
|
||||
if: github.repository == 'rook/rook'
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup cluster resources
|
||||
uses: ./.github/workflows/integration-test-config-latest-k8s
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
kubernetes-version: "1.28.0"
|
||||
|
||||
- name: TestCephSmokeSuite
|
||||
run: |
|
||||
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
|
||||
SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="pacific-devel" go test -v -timeout 1800s -run TestCephSmokeSuite github.com/rook/rook/tests/integration
|
||||
|
||||
- name: collect common logs
|
||||
if: always()
|
||||
run: |
|
||||
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
|
||||
export CLUSTER_NAMESPACE="smoke-ns"
|
||||
export OPERATOR_NAMESPACE="smoke-ns-system"
|
||||
tests/scripts/collect-logs.sh
|
||||
|
||||
- name: Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: ceph-smoke-suite-pacific-artifact
|
||||
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
|
||||
|
||||
smoke-suite-quincy-devel:
|
||||
if: github.repository == 'rook/rook'
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -213,7 +178,6 @@ jobs:
|
||||
name: ceph-smoke-suite-reef-artifact
|
||||
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
|
||||
|
||||
|
||||
smoke-suite-ceph-main:
|
||||
if: github.repository == 'rook/rook'
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -249,7 +213,7 @@ jobs:
|
||||
name: ceph-smoke-suite-master-artifact
|
||||
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
|
||||
|
||||
object-suite-pacific-devel:
|
||||
object-suite-quincy-devel:
|
||||
if: github.repository == 'rook/rook'
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
@@ -267,7 +231,7 @@ jobs:
|
||||
- name: TestCephObjectSuite
|
||||
run: |
|
||||
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
|
||||
SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="pacific-devel" go test -v -timeout 1800s -failfast -run TestCephObjectSuite github.com/rook/rook/tests/integration
|
||||
SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="quincy-devel" go test -v -timeout 1800s -failfast -run TestCephObjectSuite github.com/rook/rook/tests/integration
|
||||
|
||||
- name: collect common logs
|
||||
if: always()
|
||||
@@ -281,7 +245,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: ceph-object-suite-pacific-artifact
|
||||
name: ceph-object-suite-quincy-artifact
|
||||
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
|
||||
|
||||
object-suite-ceph-main:
|
||||
@@ -319,7 +283,7 @@ jobs:
|
||||
name: ceph-object-suite-master-artifact
|
||||
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
|
||||
|
||||
upgrade-from-pacific-stable-to-pacific-devel:
|
||||
upgrade-from-reef-stable-to-reef-devel:
|
||||
if: github.repository == 'rook/rook'
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
@@ -337,7 +301,7 @@ jobs:
|
||||
- name: TestCephUpgradeSuite
|
||||
run: |
|
||||
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
|
||||
go test -v -timeout 1800s -failfast -run TestCephUpgradeSuite/TestUpgradeCephToPacificDevel github.com/rook/rook/tests/integration
|
||||
go test -v -timeout 1800s -failfast -run TestCephUpgradeSuite/TestUpgradeCephToReefDevel github.com/rook/rook/tests/integration
|
||||
|
||||
- name: collect common logs
|
||||
if: always()
|
||||
@@ -351,7 +315,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: ceph-upgrade-suite-pacific-artifact
|
||||
name: ceph-upgrade-suite-reef-artifact
|
||||
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
|
||||
|
||||
upgrade-from-quincy-stable-to-quincy-devel:
|
||||
@@ -395,7 +359,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
ceph-image-tag:
|
||||
["latest-main-devel", "latest-quincy-devel", "latest-pacific-devel"]
|
||||
["latest-main-devel", "latest-quincy-devel", "latest-reef-devel"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -26,12 +26,12 @@ Settings can be specified at the global level to apply to the cluster as a whole
|
||||
* `external`:
|
||||
* `enable`: if `true`, the cluster will not be managed by Rook but via an external entity. This mode is intended to connect to an existing cluster. In this case, Rook will only consume the external cluster. However, Rook will be able to deploy various daemons in Kubernetes such as object gateways, mds and nfs if an image is provided and will refuse otherwise. If this setting is enabled **all** the other options will be ignored except `cephVersion.image` and `dataDirHostPath`. See [external cluster configuration](external-cluster.md). If `cephVersion.image` is left blank, Rook will refuse the creation of extra CRs like object, file and nfs.
|
||||
* `cephVersion`: The version information for launching the ceph daemons.
|
||||
* `image`: The image used for running the ceph daemons. For example, `quay.io/ceph/ceph:v16.2.11` or `v17.2.6`. For more details read the [container images section](#ceph-container-images).
|
||||
* `image`: The image used for running the ceph daemons. For example, `quay.io/ceph/ceph:v17.2.6`. For more details read the [container images section](#ceph-container-images).
|
||||
For the latest ceph images, see the [Ceph DockerHub](https://hub.docker.com/r/ceph/ceph/tags/).
|
||||
To ensure a consistent version of the image is running across all nodes in the cluster, it is recommended to use a very specific image version.
|
||||
Tags also exist that would give the latest version, but they are only recommended for test environments. For example, the tag `v17` will be updated each time a new Quincy build is released.
|
||||
Using the `v17` tag is not recommended in production because it may lead to inconsistent versions of the image running across different nodes in the cluster.
|
||||
* `allowUnsupported`: If `true`, allow an unsupported major version of the Ceph release. Currently `pacific`, `quincy`, and `reef` are supported. Future versions such as `squid` (v19) would require this to be set to `true`. Should be set to `false` in production.
|
||||
* `allowUnsupported`: If `true`, allow an unsupported major version of the Ceph release. Currently `quincy` and `reef` are supported. Future versions such as `squid` (v19) would require this to be set to `true`. Should be set to `false` in production.
|
||||
`imagePullPolicy`: The image pull policy for the ceph daemon pods. Possible values are `Always`, `IfNotPresent`, and `Never`.
|
||||
The default is `IfNotPresent`.
|
||||
* `dataDirHostPath`: The path on the host ([hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath)) where config and data should be stored for each of the services. If the directory does not exist, it will be created. Because this directory persists on the host, it will remain after pods are deleted. Following paths and any of their subpaths **must not be used**: `/etc/ceph`, `/rook` or `/var/log/ceph`.
|
||||
@@ -368,8 +368,8 @@ repository. At the time of writing it's unclear when this will be supported.
|
||||
|
||||
#### IPFamily
|
||||
|
||||
Provide single-stack IPv4 or IPv6 protocol to assign corresponding addresses to pods and services. This field is optional. Possible inputs are IPv6 and IPv4. Empty value will be treated as IPv4. Kubernetes version should be at least v1.13 to run IPv6. Dual-stack is supported as of ceph Pacific.
|
||||
To turn on dual stack see the [network configuration section](#network-configuration-settings).
|
||||
Provide single-stack IPv4 or IPv6 protocol to assign corresponding addresses to pods and services. This field is optional. Possible inputs are IPv6 and IPv4. Empty value will be treated as IPv4.
|
||||
To enable dual stack see the [network configuration section](#network-configuration-settings).
|
||||
|
||||
### Node Settings
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ spec:
|
||||
- name: b
|
||||
- name: c
|
||||
cephVersion:
|
||||
# Stretch cluster is supported in Ceph Pacific or newer.
|
||||
image: quay.io/ceph/ceph:v17.2.6
|
||||
allowUnsupported: true
|
||||
# Either storageClassDeviceSets or the storage section can be specified for creating OSDs.
|
||||
|
||||
@@ -6135,8 +6135,7 @@ string
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>The Ceph pool used store the shared configuration for NFS-Ganesha daemons.
|
||||
This setting is required for Ceph v15 and ignored for Ceph v16.
|
||||
As of Ceph Pacific 16.2.7+, this is internally hardcoded to “.nfs”.</p>
|
||||
This setting is deprecated, as it is internally required to be “.nfs”.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -6149,8 +6148,7 @@ string
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>The namespace inside the Ceph pool (set by ‘pool’) where shared NFS-Ganesha config is stored.
|
||||
This setting is required for Ceph v15 and ignored for Ceph v16.
|
||||
As of Ceph Pacific v16+, this is internally set to the name of the CephNFS.</p>
|
||||
This setting is deprecated as it is internally set to the name of the CephNFS.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -10,10 +10,6 @@ This example runs a shared filesystem for the [kube-registry](https://github.com
|
||||
|
||||
This guide assumes you have created a Rook cluster as explained in the main [quickstart guide](../../Getting-Started/quickstart.md)
|
||||
|
||||
### Multiple Filesystems Support
|
||||
|
||||
Multiple filesystems are supported as of the Ceph Pacific release.
|
||||
|
||||
## Create the Filesystem
|
||||
|
||||
Create the filesystem by specifying the desired settings for the metadata pool, data pools, and metadata server in the `CephFilesystem` CRD. In this example we create the metadata pool with replication of three and a single data pool with replication of three. For more options, see the documentation on [creating shared filesystems](../../CRDs/Shared-Filesystem/ceph-filesystem-crd.md).
|
||||
|
||||
@@ -24,14 +24,13 @@ until all the daemons have been updated.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Rook v1.12 supports the following Ceph versions:
|
||||
Rook v1.13 supports the following Ceph versions:
|
||||
|
||||
* Ceph Reef v18.2.0 or newer
|
||||
* Ceph Quincy v17.2.0 or newer
|
||||
* Ceph Pacific v16.2.7 or newer
|
||||
|
||||
Support for Ceph Pacific (16.2.x) will be removed in the next Rook release. It will be mandatory to
|
||||
upgrade to Quincy or Reef before upgrading to the Rook release after v1.12.x.
|
||||
Support for Ceph Pacific (16.2.x) is removed in Rook v1.13. Upgrade to Quincy or Reef before upgrading
|
||||
to Rook v1.13.
|
||||
|
||||
!!! important
|
||||
When an update is requested, the operator will check Ceph's status,
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
- Removed support for Ceph Pacific (v16)
|
||||
|
||||
## Features
|
||||
@@ -88,13 +88,13 @@ cephClusterSpec:
|
||||
# For more details, check https://rook.io/docs/rook/v1.10/CRDs/Cluster/ceph-cluster-crd/
|
||||
cephVersion:
|
||||
# The container image used to launch the Ceph daemon pods (mon, mgr, osd, mds, rgw).
|
||||
# v16 is Pacific, v17 is Quincy.
|
||||
# RECOMMENDATION: In production, use a specific version tag instead of the general v16 flag, which pulls the latest release and could result in different
|
||||
# v17 is Quincy, v18 is Reef.
|
||||
# RECOMMENDATION: In production, use a specific version tag instead of the general v18 flag, which pulls the latest release and could result in different
|
||||
# versions running within the cluster. See tags available at https://hub.docker.com/r/ceph/ceph/tags/.
|
||||
# If you want to be more precise, you can always use a timestamp tag such quay.io/ceph/ceph:v15.2.11-20200419
|
||||
# If you want to be more precise, you can always use a timestamp tag such as quay.io/ceph/ceph:v17.2.6-20230410
|
||||
# This tag might not contain a new Ceph version, just security fixes from the underlying operating system, which will reduce vulnerabilities
|
||||
image: quay.io/ceph/ceph:v17.2.6
|
||||
# Whether to allow unsupported versions of Ceph. Currently `pacific`, `quincy`, and `reef` are supported.
|
||||
# Whether to allow unsupported versions of Ceph. Currently `quincy`, and `reef` are supported.
|
||||
# Future versions such as `squid` (v19) would require this to be set to `true`.
|
||||
# Do not set to true in production.
|
||||
allowUnsupported: false
|
||||
|
||||
@@ -8002,10 +8002,10 @@ spec:
|
||||
nullable: true
|
||||
properties:
|
||||
namespace:
|
||||
description: The namespace inside the Ceph pool (set by 'pool') where shared NFS-Ganesha config is stored. This setting is required for Ceph v15 and ignored for Ceph v16. As of Ceph Pacific v16+, this is internally set to the name of the CephNFS.
|
||||
description: The namespace inside the Ceph pool (set by 'pool') where shared NFS-Ganesha config is stored. This setting is deprecated as it is internally set to the name of the CephNFS.
|
||||
type: string
|
||||
pool:
|
||||
description: The Ceph pool used store the shared configuration for NFS-Ganesha daemons. This setting is required for Ceph v15 and ignored for Ceph v16. As of Ceph Pacific 16.2.7+, this is internally hardcoded to ".nfs".
|
||||
description: The Ceph pool used store the shared configuration for NFS-Ganesha daemons. This setting is deprecated, as it is internally required to be ".nfs".
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
|
||||
@@ -44,7 +44,6 @@ spec:
|
||||
mgr:
|
||||
count: 2
|
||||
cephVersion:
|
||||
# Stretch cluster support upstream is only available starting in Ceph Pacific
|
||||
image: quay.io/ceph/ceph:v17.2.6
|
||||
allowUnsupported: true
|
||||
skipUpgradeChecks: false
|
||||
|
||||
@@ -38,7 +38,6 @@ spec:
|
||||
mgr:
|
||||
count: 2
|
||||
cephVersion:
|
||||
# Stretch cluster support upstream is only available starting in Ceph Pacific
|
||||
image: quay.io/ceph/ceph:v17.2.6
|
||||
allowUnsupported: true
|
||||
skipUpgradeChecks: false
|
||||
|
||||
@@ -16,13 +16,13 @@ metadata:
|
||||
spec:
|
||||
cephVersion:
|
||||
# The container image used to launch the Ceph daemon pods (mon, mgr, osd, mds, rgw).
|
||||
# v16 is Pacific, and v17 is Quincy.
|
||||
# v17 is Quincy, v18 is Reef.
|
||||
# RECOMMENDATION: In production, use a specific version tag instead of the general v17 flag, which pulls the latest release and could result in different
|
||||
# versions running within the cluster. See tags available at https://hub.docker.com/r/ceph/ceph/tags/.
|
||||
# If you want to be more precise, you can always use a timestamp tag such quay.io/ceph/ceph:v17.2.6-20230410
|
||||
# If you want to be more precise, you can always use a timestamp tag such as quay.io/ceph/ceph:v17.2.6-20230410
|
||||
# This tag might not contain a new Ceph version, just security fixes from the underlying operating system, which will reduce vulnerabilities
|
||||
image: quay.io/ceph/ceph:v17.2.6
|
||||
# Whether to allow unsupported versions of Ceph. Currently `pacific`, `quincy`, and `reef` are supported.
|
||||
# Whether to allow unsupported versions of Ceph. Currently `quincy` and `reef` are supported.
|
||||
# Future versions such as `squid` (v19) would require this to be set to `true`.
|
||||
# Do not set to true in production.
|
||||
allowUnsupported: false
|
||||
|
||||
@@ -7995,10 +7995,10 @@ spec:
|
||||
nullable: true
|
||||
properties:
|
||||
namespace:
|
||||
description: The namespace inside the Ceph pool (set by 'pool') where shared NFS-Ganesha config is stored. This setting is required for Ceph v15 and ignored for Ceph v16. As of Ceph Pacific v16+, this is internally set to the name of the CephNFS.
|
||||
description: The namespace inside the Ceph pool (set by 'pool') where shared NFS-Ganesha config is stored. This setting is deprecated as it is internally set to the name of the CephNFS.
|
||||
type: string
|
||||
pool:
|
||||
description: The Ceph pool used store the shared configuration for NFS-Ganesha daemons. This setting is required for Ceph v15 and ignored for Ceph v16. As of Ceph Pacific 16.2.7+, this is internally hardcoded to ".nfs".
|
||||
description: The Ceph pool used store the shared configuration for NFS-Ganesha daemons. This setting is deprecated, as it is internally required to be ".nfs".
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
|
||||
@@ -2065,14 +2065,12 @@ type NFSGaneshaSpec struct {
|
||||
// GaneshaRADOSSpec represents the specification of a Ganesha RADOS object
|
||||
type GaneshaRADOSSpec struct {
|
||||
// The Ceph pool used store the shared configuration for NFS-Ganesha daemons.
|
||||
// This setting is required for Ceph v15 and ignored for Ceph v16.
|
||||
// As of Ceph Pacific 16.2.7+, this is internally hardcoded to ".nfs".
|
||||
// This setting is deprecated, as it is internally required to be ".nfs".
|
||||
// +optional
|
||||
Pool string `json:"pool,omitempty"`
|
||||
|
||||
// The namespace inside the Ceph pool (set by 'pool') where shared NFS-Ganesha config is stored.
|
||||
// This setting is required for Ceph v15 and ignored for Ceph v16.
|
||||
// As of Ceph Pacific v16+, this is internally set to the name of the CephNFS.
|
||||
// This setting is deprecated as it is internally set to the name of the CephNFS.
|
||||
// +optional
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func OsdLsOutput(numOSDs int) string {
|
||||
// - osd3 - osd4 - osd5
|
||||
// - osd6 - osd7 - osd8
|
||||
func OsdTreeOutput(numNodes, numOSDsPerNode int) string {
|
||||
// JSON output taken from Ceph Pacific
|
||||
// JSON output
|
||||
rootFormat := ` {
|
||||
"id": -1,
|
||||
"name": "default",
|
||||
@@ -106,7 +106,6 @@ func OsdTreeOutput(numNodes, numOSDsPerNode int) string {
|
||||
// If returnOsdIds is empty, this returns a NOT ok-to-stop result. Otherwise, it returns an
|
||||
// ok-to-stop result. returnOsdIds should include queriedID if the result should be successful.
|
||||
func OsdOkToStopOutput(queriedID int, returnOsdIds []int) string {
|
||||
// For Pacific and up (Pacific+)
|
||||
okTemplate := `{"ok_to_stop":true,"osds":[%s],"num_ok_pgs":132,"num_not_ok_pgs":0,"ok_become_degraded":["1.0","1.2","1.3"]}`
|
||||
notOkTemplate := `{"ok_to_stop":false,"osds":[%d],"num_ok_pgs":161,"num_not_ok_pgs":50,"bad_become_inactive":["1.0","1.3","1.a"],"ok_become_degraded":["1.2","1.4","1.5"]}`
|
||||
|
||||
|
||||
@@ -69,11 +69,8 @@ func MgrEnableModule(context *clusterd.Context, clusterInfo *ClusterInfo, name s
|
||||
retryCount := 5
|
||||
var err error
|
||||
for i := 0; i < retryCount; i++ {
|
||||
/* In Pacific the balancer is now on by default in upmap mode.
|
||||
In earlier versions, the balancer was included in the ``always_on_modules`` list, but needed to be
|
||||
turned on explicitly using the ``ceph balancer on`` command. */
|
||||
if name == "balancer" {
|
||||
logger.Debug("balancer module is already 'on' on pacific, doing nothing", name)
|
||||
logger.Debug("balancer module is always 'on', doing nothing", name)
|
||||
return nil
|
||||
} else {
|
||||
err = enableModule(context, clusterInfo, name, force, "enable")
|
||||
|
||||
@@ -21,7 +21,6 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rook/rook/pkg/clusterd"
|
||||
"github.com/rook/rook/pkg/operator/ceph/version"
|
||||
exectest "github.com/rook/rook/pkg/util/exec/test"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@@ -60,16 +59,9 @@ func TestEnableModuleRetries(t *testing.T) {
|
||||
_ = MgrEnableModule(&clusterd.Context{Executor: executor}, clusterInfo, "pg_autoscaler", false)
|
||||
assert.Equal(t, 0, moduleEnableRetries)
|
||||
|
||||
// Balancer not on Ceph Pacific
|
||||
moduleEnableRetries = 0
|
||||
// Balancer skipped
|
||||
_ = MgrEnableModule(&clusterd.Context{Executor: executor}, clusterInfo, "balancer", false)
|
||||
assert.Equal(t, 0, moduleEnableRetries)
|
||||
|
||||
// Balancer skipped on Pacific
|
||||
clusterInfo.CephVersion = version.Pacific
|
||||
_ = MgrEnableModule(&clusterd.Context{Executor: executor}, clusterInfo, "balancer", false)
|
||||
assert.Equal(t, 0, moduleEnableRetries)
|
||||
|
||||
}
|
||||
|
||||
func TestEnableModule(t *testing.T) {
|
||||
|
||||
@@ -167,9 +167,9 @@ func TestOSDOkToStop(t *testing.T) {
|
||||
seenArgs = []string{}
|
||||
}
|
||||
|
||||
t.Run("pacific output ok to stop", func(t *testing.T) {
|
||||
t.Run("output ok to stop", func(t *testing.T) {
|
||||
doSetup()
|
||||
clusterInfo.CephVersion = version.Pacific
|
||||
clusterInfo.CephVersion = version.Reef
|
||||
returnString = fake.OsdOkToStopOutput(1, []int{1, 2})
|
||||
returnOkResult = true
|
||||
osds, err := OSDOkToStop(context, clusterInfo, 1, 2)
|
||||
@@ -179,9 +179,9 @@ func TestOSDOkToStop(t *testing.T) {
|
||||
assert.Equal(t, "--max=2", seenArgs[3])
|
||||
})
|
||||
|
||||
t.Run("pacific output not ok to stop", func(t *testing.T) {
|
||||
t.Run("output not ok to stop", func(t *testing.T) {
|
||||
doSetup()
|
||||
clusterInfo.CephVersion = version.Pacific
|
||||
clusterInfo.CephVersion = version.Reef
|
||||
returnString = fake.OsdOkToStopOutput(3, []int{})
|
||||
returnOkResult = false
|
||||
_, err := OSDOkToStop(context, clusterInfo, 3, 5)
|
||||
@@ -190,9 +190,9 @@ func TestOSDOkToStop(t *testing.T) {
|
||||
assert.Equal(t, "--max=5", seenArgs[3])
|
||||
})
|
||||
|
||||
t.Run("pacific handles maxReturned=0", func(t *testing.T) {
|
||||
t.Run("handle maxReturned=0", func(t *testing.T) {
|
||||
doSetup()
|
||||
clusterInfo.CephVersion = version.Pacific
|
||||
clusterInfo.CephVersion = version.Reef
|
||||
returnString = fake.OsdOkToStopOutput(4, []int{4, 8})
|
||||
returnOkResult = true
|
||||
osds, err := OSDOkToStop(context, clusterInfo, 4, 0)
|
||||
|
||||
@@ -214,12 +214,12 @@ func okToContinueMDSDaemon(context *clusterd.Context, clusterInfo *ClusterInfo,
|
||||
// Assume the following:
|
||||
//
|
||||
// "mon": {
|
||||
// "ceph version 16.2.5 (cbff874f9007f1869bfd3821b7e33b2a6ffd4988) pacific (stable)": 2,
|
||||
// "ceph version 17.2.0 (3a54b2b6d167d4a2a19e003a705696d4fe619afc) quincy (stable)": 1
|
||||
// "ceph version 18.2.5 (cbff874f9007f1869bfd3821b7e33b2a6ffd4988) reef (stable)": 2,
|
||||
// "ceph version 17.2.6 (3a54b2b6d167d4a2a19e003a705696d4fe619afc) quincy (stable)": 1
|
||||
// }
|
||||
//
|
||||
// In the case we will pick: "ceph version 16.2.5 (cbff874f9007f1869bfd3821b7e33b2a6ffd4988) pacific (stable)": 2,
|
||||
// And eventually return 16.2.5
|
||||
// In the case we will pick: "ceph version 18.2.5 (cbff874f9007f1869bfd3821b7e33b2a6ffd4988) reef (stable)": 2,
|
||||
// And eventually return 18.2.5
|
||||
func LeastUptodateDaemonVersion(context *clusterd.Context, clusterInfo *ClusterInfo, daemonType string) (cephver.CephVersion, error) {
|
||||
var r map[string]int
|
||||
var vv cephver.CephVersion
|
||||
|
||||
@@ -128,8 +128,8 @@ func TestDaemonMapEntry(t *testing.T) {
|
||||
dummyVersionsRaw := []byte(`
|
||||
{
|
||||
"mon": {
|
||||
"ceph version 16.2.5 (cbff874f9007f1869bfd3821b7e33b2a6ffd4988) pacific (stable)": 1,
|
||||
"ceph version 17.2.0 (3a54b2b6d167d4a2a19e003a705696d4fe619afc) quincy (stable)": 2
|
||||
"ceph version 18.2.5 (cbff874f9007f1869bfd3821b7e33b2a6ffd4988) reef (stable)": 1,
|
||||
"ceph version 17.2.7 (3a54b2b6d167d4a2a19e003a705696d4fe619afc) quincy (stable)": 2
|
||||
}
|
||||
}`)
|
||||
|
||||
|
||||
@@ -444,32 +444,6 @@ func (c *cluster) replaceDefaultCrushMap(newRoot string) (err error) {
|
||||
|
||||
// preMonStartupActions is a collection of actions to run before the monitors are reconciled.
|
||||
func (c *cluster) preMonStartupActions(cephVersion cephver.CephVersion) error {
|
||||
// Disable the mds sanity checks for the mons due to a ceph upgrade issue
|
||||
// for the mds to Pacific if 16.2.7 or greater. We keep it more general for any
|
||||
// Pacific upgrade greater than 16.2.7 in case they skip upgrading directly to 16.2.7.
|
||||
if c.isUpgrade && cephVersion.IsPacific() && cephVersion.IsAtLeast(cephver.CephVersion{Major: 16, Minor: 2, Extra: 7}) {
|
||||
if err := c.skipMDSSanityChecks(true); err != nil {
|
||||
// If there is an error, just print it and continue. Likely there is not a
|
||||
// negative consequence of continuing since several complex conditions must exist to hit
|
||||
// the upgrade issue where the sanity checks need to be disabled.
|
||||
logger.Warningf("failed to disable the mon_mds_skip_sanity. %v", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *cluster) skipMDSSanityChecks(skip bool) error {
|
||||
// In a running cluster disable the mds skip sanity setting during upgrades.
|
||||
monStore := config.GetMonStore(c.context, c.ClusterInfo)
|
||||
if skip {
|
||||
if err := monStore.Set("mon", "mon_mds_skip_sanity", "1"); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if err := monStore.Delete("mon", "mon_mds_skip_sanity"); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -489,15 +463,6 @@ func (c *cluster) postMonStartupActions() error {
|
||||
return errors.Wrap(err, "failed to create crash collector kubernetes secret")
|
||||
}
|
||||
|
||||
// Always ensure the skip mds sanity checks setting is cleared, for all Pacific deployments
|
||||
if c.ClusterInfo.CephVersion.IsPacific() {
|
||||
if err := c.skipMDSSanityChecks(false); err != nil {
|
||||
// If there is an error, just print it and continue. We can just try again
|
||||
// at the next reconcile.
|
||||
logger.Warningf("failed to re-enable the mon_mds_skip_sanity. %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err := c.configureMsgr2(); err != nil {
|
||||
return errors.Wrap(err, "failed to configure msgr2")
|
||||
}
|
||||
|
||||
@@ -82,80 +82,6 @@ func TestPreClusterStartValidation(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestPreMonChecks(t *testing.T) {
|
||||
executor := &exectest.MockExecutor{}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
setSkipSanity := false
|
||||
unsetSkipSanity := false
|
||||
executor.MockExecuteCommandWithTimeout = func(timeout time.Duration, command string, args ...string) (string, error) {
|
||||
logger.Infof("Command: %s %v", command, args)
|
||||
if args[0] == "config" {
|
||||
if args[1] == "set" {
|
||||
setSkipSanity = true
|
||||
assert.Equal(t, "mon", args[2])
|
||||
assert.Equal(t, "mon_mds_skip_sanity", args[3])
|
||||
assert.Equal(t, "1", args[4])
|
||||
return "", nil
|
||||
}
|
||||
if args[1] == "rm" {
|
||||
unsetSkipSanity = true
|
||||
assert.Equal(t, "mon", args[2])
|
||||
assert.Equal(t, "mon_mds_skip_sanity", args[3])
|
||||
return "", nil
|
||||
}
|
||||
}
|
||||
return "", errors.Errorf("unexpected ceph command %q", args)
|
||||
}
|
||||
c := cluster{context: context, ClusterInfo: cephclient.AdminTestClusterInfo("cluster")}
|
||||
|
||||
t.Run("no upgrade", func(t *testing.T) {
|
||||
v := cephver.CephVersion{Major: 16, Minor: 2, Extra: 7}
|
||||
c.isUpgrade = false
|
||||
err := c.preMonStartupActions(v)
|
||||
assert.NoError(t, err)
|
||||
assert.False(t, setSkipSanity)
|
||||
assert.False(t, unsetSkipSanity)
|
||||
})
|
||||
|
||||
t.Run("upgrade below version", func(t *testing.T) {
|
||||
setSkipSanity = false
|
||||
unsetSkipSanity = false
|
||||
v := cephver.CephVersion{Major: 16, Minor: 2, Extra: 6}
|
||||
c.isUpgrade = true
|
||||
err := c.preMonStartupActions(v)
|
||||
assert.NoError(t, err)
|
||||
assert.False(t, setSkipSanity)
|
||||
assert.False(t, unsetSkipSanity)
|
||||
})
|
||||
|
||||
t.Run("upgrade to applicable version", func(t *testing.T) {
|
||||
setSkipSanity = false
|
||||
unsetSkipSanity = false
|
||||
v := cephver.CephVersion{Major: 16, Minor: 2, Extra: 7}
|
||||
c.isUpgrade = true
|
||||
err := c.preMonStartupActions(v)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, setSkipSanity)
|
||||
assert.False(t, unsetSkipSanity)
|
||||
|
||||
// This will be called during the post mon checks
|
||||
err = c.skipMDSSanityChecks(false)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, unsetSkipSanity)
|
||||
})
|
||||
|
||||
t.Run("upgrade to quincy", func(t *testing.T) {
|
||||
setSkipSanity = false
|
||||
unsetSkipSanity = false
|
||||
v := cephver.CephVersion{Major: 17, Minor: 2, Extra: 0}
|
||||
c.isUpgrade = true
|
||||
err := c.preMonStartupActions(v)
|
||||
assert.NoError(t, err)
|
||||
assert.False(t, setSkipSanity)
|
||||
assert.False(t, unsetSkipSanity)
|
||||
})
|
||||
}
|
||||
|
||||
func TestConfigureMsgr2(t *testing.T) {
|
||||
type fields struct {
|
||||
expectedGlobalConfigSettings map[string]string
|
||||
|
||||
@@ -23,7 +23,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
|
||||
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
"github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
@@ -416,37 +415,6 @@ func TestApplyMonitoringLabels(t *testing.T) {
|
||||
assert.Nil(t, sm.Spec.Endpoints[0].RelabelConfigs)
|
||||
}
|
||||
|
||||
func TestCluster_enableBalancerModule(t *testing.T) {
|
||||
c := &Cluster{
|
||||
context: &clusterd.Context{Executor: &exectest.MockExecutor{}, Clientset: testop.New(t, 3)},
|
||||
clusterInfo: cephclient.AdminTestClusterInfo("mycluster"),
|
||||
}
|
||||
|
||||
t.Run("on pacific we configure the balancer ONLY and don't set a mode", func(t *testing.T) {
|
||||
c.clusterInfo.CephVersion = cephver.Pacific
|
||||
executor := &exectest.MockExecutor{
|
||||
MockExecuteCommandWithOutput: func(command string, args ...string) (string, error) {
|
||||
logger.Infof("Command: %s %v", command, args)
|
||||
if command == "ceph" {
|
||||
if args[0] == "osd" && args[1] == "set-require-min-compat-client" {
|
||||
return "", nil
|
||||
}
|
||||
if args[0] == "balancer" && args[1] == "mode" {
|
||||
return "", errors.New("balancer mode must not be set")
|
||||
}
|
||||
if args[0] == "balancer" && args[1] == "on" {
|
||||
return "", nil
|
||||
}
|
||||
}
|
||||
return "", errors.New("unknown command")
|
||||
},
|
||||
}
|
||||
c.context.Executor = executor
|
||||
err := c.enableBalancerModule()
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
}
|
||||
|
||||
func TestCluster_configurePrometheusModule(t *testing.T) {
|
||||
modulesEnabled := 0
|
||||
modulesDisabled := 0
|
||||
|
||||
@@ -86,7 +86,7 @@ func TestOrchestratorModules(t *testing.T) {
|
||||
assert.True(t, rookModuleEnabled)
|
||||
assert.True(t, rookBackendSet)
|
||||
|
||||
c.clusterInfo.CephVersion = cephver.Pacific
|
||||
c.clusterInfo.CephVersion = cephver.Reef
|
||||
err = c.setRookOrchestratorBackend()
|
||||
assert.NoError(t, err)
|
||||
executor.MockExecuteCommandWithTimeout = func(timeout time.Duration, command string, args ...string) (string, error) {
|
||||
|
||||
@@ -188,7 +188,7 @@ func testOSDIntegration(t *testing.T) {
|
||||
clientset.PrependReactor("*", "deployments", deploymentReactor)
|
||||
|
||||
clusterInfo := cephclient.NewClusterInfo(namespace, clusterName)
|
||||
clusterInfo.CephVersion = cephver.Pacific
|
||||
clusterInfo.CephVersion = cephver.Reef
|
||||
clusterInfo.SetName("mycluster")
|
||||
clusterInfo.OwnerInfo = cephclient.NewMinimumOwnerInfo(t)
|
||||
clusterInfo.Context = ctx
|
||||
|
||||
@@ -101,7 +101,7 @@ func Test_updateExistingOSDs(t *testing.T) {
|
||||
}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: namespace,
|
||||
CephVersion: cephver.Pacific,
|
||||
CephVersion: cephver.Reef,
|
||||
Context: context.TODO(),
|
||||
}
|
||||
clusterInfo.SetName("mycluster")
|
||||
|
||||
@@ -64,7 +64,7 @@ func TestCephRBDMirrorController(t *testing.T) {
|
||||
os.Setenv("ROOK_LOG_LEVEL", "DEBUG")
|
||||
|
||||
currentAndDesiredCephVersion = func(ctx context.Context, rookImage string, namespace string, jobName string, ownerInfo *k8sutil.OwnerInfo, context *clusterd.Context, cephClusterSpec *cephv1.ClusterSpec, clusterInfo *client.ClusterInfo) (*version.CephVersion, *version.CephVersion, error) {
|
||||
return &version.Pacific, &version.Pacific, nil
|
||||
return &version.Reef, &version.Reef, nil
|
||||
}
|
||||
|
||||
// An rbd-mirror resource with metadata and spec.
|
||||
|
||||
@@ -160,10 +160,8 @@ func TestMinVersion(t *testing.T) {
|
||||
v = &cephver.CephVersion{Major: 15, Minor: 2, Extra: 11}
|
||||
assert.Error(t, c.validateCephVersion(v))
|
||||
|
||||
// All versions at least 16.2.0 are valid
|
||||
v = &cephver.CephVersion{Major: 16, Minor: 2, Extra: 0}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
v = &cephver.CephVersion{Major: 17}
|
||||
// All versions at least 17.2.0 are valid
|
||||
v = &cephver.CephVersion{Major: 17, Minor: 2}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
v = &cephver.CephVersion{Major: 18}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
@@ -174,13 +172,9 @@ func TestSupportedVersion(t *testing.T) {
|
||||
c.ClusterInfo = &client.ClusterInfo{Context: context.TODO()}
|
||||
|
||||
// lower version is not supported
|
||||
v := &cephver.CephVersion{Major: 15, Minor: 2, Extra: 5}
|
||||
v := &cephver.CephVersion{Major: 16, Minor: 2, Extra: 7}
|
||||
assert.Error(t, c.validateCephVersion(v))
|
||||
|
||||
// Pacific is supported
|
||||
v = &cephver.CephVersion{Major: 16, Minor: 2, Extra: 0}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
|
||||
// Quincy is supported
|
||||
v = &cephver.CephVersion{Major: 17, Minor: 2, Extra: 0}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
|
||||
@@ -29,7 +29,6 @@ import (
|
||||
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
"github.com/rook/rook/pkg/clusterd"
|
||||
cephclient "github.com/rook/rook/pkg/daemon/ceph/client"
|
||||
"github.com/rook/rook/pkg/operator/ceph/version"
|
||||
)
|
||||
|
||||
var logger = capnslog.NewPackageLogger("github.com/rook/rook", "op-config")
|
||||
@@ -148,11 +147,6 @@ func SetOrRemoveDefaultConfigs(
|
||||
}
|
||||
|
||||
func DisableInsecureGlobalID(context *clusterd.Context, clusterInfo *cephclient.ClusterInfo) {
|
||||
if !canDisableInsecureGlobalID(clusterInfo) {
|
||||
logger.Infof("cannot disable insecure global id on ceph version %v", clusterInfo.CephVersion.String())
|
||||
return
|
||||
}
|
||||
|
||||
monStore := GetMonStore(context, clusterInfo)
|
||||
if err := monStore.Set("mon", "auth_allow_insecure_global_id_reclaim", "false"); err != nil {
|
||||
logger.Warningf("failed to disable the insecure global ID. %v", err)
|
||||
@@ -160,14 +154,3 @@ func DisableInsecureGlobalID(context *clusterd.Context, clusterInfo *cephclient.
|
||||
logger.Info("insecure global ID is now disabled")
|
||||
}
|
||||
}
|
||||
|
||||
func canDisableInsecureGlobalID(clusterInfo *cephclient.ClusterInfo) bool {
|
||||
cephver := clusterInfo.CephVersion
|
||||
if cephver.IsAtLeastQuincy() {
|
||||
return true
|
||||
}
|
||||
if cephver.IsPacific() && cephver.IsAtLeast(version.CephVersion{Major: 16, Minor: 2, Extra: 1}) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -19,8 +19,6 @@ package config
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/rook/rook/pkg/daemon/ceph/client"
|
||||
"github.com/rook/rook/pkg/operator/ceph/version"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -31,12 +29,3 @@ func TestNewFlag(t *testing.T) {
|
||||
assert.Equal(t, NewFlag("c key", "c"), "--c-key=c")
|
||||
assert.Equal(t, NewFlag("quotes", "\"quoted\""), "--quotes=\"quoted\"")
|
||||
}
|
||||
|
||||
func TestInsecureGlobalIDVersion(t *testing.T) {
|
||||
c := &client.ClusterInfo{CephVersion: version.CephVersion{Major: 17, Minor: 2, Extra: 0}}
|
||||
assert.True(t, canDisableInsecureGlobalID(c))
|
||||
c = &client.ClusterInfo{CephVersion: version.CephVersion{Major: 16, Minor: 2, Extra: 0}}
|
||||
assert.False(t, canDisableInsecureGlobalID(c))
|
||||
c = &client.ClusterInfo{CephVersion: version.CephVersion{Major: 16, Minor: 2, Extra: 1}}
|
||||
assert.True(t, canDisableInsecureGlobalID(c))
|
||||
}
|
||||
@@ -390,8 +390,8 @@ func AdminFlags(cluster *client.ClusterInfo) []string {
|
||||
func NetworkBindingFlags(cluster *client.ClusterInfo, spec *cephv1.ClusterSpec) []string {
|
||||
var args []string
|
||||
|
||||
// As of Pacific, Ceph supports dual-stack, so setting IPv6 family without disabling IPv4 binding actually enables dual-stack
|
||||
// This is likely not user's intent, so on Pacific let's make sure to disable IPv4 when IPv6 is selected
|
||||
// Ceph supports dual-stack, so setting IPv6 family without disabling IPv4 binding actually enables dual-stack
|
||||
// This is likely not user's intent, so let's make sure to disable IPv4 when IPv6 is selected
|
||||
if !spec.Network.DualStack {
|
||||
switch spec.Network.IPFamily {
|
||||
case cephv1.IPv4:
|
||||
|
||||
@@ -229,9 +229,9 @@ func TestNetworkBindingFlags(t *testing.T) {
|
||||
args args
|
||||
want []string
|
||||
}{
|
||||
{"pacific-ipv4", args{cluster: &cephclient.ClusterInfo{CephVersion: version.Pacific}, spec: &cephv1.ClusterSpec{Network: cephv1.NetworkSpec{IPFamily: cephv1.IPv4}}}, []string{ipv4FlagTrue, ipv6FlagFalse}},
|
||||
{"pacific-ipv6", args{cluster: &cephclient.ClusterInfo{CephVersion: version.Pacific}, spec: &cephv1.ClusterSpec{Network: cephv1.NetworkSpec{IPFamily: cephv1.IPv6}}}, []string{ipv4FlagFalse, ipv6FlagTrue}},
|
||||
{"pacific-dualstack-supported", args{cluster: &cephclient.ClusterInfo{CephVersion: version.Pacific}, spec: &cephv1.ClusterSpec{Network: cephv1.NetworkSpec{IPFamily: cephv1.IPv6, DualStack: true}}}, []string{ipv4FlagTrue, ipv6FlagTrue}},
|
||||
{"ipv4", args{cluster: &cephclient.ClusterInfo{CephVersion: version.Reef}, spec: &cephv1.ClusterSpec{Network: cephv1.NetworkSpec{IPFamily: cephv1.IPv4}}}, []string{ipv4FlagTrue, ipv6FlagFalse}},
|
||||
{"ipv6", args{cluster: &cephclient.ClusterInfo{CephVersion: version.Reef}, spec: &cephv1.ClusterSpec{Network: cephv1.NetworkSpec{IPFamily: cephv1.IPv6}}}, []string{ipv4FlagFalse, ipv6FlagTrue}},
|
||||
{"dualstack-supported", args{cluster: &cephclient.ClusterInfo{CephVersion: version.Reef}, spec: &cephv1.ClusterSpec{Network: cephv1.NetworkSpec{IPFamily: cephv1.IPv6, DualStack: true}}}, []string{ipv4FlagTrue, ipv6FlagTrue}},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
@@ -159,7 +159,7 @@ func TestCephFilesystemController(t *testing.T) {
|
||||
os.Setenv("ROOK_LOG_LEVEL", "DEBUG")
|
||||
|
||||
currentAndDesiredCephVersion = func(ctx context.Context, rookImage string, namespace string, jobName string, ownerInfo *k8sutil.OwnerInfo, context *clusterd.Context, cephClusterSpec *cephv1.ClusterSpec, clusterInfo *client.ClusterInfo) (*version.CephVersion, *version.CephVersion, error) {
|
||||
return &version.Pacific, &version.Pacific, nil
|
||||
return &version.Reef, &version.Reef, nil
|
||||
}
|
||||
|
||||
// A Pool resource with metadata and spec.
|
||||
|
||||
@@ -377,7 +377,7 @@ func TestCreateFilesystem(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("multi filesystem creation should succeed", func(t *testing.T) {
|
||||
clusterInfo.CephVersion = version.Pacific
|
||||
clusterInfo.CephVersion = version.Quincy
|
||||
err := createFilesystem(context, clusterInfo, fs, &cephv1.ClusterSpec{}, ownerInfo, "/var/lib/rook/")
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
@@ -399,7 +399,7 @@ func TestUpgradeFilesystem(t *testing.T) {
|
||||
ConfigDir: configDir,
|
||||
Clientset: clientset}
|
||||
fs := fsTest(fsName)
|
||||
clusterInfo := &cephclient.ClusterInfo{FSID: "myfsid", CephVersion: version.Pacific, Context: ctx}
|
||||
clusterInfo := &cephclient.ClusterInfo{FSID: "myfsid", CephVersion: version.Quincy, Context: ctx}
|
||||
|
||||
// start a basic cluster for upgrade
|
||||
ownerInfo := cephclient.NewMinimumOwnerInfoWithOwnerRef()
|
||||
@@ -485,7 +485,7 @@ func TestUpgradeFilesystem(t *testing.T) {
|
||||
versionStr, _ := json.Marshal(
|
||||
map[string]map[string]int{
|
||||
"mds": {
|
||||
"ceph version 16.2.0-0-g2f728b9 (2f728b952cf293dd7f809ad8a0f5b5d040c43010) pacific (stable)": 2,
|
||||
"ceph version 17.2.0-0-g2f728b9 (2f728b952cf293dd7f809ad8a0f5b5d040c43010) quincy (stable)": 2,
|
||||
},
|
||||
})
|
||||
return string(versionStr), nil
|
||||
@@ -494,7 +494,7 @@ func TestUpgradeFilesystem(t *testing.T) {
|
||||
return "", nil
|
||||
}
|
||||
// do upgrade
|
||||
clusterInfo.CephVersion = version.Quincy
|
||||
clusterInfo.CephVersion = version.Reef
|
||||
context = &clusterd.Context{
|
||||
Executor: executor,
|
||||
ConfigDir: configDir,
|
||||
|
||||
@@ -247,8 +247,7 @@ func (c *Cluster) upgradeMDS() error {
|
||||
return errors.Wrap(err, "failed to setting allow_standby_replay to false")
|
||||
}
|
||||
|
||||
// In Pacific, standby-replay daemons are stopped automatically. Older versions of Ceph require
|
||||
// us to stop these daemons manually.
|
||||
// Standby-replay daemons are stopped automatically.
|
||||
if err := cephclient.FailAllStandbyReplayMDS(c.context, c.clusterInfo, c.fs.Name); err != nil {
|
||||
return errors.Wrap(err, "failed to fail mds agent in up:standby-replay state")
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ func TestCephFilesystemMirrorController(t *testing.T) {
|
||||
}
|
||||
|
||||
currentAndDesiredCephVersion = func(ctx context.Context, rookImage string, namespace string, jobName string, ownerInfo *k8sutil.OwnerInfo, context *clusterd.Context, cephClusterSpec *cephv1.ClusterSpec, clusterInfo *client.ClusterInfo) (*version.CephVersion, *version.CephVersion, error) {
|
||||
return &version.Pacific, &version.Quincy, nil
|
||||
return &version.Quincy, &version.Reef, nil
|
||||
}
|
||||
|
||||
res, err := r.Reconcile(ctx, req)
|
||||
@@ -236,7 +236,7 @@ func TestCephFilesystemMirrorController(t *testing.T) {
|
||||
assert.True(t, res.Requeue)
|
||||
})
|
||||
|
||||
t.Run("success - running pacific", func(t *testing.T) {
|
||||
t.Run("success create reef", func(t *testing.T) {
|
||||
r.context.Executor = &exectest.MockExecutor{
|
||||
MockExecuteCommandWithOutput: func(command string, args ...string) (string, error) {
|
||||
if args[0] == "status" {
|
||||
@@ -250,7 +250,7 @@ func TestCephFilesystemMirrorController(t *testing.T) {
|
||||
}
|
||||
|
||||
currentAndDesiredCephVersion = func(ctx context.Context, rookImage string, namespace string, jobName string, ownerInfo *k8sutil.OwnerInfo, context *clusterd.Context, cephClusterSpec *cephv1.ClusterSpec, clusterInfo *client.ClusterInfo) (*version.CephVersion, *version.CephVersion, error) {
|
||||
return &version.Pacific, &version.Pacific, nil
|
||||
return &version.Reef, &version.Reef, nil
|
||||
}
|
||||
|
||||
res, err := r.Reconcile(ctx, req)
|
||||
|
||||
@@ -31,7 +31,6 @@ import (
|
||||
"github.com/rook/rook/pkg/operator/ceph/config"
|
||||
opcontroller "github.com/rook/rook/pkg/operator/ceph/controller"
|
||||
"github.com/rook/rook/pkg/operator/ceph/reporting"
|
||||
"github.com/rook/rook/pkg/operator/ceph/version"
|
||||
"github.com/rook/rook/pkg/operator/k8sutil"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
@@ -52,9 +51,6 @@ const (
|
||||
controllerName = "ceph-nfs-controller"
|
||||
)
|
||||
|
||||
// Version of Ceph where NFS default pool name changes to ".nfs"
|
||||
var cephNFSChangeVersion = version.CephVersion{Major: 16, Minor: 2, Extra: 7}
|
||||
|
||||
var logger = capnslog.NewPackageLogger("github.com/rook/rook", controllerName)
|
||||
|
||||
// List of object resources to watch by the controller
|
||||
@@ -269,13 +265,7 @@ func (r *ReconcileCephNFS) reconcile(request reconcile.Request) (reconcile.Resul
|
||||
}
|
||||
r.clusterInfo.CephVersion = *runningCephVersion
|
||||
|
||||
// Pacific before 16.2.7: No customization, default pool name is nfs-ganesha
|
||||
// Pacific after 16.2.7: No customization, default pool name is .nfs
|
||||
if r.clusterInfo.CephVersion.IsAtLeast(cephNFSChangeVersion) {
|
||||
cephNFS.Spec.RADOS.Pool = postNFSChangeDefaultPoolName
|
||||
} else {
|
||||
cephNFS.Spec.RADOS.Pool = preNFSChangeDefaultPoolName
|
||||
}
|
||||
cephNFS.Spec.RADOS.Pool = nfsDefaultPoolName
|
||||
cephNFS.Spec.RADOS.Namespace = cephNFS.Name
|
||||
|
||||
// validate the store settings
|
||||
|
||||
@@ -507,7 +507,7 @@ func TestGetGaneshaConfigObject(t *testing.T) {
|
||||
expectedName := "conf-nfs.my-nfs"
|
||||
|
||||
res := getGaneshaConfigObject(cephNFS)
|
||||
logger.Infof("Config Object for Pacific is %s", res)
|
||||
logger.Infof("Config Object is %s", res)
|
||||
assert.Equal(t, expectedName, res)
|
||||
}
|
||||
|
||||
|
||||
@@ -37,9 +37,7 @@ import (
|
||||
|
||||
const (
|
||||
// Default RADOS pool name after the NFS changes in Ceph
|
||||
postNFSChangeDefaultPoolName = ".nfs"
|
||||
// Default RADOS pool name before the NFS changes in Ceph
|
||||
preNFSChangeDefaultPoolName = "nfs-ganesha"
|
||||
nfsDefaultPoolName = ".nfs"
|
||||
|
||||
// CephNFSNameLabelKey is the label key that contains the name of the CephNFS resource
|
||||
CephNFSNameLabelKey = "ceph_nfs"
|
||||
|
||||
@@ -444,7 +444,7 @@ func TestCephObjectStoreController(t *testing.T) {
|
||||
}
|
||||
|
||||
currentAndDesiredCephVersion = func(ctx context.Context, rookImage string, namespace string, jobName string, ownerInfo *k8sutil.OwnerInfo, context *clusterd.Context, cephClusterSpec *cephv1.ClusterSpec, clusterInfo *client.ClusterInfo) (*cephver.CephVersion, *cephver.CephVersion, error) {
|
||||
return &cephver.Pacific, &cephver.Pacific, nil
|
||||
return &cephver.Reef, &cephver.Reef, nil
|
||||
}
|
||||
|
||||
t.Run("error - no ceph cluster", func(t *testing.T) {
|
||||
@@ -580,7 +580,7 @@ func TestCephObjectStoreController(t *testing.T) {
|
||||
assert.NotEmpty(t, objectStore.Status.Info["endpoint"], objectStore)
|
||||
assert.Equal(t, "http://rook-ceph-rgw-my-store.rook-ceph.svc:80", objectStore.Status.Info["endpoint"], objectStore)
|
||||
assert.True(t, calledCommitConfigChanges)
|
||||
assert.Equal(t, 16, r.clusterInfo.CephVersion.Major)
|
||||
assert.Equal(t, 18, r.clusterInfo.CephVersion.Major)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -781,7 +781,7 @@ func TestCephObjectStoreControllerMultisite(t *testing.T) {
|
||||
}
|
||||
|
||||
currentAndDesiredCephVersion = func(ctx context.Context, rookImage string, namespace string, jobName string, ownerInfo *k8sutil.OwnerInfo, context *clusterd.Context, cephClusterSpec *cephv1.ClusterSpec, clusterInfo *client.ClusterInfo) (*cephver.CephVersion, *cephver.CephVersion, error) {
|
||||
return &cephver.Pacific, &cephver.Pacific, nil
|
||||
return &cephver.Reef, &cephver.Reef, nil
|
||||
}
|
||||
|
||||
t.Run("create an object store", func(t *testing.T) {
|
||||
@@ -953,7 +953,7 @@ func TestCephObjectExternalStoreController(t *testing.T) {
|
||||
}
|
||||
|
||||
currentAndDesiredCephVersion = func(ctx context.Context, rookImage string, namespace string, jobName string, ownerInfo *k8sutil.OwnerInfo, context *clusterd.Context, cephClusterSpec *cephv1.ClusterSpec, clusterInfo *client.ClusterInfo) (*cephver.CephVersion, *cephver.CephVersion, error) {
|
||||
return &cephver.Pacific, &cephver.Pacific, nil
|
||||
return &cephver.Reef, &cephver.Reef, nil
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@@ -70,9 +70,8 @@ var (
|
||||
dataPoolName = "rgw.buckets.data"
|
||||
|
||||
// An user with system privileges for dashboard service
|
||||
DashboardUser = "dashboard-admin"
|
||||
rgwPgNumRemovedQuincyVersion = cephver.CephVersion{Major: 17, Minor: 2, Extra: 2}
|
||||
rgwPgNumRemovedPacificVersion = cephver.CephVersion{Major: 16, Minor: 2, Extra: 11}
|
||||
DashboardUser = "dashboard-admin"
|
||||
rgwPgNumRemovedQuincyVersion = cephver.CephVersion{Major: 17, Minor: 2, Extra: 2}
|
||||
)
|
||||
|
||||
type idType struct {
|
||||
@@ -775,14 +774,7 @@ func CreatePools(context *Context, clusterSpec *cephv1.ClusterSpec, metadataPool
|
||||
// Check if this is a recent release of ceph where the legacy rgw_rados_pool_pg_num_min
|
||||
// is no longer available.
|
||||
func rgwRadosPGNumIsNew(cephVer cephver.CephVersion) bool {
|
||||
if cephVer.IsPacific() && cephVer.IsAtLeast(rgwPgNumRemovedPacificVersion) {
|
||||
return true
|
||||
}
|
||||
if cephVer.IsAtLeast(rgwPgNumRemovedQuincyVersion) {
|
||||
return true
|
||||
}
|
||||
// the legacy setting should still be checked
|
||||
return false
|
||||
return cephVer.IsAtLeast(rgwPgNumRemovedQuincyVersion)
|
||||
}
|
||||
|
||||
// configurePoolsConcurrently checks if operator pod resources are set or not
|
||||
|
||||
@@ -240,9 +240,6 @@ func TestGetObjectBucketProvisioner(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRGWPGNumVersion(t *testing.T) {
|
||||
assert.False(t, rgwRadosPGNumIsNew(cephver.CephVersion{Major: 15, Minor: 2, Extra: 9}))
|
||||
assert.False(t, rgwRadosPGNumIsNew(cephver.CephVersion{Major: 16, Minor: 2, Extra: 10}))
|
||||
assert.True(t, rgwRadosPGNumIsNew(cephver.CephVersion{Major: 16, Minor: 2, Extra: 11}))
|
||||
assert.False(t, rgwRadosPGNumIsNew(cephver.CephVersion{Major: 17, Minor: 2, Extra: 1}))
|
||||
assert.True(t, rgwRadosPGNumIsNew(cephver.CephVersion{Major: 17, Minor: 2, Extra: 2}))
|
||||
assert.True(t, rgwRadosPGNumIsNew(cephver.CephVersion{Major: 18, Minor: 0, Extra: 0}))
|
||||
|
||||
@@ -43,7 +43,6 @@ import (
|
||||
"github.com/rook/rook/pkg/clusterd"
|
||||
cephclient "github.com/rook/rook/pkg/daemon/ceph/client"
|
||||
"github.com/rook/rook/pkg/operator/ceph/object"
|
||||
"github.com/rook/rook/pkg/operator/ceph/version"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
@@ -144,7 +143,7 @@ func createSNSClient(p provisioner, objectStoreName types.NamespacedName) (*sns.
|
||||
return snsClient, nil
|
||||
}
|
||||
|
||||
func createTopicAttributes(topic *cephv1.CephBucketTopic, cephVersion version.CephVersion) map[string]*string {
|
||||
func createTopicAttributes(topic *cephv1.CephBucketTopic) map[string]*string {
|
||||
attr := make(map[string]*string)
|
||||
nsName := types.NamespacedName{Name: topic.Name, Namespace: topic.Namespace}
|
||||
|
||||
@@ -166,12 +165,8 @@ func createTopicAttributes(topic *cephv1.CephBucketTopic, cephVersion version.Ce
|
||||
attr["push-endpoint"] = &topic.Spec.Endpoint.HTTP.URI
|
||||
verifySSL = strconv.FormatBool(!topic.Spec.Endpoint.HTTP.DisableVerifySSL)
|
||||
attr["verify-ssl"] = &verifySSL
|
||||
if cephVersion.IsAtLeast(version.Quincy) {
|
||||
cloudEvents := strconv.FormatBool(topic.Spec.Endpoint.HTTP.SendCloudEvents)
|
||||
attr["cloudevents"] = &cloudEvents
|
||||
} else if topic.Spec.Endpoint.HTTP.SendCloudEvents {
|
||||
logger.Warning("HTTP CloudEvents endpoint supported for Ceph Quincy (v17) or newer")
|
||||
}
|
||||
cloudEvents := strconv.FormatBool(topic.Spec.Endpoint.HTTP.SendCloudEvents)
|
||||
attr["cloudevents"] = &cloudEvents
|
||||
}
|
||||
if topic.Spec.Endpoint.Kafka != nil {
|
||||
logger.Infof("creating CephBucketTopic %q with endpoint %q", nsName, topic.Spec.Endpoint.Kafka.URI)
|
||||
@@ -198,7 +193,7 @@ func createTopic(p provisioner, topic *cephv1.CephBucketTopic) (*string, error)
|
||||
}
|
||||
topicOutput, err := snsClient.CreateTopic(&sns.CreateTopicInput{
|
||||
Name: &topic.Name,
|
||||
Attributes: createTopicAttributes(topic, p.clusterInfo.CephVersion),
|
||||
Attributes: createTopicAttributes(topic),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -23,7 +23,6 @@ import (
|
||||
|
||||
"github.com/coreos/pkg/capnslog"
|
||||
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
"github.com/rook/rook/pkg/operator/ceph/version"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -63,15 +62,7 @@ func TestTopicAttributesCreation(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
assert.Equal(t, expectedAttrs, createTopicAttributes(bucketTopic, version.Quincy))
|
||||
// make sure that non quincy version don't use the cloudevents flag
|
||||
bucketTopic.Spec.Endpoint.HTTP.SendCloudEvents = true
|
||||
delete(expectedAttrs, "cloudevents")
|
||||
assert.Equal(t, expectedAttrs, createTopicAttributes(bucketTopic, version.Pacific))
|
||||
// make sure that quincy version can use the cloudevents flag
|
||||
expectedAttrs["cloudevents"] = &trueString
|
||||
assert.Equal(t, expectedAttrs, createTopicAttributes(bucketTopic, version.Quincy))
|
||||
|
||||
assert.Equal(t, expectedAttrs, createTopicAttributes(bucketTopic))
|
||||
})
|
||||
t.Run("test AMQP attributes", func(t *testing.T) {
|
||||
uri := "amqp://my-rabbitmq-service:5672/vhost1"
|
||||
@@ -105,7 +96,7 @@ func TestTopicAttributesCreation(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
assert.Equal(t, expectedAttrs, createTopicAttributes(bucketTopic, version.Quincy))
|
||||
assert.Equal(t, expectedAttrs, createTopicAttributes(bucketTopic))
|
||||
})
|
||||
t.Run("test Kafka attributes", func(t *testing.T) {
|
||||
uri := "kafka://my-kafka-service:9092"
|
||||
@@ -138,6 +129,6 @@ func TestTopicAttributesCreation(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
assert.Equal(t, expectedAttrs, createTopicAttributes(bucketTopic, version.Quincy))
|
||||
assert.Equal(t, expectedAttrs, createTopicAttributes(bucketTopic))
|
||||
})
|
||||
}
|
||||
@@ -40,10 +40,8 @@ const (
|
||||
|
||||
var (
|
||||
// Minimum supported version
|
||||
Minimum = CephVersion{16, 2, 0, 0, ""}
|
||||
Minimum = CephVersion{17, 2, 0, 0, ""}
|
||||
|
||||
// Pacific Ceph version
|
||||
Pacific = CephVersion{16, 0, 0, 0, ""}
|
||||
// Quincy Ceph version
|
||||
Quincy = CephVersion{17, 0, 0, 0, ""}
|
||||
// Reef Ceph version
|
||||
@@ -52,7 +50,7 @@ var (
|
||||
Squid = CephVersion{19, 0, 0, 0, ""}
|
||||
|
||||
// supportedVersions are production-ready versions that rook supports
|
||||
supportedVersions = []CephVersion{Pacific, Quincy, Reef}
|
||||
supportedVersions = []CephVersion{Quincy, Reef}
|
||||
|
||||
// unsupportedVersions are possibly Ceph pin-point release that introduced breaking changes and not recommended
|
||||
unsupportedVersions []CephVersion
|
||||
@@ -86,8 +84,6 @@ func (v *CephVersion) CephVersionFormatted() string {
|
||||
// ReleaseName is the name of the Ceph release
|
||||
func (v *CephVersion) ReleaseName() string {
|
||||
switch v.Major {
|
||||
case Pacific.Major:
|
||||
return "pacific"
|
||||
case Quincy.Major:
|
||||
return "quincy"
|
||||
case Reef.Major:
|
||||
@@ -169,11 +165,6 @@ func (v *CephVersion) isExactly(other CephVersion) bool {
|
||||
return v.Major == other.Major && v.Minor == other.Minor && v.Extra == other.Extra
|
||||
}
|
||||
|
||||
// IsPacific checks if the Ceph version is Pacific
|
||||
func (v *CephVersion) IsPacific() bool {
|
||||
return v.isRelease(Pacific)
|
||||
}
|
||||
|
||||
// IsQuincy checks if the Ceph version is Quincy
|
||||
func (v *CephVersion) IsQuincy() bool {
|
||||
return v.isRelease(Quincy)
|
||||
|
||||
@@ -50,24 +50,24 @@ func extractVersionHelper(t *testing.T, text string, major, minor, extra, build
|
||||
|
||||
func TestExtractVersion(t *testing.T) {
|
||||
// release build
|
||||
v0c := "ceph version 16.2.6 (ae699615bac534ea496ee965ac6192cb7e0e07c1) pacific (stable)"
|
||||
v0c := "ceph version 18.2.6 (ae699615bac534ea496ee965ac6192cb7e0e07c1) reef (stable)"
|
||||
v0d := `
|
||||
root@7a97f5a78bc6:/# ceph --version
|
||||
ceph version 16.2.6 (ae699615bac534ea496ee965ac6192cb7e0e07c1) pacific (stable)
|
||||
ceph version 18.2.6 (ae699615bac534ea496ee965ac6192cb7e0e07c1) reef (stable)
|
||||
`
|
||||
extractVersionHelper(t, v0c, 16, 2, 6, 0, "ae699615bac534ea496ee965ac6192cb7e0e07c1")
|
||||
extractVersionHelper(t, v0d, 16, 2, 6, 0, "ae699615bac534ea496ee965ac6192cb7e0e07c1")
|
||||
extractVersionHelper(t, v0c, 18, 2, 6, 0, "ae699615bac534ea496ee965ac6192cb7e0e07c1")
|
||||
extractVersionHelper(t, v0d, 18, 2, 6, 0, "ae699615bac534ea496ee965ac6192cb7e0e07c1")
|
||||
|
||||
// development build
|
||||
v1c := "ceph version 16.1.33-403-g7ba6bece41 (7ba6bece4187eda5d05a9b84211fe6ba8dd287bd) pacific (rc)"
|
||||
v1c := "ceph version 18.1.33-403-g7ba6bece41 (7ba6bece4187eda5d05a9b84211fe6ba8dd287bd) reef (rc)"
|
||||
v1d := `
|
||||
bin/ceph --version
|
||||
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
|
||||
ceph version 16.1.33-403-g7ba6bece41
|
||||
(7ba6bece4187eda5d05a9b84211fe6ba8dd287bd) pacific (rc)
|
||||
ceph version 18.1.33-403-g7ba6bece41
|
||||
(7ba6bece4187eda5d05a9b84211fe6ba8dd287bd) reef (rc)
|
||||
`
|
||||
extractVersionHelper(t, v1c, 16, 1, 33, 403, "7ba6bece4187eda5d05a9b84211fe6ba8dd287bd")
|
||||
extractVersionHelper(t, v1d, 16, 1, 33, 403, "7ba6bece4187eda5d05a9b84211fe6ba8dd287bd")
|
||||
extractVersionHelper(t, v1c, 18, 1, 33, 403, "7ba6bece4187eda5d05a9b84211fe6ba8dd287bd")
|
||||
extractVersionHelper(t, v1d, 18, 1, 33, 403, "7ba6bece4187eda5d05a9b84211fe6ba8dd287bd")
|
||||
|
||||
// build without git version info. it is possible to build the ceph tree
|
||||
// without a version number, but none of the container builds do this.
|
||||
@@ -75,7 +75,7 @@ ceph version 16.1.33-403-g7ba6bece41
|
||||
// explicitly adding fine-grained versioning to avoid issues with
|
||||
// release granularity. adding the reverse name-to-version is easy
|
||||
// enough if this ever becomes a need.
|
||||
v2c := "ceph version Development (no_version) pacific (rc)"
|
||||
v2c := "ceph version Development (no_version) reef (rc)"
|
||||
v2d := `
|
||||
bin/ceph --version
|
||||
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
|
||||
@@ -90,11 +90,11 @@ ceph version Development (no_version) quincy (rc)
|
||||
assert.Nil(t, v)
|
||||
|
||||
// Test the round trip for serializing and deserializing the version
|
||||
v3c := "ceph version 16.2.5-1 pacific"
|
||||
v3c := "ceph version 18.2.5-1 reef"
|
||||
v, err = ExtractCephVersion(v3c)
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, v)
|
||||
assert.Equal(t, "16.2.5-1 pacific", v.String())
|
||||
assert.Equal(t, "18.2.5-1 reef", v.String())
|
||||
}
|
||||
|
||||
func TestSupported(t *testing.T) {
|
||||
@@ -105,11 +105,9 @@ func TestSupported(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIsRelease(t *testing.T) {
|
||||
assert.True(t, Pacific.isRelease(Pacific))
|
||||
assert.True(t, Quincy.isRelease(Quincy))
|
||||
assert.True(t, Reef.isRelease(Reef))
|
||||
|
||||
assert.False(t, Pacific.isRelease(Reef))
|
||||
assert.False(t, Reef.isRelease(Quincy))
|
||||
|
||||
QuincyUpdate := Quincy
|
||||
@@ -119,7 +117,7 @@ func TestIsRelease(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIsReleaseX(t *testing.T) {
|
||||
assert.False(t, Pacific.IsQuincy())
|
||||
assert.False(t, Quincy.IsReef())
|
||||
}
|
||||
|
||||
func TestVersionAtLeast(t *testing.T) {
|
||||
@@ -136,7 +134,7 @@ func TestVersionAtLeast(t *testing.T) {
|
||||
|
||||
func TestVersionAtLeastX(t *testing.T) {
|
||||
assert.True(t, Quincy.IsAtLeastQuincy())
|
||||
assert.False(t, Pacific.IsAtLeastQuincy())
|
||||
assert.False(t, Quincy.IsAtLeastReef())
|
||||
}
|
||||
|
||||
func TestIsIdentical(t *testing.T) {
|
||||
@@ -207,7 +205,6 @@ func TestCephVersion_Unsupported(t *testing.T) {
|
||||
fields fields
|
||||
want bool
|
||||
}{
|
||||
{"pacific", fields{Major: 16, Minor: 2, Extra: 1, Build: 0}, false},
|
||||
{"quincy", fields{Major: 17, Minor: 2, Extra: 0, Build: 0}, false},
|
||||
{"reef", fields{Major: 18, Minor: 2, Extra: 0, Build: 0}, false},
|
||||
}
|
||||
|
||||
@@ -42,16 +42,12 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// test with the latest pacific build
|
||||
pacificTestImage = "quay.io/ceph/ceph:v16"
|
||||
// test with the latest quincy build
|
||||
// test with the latest releases
|
||||
quincyTestImage = "quay.io/ceph/ceph:v17"
|
||||
// test with the latest reef build
|
||||
reefTestImage = "quay.io/ceph/ceph:v18"
|
||||
// test with the current development version of Pacific
|
||||
pacificDevelTestImage = "quay.io/ceph/daemon-base:latest-pacific-devel"
|
||||
quincyDevelTestImage = "quay.io/ceph/daemon-base:latest-quincy-devel"
|
||||
reefDevelTestImage = "quay.io/ceph/daemon-base:latest-reef-devel"
|
||||
reefTestImage = "quay.io/ceph/ceph:v18"
|
||||
// test with the current development versions
|
||||
quincyDevelTestImage = "quay.io/ceph/daemon-base:latest-quincy-devel"
|
||||
reefDevelTestImage = "quay.io/ceph/daemon-base:latest-reef-devel"
|
||||
// test with the latest Ceph main image
|
||||
mainTestImage = "quay.io/ceph/daemon-base:latest-main-devel"
|
||||
cephOperatorLabel = "app=rook-ceph-operator"
|
||||
@@ -71,8 +67,6 @@ mon compact on start = true
|
||||
)
|
||||
|
||||
var (
|
||||
PacificVersion = cephv1.CephVersionSpec{Image: pacificTestImage}
|
||||
PacificDevelVersion = cephv1.CephVersionSpec{Image: pacificDevelTestImage}
|
||||
QuincyVersion = cephv1.CephVersionSpec{Image: quincyTestImage}
|
||||
QuincyDevelVersion = cephv1.CephVersionSpec{Image: quincyDevelTestImage}
|
||||
ReefVersion = cephv1.CephVersionSpec{Image: reefTestImage}
|
||||
@@ -99,8 +93,6 @@ func ReturnCephVersion() cephv1.CephVersionSpec {
|
||||
switch os.Getenv("CEPH_SUITE_VERSION") {
|
||||
case "main":
|
||||
return MainVersion
|
||||
case "pacific-devel":
|
||||
return PacificDevelVersion
|
||||
case "quincy-devel":
|
||||
return QuincyDevelVersion
|
||||
case "reef-devel":
|
||||
|
||||
@@ -71,7 +71,7 @@ func (h *HelmSuite) SetupSuite() {
|
||||
ChangeHostName: true,
|
||||
ConnectionsEncrypted: true,
|
||||
RookVersion: installer.LocalBuildTag,
|
||||
CephVersion: installer.PacificVersion,
|
||||
CephVersion: installer.QuincyVersion,
|
||||
}
|
||||
h.settings.ApplyEnvVars()
|
||||
h.installer, h.k8shelper = StartTestCluster(h.T, h.settings)
|
||||
|
||||
@@ -82,7 +82,7 @@ func (s *MultiClusterDeploySuite) SetupSuite() {
|
||||
MultipleMgrs: true,
|
||||
EnableAdmissionController: true,
|
||||
RookVersion: installer.LocalBuildTag,
|
||||
CephVersion: installer.PacificVersion,
|
||||
CephVersion: installer.QuincyVersion,
|
||||
RequireMsgr2: true,
|
||||
}
|
||||
s.settings.ApplyEnvVars()
|
||||
@@ -92,7 +92,7 @@ func (s *MultiClusterDeploySuite) SetupSuite() {
|
||||
Namespace: "multi-external",
|
||||
OperatorNamespace: s.settings.OperatorNamespace,
|
||||
RookVersion: s.settings.RookVersion,
|
||||
CephVersion: installer.PacificVersion,
|
||||
CephVersion: installer.QuincyVersion,
|
||||
}
|
||||
externalSettings.ApplyEnvVars()
|
||||
s.externalManifests = installer.NewCephManifests(externalSettings)
|
||||
|
||||
@@ -97,11 +97,11 @@ func (s *UpgradeSuite) baseSetup(useHelm bool, initialCephVersion v1.CephVersion
|
||||
}
|
||||
|
||||
func (s *UpgradeSuite) TestUpgradeRook() {
|
||||
s.testUpgrade(false, installer.PacificVersion)
|
||||
s.testUpgrade(false, installer.QuincyVersion)
|
||||
}
|
||||
|
||||
func (s *UpgradeSuite) TestUpgradeHelm() {
|
||||
s.testUpgrade(true, installer.PacificVersion)
|
||||
s.testUpgrade(true, installer.QuincyVersion)
|
||||
}
|
||||
|
||||
func (s *UpgradeSuite) testUpgrade(useHelm bool, initialCephVersion v1.CephVersionSpec) {
|
||||
@@ -157,17 +157,6 @@ func (s *UpgradeSuite) testUpgrade(useHelm bool, initialCephVersion v1.CephVersi
|
||||
return
|
||||
}
|
||||
|
||||
//
|
||||
// Upgrade from pacific to quincy
|
||||
//
|
||||
logger.Infof("*** UPGRADING CEPH FROM PACIFIC TO QUINCY ***")
|
||||
s.gatherLogs(s.settings.OperatorNamespace, "_before_quincy_upgrade")
|
||||
s.upgradeCephVersion(installer.QuincyVersion.Image, numOSDs)
|
||||
// Verify reading and writing to the test clients
|
||||
newFile = "post-quincy-upgrade-file"
|
||||
s.verifyFilesAfterUpgrade(newFile, rbdFilesToRead, cephfsFilesToRead)
|
||||
logger.Infof("Verified upgrade from pacific to quincy")
|
||||
|
||||
//
|
||||
// Upgrade from quincy to reef
|
||||
//
|
||||
@@ -215,12 +204,12 @@ func (s *UpgradeSuite) TestUpgradeCephToQuincyDevel() {
|
||||
checkCephObjectUser(&s.Suite, s.helper, s.k8sh, s.namespace, installer.ObjectStoreName, objectUserID, true, false)
|
||||
}
|
||||
|
||||
func (s *UpgradeSuite) TestUpgradeCephToPacificDevel() {
|
||||
s.baseSetup(false, installer.PacificVersion)
|
||||
func (s *UpgradeSuite) TestUpgradeCephToReefDevel() {
|
||||
s.baseSetup(false, installer.ReefVersion)
|
||||
|
||||
objectUserID := "upgraded-user"
|
||||
preFilename := "pre-upgrade-file"
|
||||
s.settings.CephVersion = installer.PacificVersion
|
||||
s.settings.CephVersion = installer.ReefVersion
|
||||
numOSDs, rbdFilesToRead, cephfsFilesToRead := s.deployClusterforUpgrade(objectUserID, preFilename)
|
||||
clusterInfo := client.AdminTestClusterInfo(s.namespace)
|
||||
requireBlockImagesRemoved := false
|
||||
@@ -235,15 +224,15 @@ func (s *UpgradeSuite) TestUpgradeCephToPacificDevel() {
|
||||
}()
|
||||
|
||||
//
|
||||
// Upgrade from pacific to pacific devel
|
||||
// Upgrade from reef to reef devel
|
||||
//
|
||||
logger.Infof("*** UPGRADING CEPH FROM PACIFIC STABLE TO PACIFIC DEVEL ***")
|
||||
s.gatherLogs(s.settings.OperatorNamespace, "_before_pacific_upgrade")
|
||||
s.upgradeCephVersion(installer.PacificDevelVersion.Image, numOSDs)
|
||||
logger.Infof("*** UPGRADING CEPH FROM REEF STABLE TO REEF DEVEL ***")
|
||||
s.gatherLogs(s.settings.OperatorNamespace, "_before_reef_upgrade")
|
||||
s.upgradeCephVersion(installer.ReefDevelVersion.Image, numOSDs)
|
||||
// Verify reading and writing to the test clients
|
||||
newFile := "post-pacific-upgrade-file"
|
||||
newFile := "post-reef-upgrade-file"
|
||||
s.verifyFilesAfterUpgrade(newFile, rbdFilesToRead, cephfsFilesToRead)
|
||||
logger.Infof("verified upgrade from pacific stable to pacific devel")
|
||||
logger.Infof("verified upgrade from reef stable to reef devel")
|
||||
|
||||
checkCephObjectUser(&s.Suite, s.helper, s.k8sh, s.namespace, installer.ObjectStoreName, objectUserID, true, false)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user