ceph: remove ceph nautilus, ceph octopus to default
since rook 1.8, ceph nautilus no longer supported, ceph octopus will be the minimum ceph version. Closes: https://github.com/rook/rook/issues/7908 Signed-off-by: subhamkrai <srai@redhat.com>
This commit is contained in:
1 parent
d7213c086b
commit
0150966024
50 files changed
+153
-307
No files matched your search
@@ -170,9 +170,9 @@ Settings can be specified at the global level to apply to the cluster as a whole
|
||||
* `image`: The image used for running the ceph daemons. For example, `quay.io/ceph/ceph:v15.2.12` or `v16.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 `v14` will be updated each time a new nautilus build is released.
|
||||
Using the `v14` or similar 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 `nautilus`, `octopus`, and `pacific` are supported. Future versions such as `quincy` would require this to be set to `true`. Should be set to `false` in production.
|
||||
Tags also exist that would give the latest version, but they are only recommended for test environments. For example, the tag `v15` will be updated each time a new Octopus build is released.
|
||||
Using the `v15` or similar 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 `octopus` and `pacific` are supported. Future versions such as `quincy` would require this to be set to `true`. Should be set to `false` in production.
|
||||
* `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`.
|
||||
* On **Minikube** environments, use `/data/rook`. Minikube boots into a tmpfs but it provides some [directories](https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/persistent_volumes.md#a-note-on-mounts-persistence-and-minikube-hosts) where files can be persisted across reboots. Using one of these directories will ensure that Rook's data and configuration files are persisted and that enough storage space is available.
|
||||
* **WARNING**: For test scenarios, if you delete a cluster and start a new cluster on the same hosts, the path used by `dataDirHostPath` must be deleted. Otherwise, stale keys and other config will remain from the previous cluster and the new mons will fail to start.
|
||||
@@ -238,10 +238,10 @@ These are general purpose Ceph container with all necessary daemons and dependen
|
||||
|
||||
| TAG | MEANING |
|
||||
| -------------------- | --------------------------------------------------------- |
|
||||
| vRELNUM | Latest release in this series (e.g., *v14* = Nautilus) |
|
||||
| vRELNUM.Y | Latest stable release in this stable series (e.g., v14.2) |
|
||||
| vRELNUM.Y.Z | A specific release (e.g., v14.2.5) |
|
||||
| vRELNUM.Y.Z-YYYYMMDD | A specific build (e.g., v14.2.5-20191203) |
|
||||
| vRELNUM | Latest release in this series (e.g., *v15* = Octopus) |
|
||||
| vRELNUM.Y | Latest stable release in this stable series (e.g., v15.2) |
|
||||
| vRELNUM.Y.Z | A specific release (e.g., v15.2.5) |
|
||||
| vRELNUM.Y.Z-YYYYMMDD | A specific build (e.g., v15.2.11-20200419) |
|
||||
|
||||
A specific will contain a specific release of Ceph as well as security fixes from the Operating System.
|
||||
|
||||
|
||||
@@ -34,19 +34,18 @@ capable of automatically managing PG and PGP values for pools. Please see
|
||||
[Ceph New in Nautilus: PG merging and autotuning](https://ceph.io/rados/new-in-nautilus-pg-merging-and-autotuning/)
|
||||
for more information about this module.
|
||||
|
||||
In Nautilus, This module is not enabled by default, but can be enabled by the following setting
|
||||
in the [CephCluster CR](ceph-cluster-crd.md#mgr-settings):
|
||||
In Octopus (v15.2.x) and newer, module `pg_autoscaler` is enabled by default without the above-mentioned setting.
|
||||
|
||||
To disable this module, in the [CephCluster CR](ceph-cluster-crd.md#mgr-settings):
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
mgr:
|
||||
modules:
|
||||
- name: pg_autoscaler
|
||||
enabled: true
|
||||
enabled: false
|
||||
```
|
||||
|
||||
In Octopus (v15.2.x) and newer, this module is enabled by default without the above-mentioned setting.
|
||||
|
||||
With that setting, the autoscaler will be enabled for all new pools. If you do not desire to have
|
||||
the autoscaler enabled for all new pools, you will need to use the Rook toolbox to enable the module
|
||||
and [enable the autoscaling](https://docs.ceph.com/docs/master/rados/operations/placement-groups/)
|
||||
|
||||
@@ -402,11 +402,9 @@ To migrate the setting, follow these steps:
|
||||
Rook v1.7 supports the following Ceph versions:
|
||||
- Ceph Pacific 16.2.0 or newer
|
||||
- Ceph Octopus v15.2.0 or newer
|
||||
- Ceph Nautilus 14.2.5 or newer
|
||||
|
||||
These are the only supported versions of Ceph. Rook v1.8 will no longer support Ceph Nautilus
|
||||
(14.2.x), and users will have to upgrade Ceph to Octopus (15.2.x) or Pacific (16.2.x) upgrading to
|
||||
Rook v1.8.
|
||||
These are the only supported versions of Ceph. Rook v1.8 no longer supports Ceph Nautilus
|
||||
(14.2.x), and users will have to upgrade Ceph to Octopus (15.2.x) or Pacific (16.2.x) before upgrading to Rook v1.8.
|
||||
|
||||
> **IMPORTANT: When an update is requested, the operator will check Ceph's status, if it is in `HEALTH_ERR` it will refuse to do the upgrade.**
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ The following tables lists the configurable parameters of the rook-operator char
|
||||
| `csi.volumeReplication.image` | Volume Replication Controller image. | `quay.io/csiaddons/volumereplication-operator:v0.1.0` |
|
||||
| `admissionController.tolerations` | Array of tolerations in YAML format which will be added to admission controller deployment. | <none> |
|
||||
| `admissionController.nodeAffinity` | The node labels for affinity of the admission controller deployment (***) | <none> |
|
||||
| `allowMultipleFilesystems` | **(experimental)** Allows multiple filesystems to be deployed to a Ceph cluster. Octopus (v15) or Nautilus (v14) | `false` |
|
||||
| `allowMultipleFilesystems` | **(experimental in Octopus (v15))** Allows multiple filesystems to be deployed to a Ceph cluster. | `false` |
|
||||
|
||||
* * * `nodeAffinity` and `*NodeAffinity` options should have the format `"role=storage,rook; storage=ceph"` or `storage=;role=rook-example` or `storage=;` (_checks only for presence of key_)
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ pspEnable: true
|
||||
cephClusterSpec:
|
||||
cephVersion:
|
||||
# The container image used to launch the Ceph daemon pods (mon, mgr, osd, mds, rgw).
|
||||
# v14 is nautilus, v15 is octopus, and v16 is pacific.
|
||||
# RECOMMENDATION: In production, use a specific version tag instead of the general v14 flag, which pulls the latest release and could result in different
|
||||
# v15 is octopus, and v16 is pacific.
|
||||
# RECOMMENDATION: In production, use a specific version tag instead of the general v16 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
|
||||
# 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:v16.2.6
|
||||
# Whether to allow unsupported versions of Ceph. Currently `nautilus` and `octopus` are supported.
|
||||
# Whether to allow unsupported versions of Ceph. Currently `octopus` and `pacific` are supported.
|
||||
# Future versions such as `pacific` would require this to be set to `true`.
|
||||
# Do not set to true in production.
|
||||
allowUnsupported: false
|
||||
|
||||
@@ -299,7 +299,7 @@ enableDiscoveryDaemon: false
|
||||
cephCommandsTimeoutSeconds: "15"
|
||||
|
||||
# enable the ability to have multiple Ceph filesystems in the same cluster
|
||||
# WARNING: Experimental feature in Ceph Releases Octopus (v15) and Nautilus (v14)
|
||||
# WARNING: Experimental feature in Ceph Releases Octopus (v15)
|
||||
# https://docs.ceph.com/en/octopus/cephfs/experimental-features/#multiple-file-systems-within-a-ceph-cluster
|
||||
allowMultipleFilesystems: false
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ metadata:
|
||||
spec:
|
||||
cephVersion:
|
||||
# The container image used to launch the Ceph daemon pods (mon, mgr, osd, mds, rgw).
|
||||
# v14 is nautilus, v15 is octopus, and v16 is pacific.
|
||||
# RECOMMENDATION: In production, use a specific version tag instead of the general v16 flag, which pulls the latest release and could result in different
|
||||
# v15 is octopus, and v16 is pacific.
|
||||
# RECOMMENDATION: In production, use a specific version tag instead of the general v14 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:v16.2.6-20210918
|
||||
# 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:v16.2.6
|
||||
# Whether to allow unsupported versions of Ceph. Currently `nautilus`, `octopus`, and `pacific` are supported.
|
||||
# Whether to allow unsupported versions of Ceph. Currently `octopus` and `pacific` are supported.
|
||||
# Future versions such as `pacific` would require this to be set to `true`.
|
||||
# Do not set to true in production.
|
||||
allowUnsupported: false
|
||||
|
||||
@@ -18,7 +18,6 @@ allowHostNetwork: false
|
||||
allowHostPorts: false
|
||||
priority:
|
||||
allowedCapabilities: []
|
||||
allowHostPID: true # remove this once we drop support for Nautilus
|
||||
allowHostIPC: true
|
||||
readOnlyRootFilesystem: false
|
||||
requiredDropCapabilities: []
|
||||
|
||||
@@ -38,9 +38,8 @@ func NewSecurityContextConstraints(name, namespace string) *secv1.SecurityContex
|
||||
Namespace: namespace,
|
||||
},
|
||||
AllowPrivilegedContainer: true,
|
||||
// TODO: remove me once Nautilus is not supported anymore
|
||||
AllowHostIPC: true,
|
||||
ReadOnlyRootFilesystem: false,
|
||||
AllowHostIPC: true,
|
||||
AllowHostNetwork: false,
|
||||
AllowHostPorts: false,
|
||||
RequiredDropCapabilities: []corev1.Capability{},
|
||||
|
||||
@@ -44,7 +44,7 @@ func TestCreateDefaultCephConfig(t *testing.T) {
|
||||
"node0": {Name: "mon0", Endpoint: "10.0.0.1:6789"},
|
||||
"node1": {Name: "mon1", Endpoint: "10.0.0.2:6789"},
|
||||
},
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
|
||||
// start with INFO level logging
|
||||
@@ -100,7 +100,7 @@ func TestGenerateConfigFile(t *testing.T) {
|
||||
Monitors: map[string]*MonInfo{
|
||||
"node0": {Name: "mon0", Endpoint: "10.0.0.1:6789"},
|
||||
},
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
CephCred: CephCred{Username: "admin", Secret: "mysecret"},
|
||||
Context: ctx,
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ func TestEnableReleaseOSDFunctionality(t *testing.T) {
|
||||
}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
|
||||
err := EnableReleaseOSDFunctionality(context, AdminClusterInfo("mycluster"), "nautilus")
|
||||
err := EnableReleaseOSDFunctionality(context, AdminClusterInfo("mycluster"), "octopus")
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
|
||||
@@ -126,13 +126,7 @@ func killCephOSDProcess(context *clusterd.Context, lvPath string) error {
|
||||
|
||||
// shut down the osd-ceph process so that lvm release does not show device in use error.
|
||||
if pid != "" {
|
||||
// The OSD needs to exit as quickly as possible in order for the IO requests
|
||||
// to be redirected to other OSDs in the cluster. The OSD is designed to tolerate failures
|
||||
// of any kind, including power loss or kill -9. The upstream Ceph tests have for many years
|
||||
// been testing with kill -9 so this is expected to be safe. There is a fix upstream Ceph that will
|
||||
// improve the shutdown time of the OSD. For cleanliness we should consider removing the -9
|
||||
// once it is backported to Nautilus: https://github.com/ceph/ceph/pull/31677.
|
||||
if err := context.Executor.ExecuteCommand("kill", "-9", pid); err != nil {
|
||||
if err := context.Executor.ExecuteCommand("kill", pid); err != nil {
|
||||
return errors.Wrap(err, "failed to kill ceph-osd process")
|
||||
}
|
||||
}
|
||||
@@ -317,13 +311,6 @@ func getAvailableDevices(context *clusterd.Context, agent *OsdAgent) (*DeviceOsd
|
||||
}
|
||||
|
||||
if device.Type == sys.PartType {
|
||||
// If we detect a partition we have to make sure that ceph-volume will be able to consume it
|
||||
// ceph-volume version 14.2.8 has the right code to support partitions
|
||||
if !agent.clusterInfo.CephVersion.IsAtLeast(cephVolumeRawModeMinCephVersion) {
|
||||
logger.Infof("skipping device %q because it is a partition and ceph version is too old %q, you need at least ceph %q", device.Name, agent.clusterInfo.CephVersion.String(), cephVolumeRawModeMinCephVersion.String())
|
||||
continue
|
||||
}
|
||||
|
||||
device, err := clusterd.PopulateDeviceUdevInfo(device.Name, context.Executor, device)
|
||||
if err != nil {
|
||||
logger.Errorf("failed to get udev info of partition %q. %v", device.Name, err)
|
||||
|
||||
@@ -290,12 +290,6 @@ NAME="sdb1" SIZE="30" TYPE="part" PKNAME="sdb"`, nil
|
||||
assert.NotContains(t, mapping.Entries, "sdc") // sdc is too small
|
||||
assert.NotContains(t, mapping.Entries, "sdv1") // sdv1 has a filesystem
|
||||
|
||||
// Partition is skipped
|
||||
agent.clusterInfo.CephVersion = cephver.Nautilus
|
||||
mapping, err = getAvailableDevices(context, agent)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, 6, len(mapping.Entries))
|
||||
|
||||
// Do not skip partition anymore
|
||||
agent.clusterInfo.CephVersion = cephver.Octopus
|
||||
|
||||
|
||||
@@ -54,9 +54,8 @@ var (
|
||||
lvmConfPath = "/etc/lvm/lvm.conf"
|
||||
cvLogDir = ""
|
||||
// The "ceph-volume raw" command is available since Ceph 14.2.8 as well as partition support in ceph-volume
|
||||
cephVolumeRawModeMinCephVersion = cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}
|
||||
// The Ceph Nautilus to include a retry to acquire device lock
|
||||
cephFlockFixNautilusMinCephVersion = cephver.CephVersion{Major: 14, Minor: 2, Extra: 14}
|
||||
cephVolumeRawModeMinCephVersion = cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}
|
||||
|
||||
// The Ceph Octopus to include a retry to acquire device lock
|
||||
cephFlockFixOctopusMinCephVersion = cephver.CephVersion{Major: 15, Minor: 2, Extra: 9}
|
||||
isEncrypted = os.Getenv(oposd.EncryptedDeviceEnvVarName) == "true"
|
||||
@@ -104,10 +103,6 @@ type cephVolReportV2 struct {
|
||||
}
|
||||
|
||||
func isNewStyledLvmBatch(version cephver.CephVersion) bool {
|
||||
if version.IsNautilus() && version.IsAtLeast(cephver.CephVersion{Major: 14, Minor: 2, Extra: 13}) {
|
||||
return true
|
||||
}
|
||||
|
||||
if version.IsOctopus() && version.IsAtLeast(cephver.CephVersion{Major: 15, Minor: 2, Extra: 8}) {
|
||||
return true
|
||||
}
|
||||
@@ -490,13 +485,6 @@ func (a *OsdAgent) useRawMode(context *clusterd.Context, pvcBacked bool) (bool,
|
||||
}
|
||||
|
||||
var useRawMode bool
|
||||
// Can we safely use ceph-volume raw mode in the non-PVC case?
|
||||
// On non-PVC we see a race between systemd-udev and the osd process to acquire the lock on the device
|
||||
if a.clusterInfo.CephVersion.IsNautilus() && a.clusterInfo.CephVersion.IsAtLeast(cephFlockFixNautilusMinCephVersion) {
|
||||
logger.Debugf("will use raw mode since cluster version is at least %v", cephFlockFixNautilusMinCephVersion)
|
||||
useRawMode = true
|
||||
}
|
||||
|
||||
if a.clusterInfo.CephVersion.IsOctopus() && a.clusterInfo.CephVersion.IsAtLeast(cephFlockFixOctopusMinCephVersion) {
|
||||
logger.Debugf("will use raw mode since cluster version is at least %v", cephFlockFixOctopusMinCephVersion)
|
||||
useRawMode = true
|
||||
|
||||
@@ -384,7 +384,7 @@ func TestConfigureCVDevices(t *testing.T) {
|
||||
}
|
||||
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8},
|
||||
CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0},
|
||||
FSID: clusterFSID,
|
||||
Context: context.TODO(),
|
||||
}
|
||||
@@ -471,7 +471,7 @@ func TestConfigureCVDevices(t *testing.T) {
|
||||
|
||||
context := &clusterd.Context{Executor: executor, ConfigDir: cephConfigDir}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}, // It supports raw mode OSD
|
||||
CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}, // It supports raw mode OSD
|
||||
FSID: clusterFSID,
|
||||
}
|
||||
agent := &OsdAgent{clusterInfo: clusterInfo, nodeName: nodeName, pvcBacked: true}
|
||||
@@ -542,7 +542,7 @@ func TestConfigureCVDevices(t *testing.T) {
|
||||
|
||||
context := &clusterd.Context{Executor: executor, ConfigDir: cephConfigDir}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}, // It supports raw mode OSD
|
||||
CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}, // It supports raw mode OSD
|
||||
FSID: clusterFSID,
|
||||
}
|
||||
agent := &OsdAgent{clusterInfo: clusterInfo, nodeName: nodeName, pvcBacked: true}
|
||||
@@ -699,7 +699,7 @@ func TestInitializeBlock(t *testing.T) {
|
||||
|
||||
return errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}}, nodeName: "node1"}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}}, nodeName: "node1"}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
|
||||
err := a.initializeDevicesLVMMode(context, devices)
|
||||
@@ -731,7 +731,7 @@ func TestInitializeBlock(t *testing.T) {
|
||||
|
||||
return errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}}, nodeName: "node1", storeConfig: config.StoreConfig{EncryptedDevice: true}}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}}, nodeName: "node1", storeConfig: config.StoreConfig{EncryptedDevice: true}}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
|
||||
err := a.initializeDevicesLVMMode(context, devices)
|
||||
@@ -763,7 +763,7 @@ func TestInitializeBlock(t *testing.T) {
|
||||
|
||||
return errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}}, nodeName: "node1", storeConfig: config.StoreConfig{OSDsPerDevice: 3}}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}}, nodeName: "node1", storeConfig: config.StoreConfig{OSDsPerDevice: 3}}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
|
||||
err := a.initializeDevicesLVMMode(context, devices)
|
||||
@@ -795,7 +795,7 @@ func TestInitializeBlock(t *testing.T) {
|
||||
|
||||
return errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}}, nodeName: "node1", storeConfig: config.StoreConfig{DeviceClass: "hybrid"}}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}}, nodeName: "node1", storeConfig: config.StoreConfig{DeviceClass: "hybrid"}}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
err := a.initializeDevicesLVMMode(context, devices)
|
||||
assert.NoError(t, err, "failed crush device class test")
|
||||
@@ -849,7 +849,7 @@ func TestInitializeBlock(t *testing.T) {
|
||||
|
||||
return "", errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}}, nodeName: "node1"}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}}, nodeName: "node1"}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
|
||||
err := a.initializeDevicesLVMMode(context, devices)
|
||||
@@ -904,7 +904,7 @@ func TestInitializeBlock(t *testing.T) {
|
||||
|
||||
return "", errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}}, nodeName: "node1"}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}}, nodeName: "node1"}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
|
||||
err := a.initializeDevicesLVMMode(context, devices)
|
||||
@@ -924,10 +924,10 @@ func TestInitializeBlockPVC(t *testing.T) {
|
||||
return "", errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
|
||||
// Test with CephVersion{Major: 14, Minor: 2, Extra: 8} for argument raw without flag --crush-device-class.
|
||||
// Test with CephVersion{Major: 15, Minor: 2, Extra: 0} for argument raw without flag --crush-device-class.
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8},
|
||||
CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0},
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: clusterInfo, nodeName: "node1"}
|
||||
devices := &DeviceOsdMapping{
|
||||
@@ -943,7 +943,7 @@ func TestInitializeBlockPVC(t *testing.T) {
|
||||
assert.Equal(t, "", walBlockPath)
|
||||
|
||||
// Test for failure scenario by giving CephVersion{Major: 14, Minor: 2, Extra: 7}
|
||||
// instead of CephVersion{Major: 14, Minor: 2, Extra: 8}.
|
||||
// instead of CephVersion{Major: 15, Minor: 2, Extra: 0}.
|
||||
clusterInfo = &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 7},
|
||||
}
|
||||
@@ -983,10 +983,10 @@ func TestInitializeBlockPVC(t *testing.T) {
|
||||
assert.Equal(t, "", metadataBlockPath)
|
||||
assert.Equal(t, "", walBlockPath)
|
||||
|
||||
// Test for failure scenario by giving CephVersion{Major: 14, Minor: 2, Extra: 8}
|
||||
// Test for failure scenario by giving CephVersion{Major: 15, Minor: 2, Extra: 0}
|
||||
// instead of cephver.CephVersion{Major: 14, Minor: 2, Extra: 7}.
|
||||
clusterInfo = &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8},
|
||||
CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0},
|
||||
}
|
||||
a = &OsdAgent{clusterInfo: clusterInfo, nodeName: "node1"}
|
||||
devices = &DeviceOsdMapping{
|
||||
@@ -1027,11 +1027,11 @@ func TestInitializeBlockPVC(t *testing.T) {
|
||||
|
||||
return "", errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
// Test with CephVersion{Major: 14, Minor: 2, Extra: 8} for argument raw with flag --crush-device-class.
|
||||
// Test with CephVersion{Major: 15, Minor: 2, Extra: 0} for argument raw with flag --crush-device-class.
|
||||
os.Setenv(oposd.CrushDeviceClassVarName, "foo")
|
||||
defer os.Unsetenv(oposd.CrushDeviceClassVarName)
|
||||
clusterInfo = &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8},
|
||||
CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0},
|
||||
}
|
||||
a = &OsdAgent{clusterInfo: clusterInfo, nodeName: "node1"}
|
||||
devices = &DeviceOsdMapping{
|
||||
@@ -1046,7 +1046,7 @@ func TestInitializeBlockPVC(t *testing.T) {
|
||||
assert.Equal(t, "", metadataBlockPath)
|
||||
assert.Equal(t, "", walBlockPath)
|
||||
|
||||
// Test for condition when Data !=-1 with CephVersion{Major: 14, Minor: 2, Extra: 8} for raw with flag --crush-device-class.
|
||||
// Test for condition when Data !=-1 with CephVersion{Major: 15, Minor: 2, Extra: 0} for raw with flag --crush-device-class.
|
||||
devices = &DeviceOsdMapping{
|
||||
Entries: map[string]*DeviceOsdIDEntry{
|
||||
"data": {Data: 0, Metadata: nil, Config: DesiredDevice{Name: "/mnt/set1-data-0-rpf2k"}},
|
||||
@@ -1070,10 +1070,10 @@ func TestInitializeBlockPVCWithMetadata(t *testing.T) {
|
||||
return "", errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
|
||||
// Test with CephVersion{Major: 14, Minor: 2, Extra: 8} for argument raw with flag --block.db and without --crush-device-class flag.
|
||||
// Test with CephVersion{Major: 15, Minor: 2, Extra: 0} for argument raw with flag --block.db and without --crush-device-class flag.
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8},
|
||||
CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0},
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: clusterInfo, nodeName: "node1"}
|
||||
|
||||
@@ -1128,12 +1128,12 @@ func TestInitializeBlockPVCWithMetadata(t *testing.T) {
|
||||
return "", errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
|
||||
// Test with CephVersion{Major: 14, Minor: 2, Extra: 8} for argument raw with flag --block.db and --crush-device-class flag.
|
||||
// Test with CephVersion{Major: 15, Minor: 2, Extra: 0} for argument raw with flag --block.db and --crush-device-class flag.
|
||||
os.Setenv(oposd.CrushDeviceClassVarName, "foo")
|
||||
defer os.Unsetenv(oposd.CrushDeviceClassVarName)
|
||||
context = &clusterd.Context{Executor: executor}
|
||||
clusterInfo = &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8},
|
||||
CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 0},
|
||||
}
|
||||
a = &OsdAgent{clusterInfo: clusterInfo, nodeName: "node1"}
|
||||
|
||||
@@ -1328,8 +1328,8 @@ Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyr
|
||||
}
|
||||
|
||||
func TestIsNewStyledLvmBatch(t *testing.T) {
|
||||
newStyleLvmBatchVersion := cephver.CephVersion{Major: 14, Minor: 2, Extra: 15}
|
||||
legacyLvmBatchVersion := cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}
|
||||
newStyleLvmBatchVersion := cephver.CephVersion{Major: 15, Minor: 2, Extra: 15}
|
||||
legacyLvmBatchVersion := cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}
|
||||
assert.Equal(t, true, isNewStyledLvmBatch(newStyleLvmBatchVersion))
|
||||
assert.Equal(t, false, isNewStyledLvmBatch(legacyLvmBatchVersion))
|
||||
}
|
||||
@@ -1368,7 +1368,7 @@ func TestInitializeBlockWithMD(t *testing.T) {
|
||||
|
||||
return "", errors.Errorf("unknown command %s %s", command, args)
|
||||
}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 15}}, nodeName: "node1"}
|
||||
a := &OsdAgent{clusterInfo: &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 10}}, nodeName: "node1"}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
|
||||
err := a.initializeDevicesLVMMode(context, devices)
|
||||
@@ -1434,18 +1434,13 @@ func TestUseRawMode(t *testing.T) {
|
||||
want bool
|
||||
wantErr bool
|
||||
}{
|
||||
{"on pvc with lvm", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 5}}, "", config.StoreConfig{}, true}, args{&clusterd.Context{}, true}, false, false},
|
||||
{"on pvc with raw", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 8}}, "", config.StoreConfig{}, true}, args{&clusterd.Context{}, true}, true, false},
|
||||
{"non-pvc with lvm nautilus", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 13}}, "", config.StoreConfig{}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
{"on pvc with lvm", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 5}}, "", config.StoreConfig{}, true}, args{&clusterd.Context{}, true}, true, false},
|
||||
{"on pvc with raw", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 9}}, "", config.StoreConfig{}, true}, args{&clusterd.Context{}, true}, true, false},
|
||||
{"non-pvc with lvm octopus", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 8}}, "", config.StoreConfig{}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
{"non-pvc with raw nautilus simple scenario supported", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 14}}, "", config.StoreConfig{}, false}, args{&clusterd.Context{}, false}, true, false},
|
||||
{"non-pvc with raw octopus simple scenario supported", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 9}}, "", config.StoreConfig{}, false}, args{&clusterd.Context{}, false}, true, false},
|
||||
{"non-pvc with raw pacific simple scenario supported", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 16, Minor: 2, Extra: 1}}, "", config.StoreConfig{}, false}, args{&clusterd.Context{}, false}, true, false},
|
||||
{"non-pvc with lvm nautilus complex scenario not supported: encrypted", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 14}}, "", config.StoreConfig{EncryptedDevice: true}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
{"non-pvc with lvm octopus complex scenario not supported: encrypted", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 9}}, "", config.StoreConfig{EncryptedDevice: true}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
{"non-pvc with lvm nautilus complex scenario not supported: osd per device > 1", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 14}}, "", config.StoreConfig{OSDsPerDevice: 2}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
{"non-pvc with lvm octopus complex scenario not supported: osd per device > 1", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 9}}, "", config.StoreConfig{OSDsPerDevice: 2}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
{"non-pvc with lvm nautilus complex scenario not supported: metadata dev", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 14}}, "/dev/sdb", config.StoreConfig{}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
{"non-pvc with lvm octopus complex scenario not supported: metadata dev", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 9}}, "/dev/sdb", config.StoreConfig{}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
{"non-pvc with lvm pacific complex scenario not supported: metadata dev", fields{&cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 16, Minor: 2, Extra: 1}}, "/dev/sdb", config.StoreConfig{}, false}, args{&clusterd.Context{}, false}, false, false},
|
||||
}
|
||||
|
||||
@@ -208,8 +208,7 @@ func (c *Cluster) createSelfSignedCert() (bool, error) {
|
||||
|
||||
// FileBasedPasswordSupported check if Ceph versions have the latest Ceph dashboard command
|
||||
func FileBasedPasswordSupported(c *client.ClusterInfo) bool {
|
||||
if (c.CephVersion.IsNautilus() && c.CephVersion.IsAtLeast(cephver.CephVersion{Major: 14, Minor: 2, Extra: 17})) ||
|
||||
(c.CephVersion.IsOctopus() && c.CephVersion.IsAtLeast(cephver.CephVersion{Major: 15, Minor: 2, Extra: 10})) ||
|
||||
if (c.CephVersion.IsOctopus() && c.CephVersion.IsAtLeast(cephver.CephVersion{Major: 15, Minor: 2, Extra: 10})) ||
|
||||
c.CephVersion.IsAtLeastPacific() {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ func TestStartSecureDashboard(t *testing.T) {
|
||||
ownerInfo := cephclient.NewMinimumOwnerInfoWithOwnerRef()
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "myns",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
OwnerInfo: ownerInfo,
|
||||
Context: ctx,
|
||||
}
|
||||
@@ -160,10 +160,9 @@ func TestStartSecureDashboard(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFileBasedPasswordSupported(t *testing.T) {
|
||||
// for Ceph version Nautilus 14.2.17
|
||||
clusterInfo := &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 17}}
|
||||
clusterInfo := &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 9}}
|
||||
value := FileBasedPasswordSupported(clusterInfo)
|
||||
assert.True(t, value)
|
||||
assert.False(t, value)
|
||||
|
||||
// for Ceph version Octopus 15.2.10
|
||||
clusterInfo = &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 10}}
|
||||
@@ -179,9 +178,4 @@ func TestFileBasedPasswordSupported(t *testing.T) {
|
||||
clusterInfo = &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 17, Minor: 0, Extra: 0}}
|
||||
value = FileBasedPasswordSupported(clusterInfo)
|
||||
assert.True(t, value)
|
||||
|
||||
// for other Ceph Versions
|
||||
clusterInfo = &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 15}}
|
||||
value = FileBasedPasswordSupported(clusterInfo)
|
||||
assert.False(t, value)
|
||||
}
|
||||
@@ -47,7 +47,7 @@ func TestOrchestratorModules(t *testing.T) {
|
||||
}
|
||||
executor.MockExecuteCommandWithTimeout = func(timeout time.Duration, command string, args ...string) (string, error) {
|
||||
logger.Infof("Command: %s %v", command, args)
|
||||
if args[0] == "orchestrator" && args[1] == "set" && args[2] == "backend" && args[3] == "rook" {
|
||||
if args[0] == "orch" && args[1] == "set" && args[2] == "backend" && args[3] == "rook" {
|
||||
if backendErrorCount < 5 {
|
||||
backendErrorCount++
|
||||
return "", errors.New("test simulation failure")
|
||||
@@ -59,7 +59,7 @@ func TestOrchestratorModules(t *testing.T) {
|
||||
}
|
||||
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
Context: context.TODO(),
|
||||
}
|
||||
context := &clusterd.Context{Executor: executor}
|
||||
@@ -86,10 +86,10 @@ func TestOrchestratorModules(t *testing.T) {
|
||||
assert.True(t, rookModuleEnabled)
|
||||
assert.True(t, rookBackendSet)
|
||||
|
||||
// Simulate the error because of the CLI name change
|
||||
c.clusterInfo.CephVersion = cephver.Octopus
|
||||
c.clusterInfo.CephVersion = cephver.Pacific
|
||||
err = c.setRookOrchestratorBackend()
|
||||
assert.Error(t, err)
|
||||
// No error because there is no CLI change(in Nautilus arg[0] was "orchestrator" but since Octopus it is "orch")
|
||||
assert.NoError(t, err)
|
||||
executor.MockExecuteCommandWithTimeout = func(timeout time.Duration, command string, args ...string) (string, error) {
|
||||
logger.Infof("Command: %s %v", command, args)
|
||||
if args[0] == "orch" && args[1] == "set" && args[2] == "backend" && args[3] == "rook" {
|
||||
|
||||
@@ -183,13 +183,13 @@ func TestStartMonPods(t *testing.T) {
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
|
||||
// start a basic cluster
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
|
||||
validateStart(t, c)
|
||||
|
||||
// starting again should be a no-op
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
|
||||
validateStart(t, c)
|
||||
@@ -203,7 +203,7 @@ func TestOperatorRestart(t *testing.T) {
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
|
||||
// start a basic cluster
|
||||
info, err := c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
info, err := c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, info.IsInitialized(true))
|
||||
|
||||
@@ -213,7 +213,7 @@ func TestOperatorRestart(t *testing.T) {
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
|
||||
// starting again should be a no-op, but will not result in an error
|
||||
info, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
info, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, info.IsInitialized(true))
|
||||
|
||||
@@ -231,7 +231,7 @@ func TestOperatorRestartHostNetwork(t *testing.T) {
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
|
||||
// start a basic cluster
|
||||
info, err := c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
info, err := c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, info.IsInitialized(true))
|
||||
|
||||
@@ -243,7 +243,7 @@ func TestOperatorRestartHostNetwork(t *testing.T) {
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
|
||||
// starting again should be a no-op, but still results in an error
|
||||
info, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
info, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, info.IsInitialized(true), info)
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ func TestHostNetworkSameNode(t *testing.T) {
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
|
||||
// start a basic cluster
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ func TestPodMemory(t *testing.T) {
|
||||
c := newCluster(context, namespace, true, r)
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
// start a basic cluster
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Test REQUEST == LIMIT
|
||||
@@ -120,7 +120,7 @@ func TestPodMemory(t *testing.T) {
|
||||
c = newCluster(context, namespace, true, r)
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
// start a basic cluster
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Test LIMIT != REQUEST but obviously LIMIT > REQUEST
|
||||
@@ -136,7 +136,7 @@ func TestPodMemory(t *testing.T) {
|
||||
c = newCluster(context, namespace, true, r)
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
// start a basic cluster
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Test valid case where pod resource is set appropriately
|
||||
@@ -152,7 +152,7 @@ func TestPodMemory(t *testing.T) {
|
||||
c = newCluster(context, namespace, true, r)
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
// start a basic cluster
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Test no resources were specified on the pod
|
||||
@@ -160,7 +160,7 @@ func TestPodMemory(t *testing.T) {
|
||||
c = newCluster(context, namespace, true, r)
|
||||
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
|
||||
// start a basic cluster
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Nautilus, c.spec)
|
||||
_, err = c.Start(c.ClusterInfo, c.rookVersion, cephver.Octopus, c.spec)
|
||||
assert.NoError(t, err)
|
||||
|
||||
}
|
||||
|
||||
@@ -76,14 +76,3 @@ func generateDmCryptKey() (string, error) {
|
||||
|
||||
return base64.StdEncoding.EncodeToString(key), nil
|
||||
}
|
||||
|
||||
func (c *Cluster) isCephVolumeRawModeSupported() bool {
|
||||
if c.clusterInfo.CephVersion.IsAtLeast(cephVolumeRawEncryptionModeMinNautilusCephVersion) && !c.clusterInfo.CephVersion.IsOctopus() {
|
||||
return true
|
||||
}
|
||||
if c.clusterInfo.CephVersion.IsAtLeast(cephVolumeRawEncryptionModeMinOctopusCephVersion) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
@@ -71,10 +71,10 @@ func TestClusterIsCephVolumeRAwModeSupported(t *testing.T) {
|
||||
fields fields
|
||||
want bool
|
||||
}{
|
||||
{"nok-14.2.4", fields{&clusterd.Context{}, &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 4}}, "", cephv1.ClusterSpec{}, cephv1.StorageScopeSpec{}, &k8sutil.ConfigMapKVStore{}}, false},
|
||||
{"ok-14.2.11", fields{&clusterd.Context{}, &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 14, Minor: 2, Extra: 11}}, "", cephv1.ClusterSpec{}, cephv1.StorageScopeSpec{}, &k8sutil.ConfigMapKVStore{}}, true},
|
||||
{"nok-15.2.4", fields{&clusterd.Context{}, &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 4}}, "", cephv1.ClusterSpec{}, cephv1.StorageScopeSpec{}, &k8sutil.ConfigMapKVStore{}}, false},
|
||||
{"ok-15.2.5", fields{&clusterd.Context{}, &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 5}}, "", cephv1.ClusterSpec{}, cephv1.StorageScopeSpec{}, &k8sutil.ConfigMapKVStore{}}, true},
|
||||
{"nok-16.2.4", fields{&clusterd.Context{}, &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 4}}, "", cephv1.ClusterSpec{}, cephv1.StorageScopeSpec{}, &k8sutil.ConfigMapKVStore{}}, false},
|
||||
{"ok-16.2.5", fields{&clusterd.Context{}, &cephclient.ClusterInfo{CephVersion: cephver.CephVersion{Major: 15, Minor: 2, Extra: 5}}, "", cephv1.ClusterSpec{}, cephv1.StorageScopeSpec{}, &k8sutil.ConfigMapKVStore{}}, true},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
@@ -86,7 +86,7 @@ func TestClusterIsCephVolumeRAwModeSupported(t *testing.T) {
|
||||
ValidStorage: tt.fields.ValidStorage,
|
||||
kv: tt.fields.kv,
|
||||
}
|
||||
if got := c.isCephVolumeRawModeSupported(); got != tt.want {
|
||||
if got := c.clusterInfo.CephVersion.IsAtLeast(cephVolumeRawEncryptionModeMinOctopusCephVersion); got != tt.want {
|
||||
t.Errorf("Cluster.isCephVolumeRAwModeSupported() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -193,8 +193,8 @@ func (c *Cluster) startProvisioningOverPVCs(config *provisionConfig, errs *provi
|
||||
|
||||
if osdProps.encrypted {
|
||||
// If the deviceSet template has "encrypted" but the Ceph version is not compatible
|
||||
if !c.isCephVolumeRawModeSupported() {
|
||||
errMsg := fmt.Sprintf("failed to validate storageClassDeviceSet %q. min required ceph version to support encryption is %q or %q", volume.Name, cephVolumeRawEncryptionModeMinNautilusCephVersion.String(), cephVolumeRawEncryptionModeMinOctopusCephVersion.String())
|
||||
if !c.clusterInfo.CephVersion.IsAtLeast(cephVolumeRawEncryptionModeMinOctopusCephVersion) {
|
||||
errMsg := fmt.Sprintf("failed to validate storageClassDeviceSet %q. min required ceph version to support encryption is %q", volume.Name, cephVolumeRawEncryptionModeMinOctopusCephVersion.String())
|
||||
errs.addError(errMsg)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ func Test_startProvisioningOverPVCs(t *testing.T) {
|
||||
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: namespace,
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterInfo.SetName("mycluster")
|
||||
clusterInfo.OwnerInfo = cephclient.NewMinimumOwnerInfo(t)
|
||||
@@ -464,7 +464,7 @@ func Test_startProvisioningOverNodes(t *testing.T) {
|
||||
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: namespace,
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterInfo.SetName("mycluster")
|
||||
clusterInfo.OwnerInfo = cephclient.NewMinimumOwnerInfo(t)
|
||||
|
||||
@@ -569,7 +569,7 @@ func osdIntegrationTestExecutor(t *testing.T, clientset *fake.Clientset, namespa
|
||||
}
|
||||
if args[0] == "versions" {
|
||||
// the update deploy code only cares about the mons from the ceph version command results
|
||||
v := `{"mon":{"ceph version 16.2.2 (somehash) nautilus (stable)":3}}`
|
||||
v := `{"mon":{"ceph version 16.2.2 (somehash) octopus (stable)":3}}`
|
||||
return v, nil
|
||||
}
|
||||
return "", errors.Errorf("unexpected ceph command %q", args)
|
||||
|
||||
@@ -45,9 +45,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
logger = capnslog.NewPackageLogger("github.com/rook/rook", "op-osd")
|
||||
cephVolumeRawEncryptionModeMinNautilusCephVersion = cephver.CephVersion{Major: 14, Minor: 2, Extra: 11}
|
||||
cephVolumeRawEncryptionModeMinOctopusCephVersion = cephver.CephVersion{Major: 15, Minor: 2, Extra: 5}
|
||||
logger = capnslog.NewPackageLogger("github.com/rook/rook", "op-osd")
|
||||
cephVolumeRawEncryptionModeMinOctopusCephVersion = cephver.CephVersion{Major: 15, Minor: 2, Extra: 5}
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestStart(t *testing.T) {
|
||||
clientset := fake.NewSimpleClientset()
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "ns",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
Context: context.TODO(),
|
||||
}
|
||||
context := &clusterd.Context{Clientset: clientset, ConfigDir: "/var/lib/rook", Executor: &exectest.MockExecutor{}}
|
||||
@@ -150,7 +150,7 @@ func TestAddRemoveNode(t *testing.T) {
|
||||
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: namespace,
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
Context: ctx,
|
||||
}
|
||||
clusterInfo.SetName("rook-ceph-test")
|
||||
@@ -323,7 +323,7 @@ func TestAddNodeFailure(t *testing.T) {
|
||||
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "ns-add-remove",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
Context: context.TODO(),
|
||||
}
|
||||
clusterInfo.SetName("testcluster")
|
||||
|
||||
@@ -86,7 +86,7 @@ func testPodDevices(t *testing.T, dataDir, deviceName string, allDevices bool) {
|
||||
clientset := fake.NewSimpleClientset()
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "ns",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterInfo.SetName("test")
|
||||
clusterInfo.OwnerInfo = cephclient.NewMinimumOwnerInfo(t)
|
||||
@@ -413,7 +413,8 @@ func testPodDevices(t *testing.T, dataDir, deviceName string, allDevices bool) {
|
||||
}
|
||||
|
||||
// Test shareProcessNamespace presence
|
||||
assert.True(t, deployment.Spec.Template.Spec.HostPID)
|
||||
// If running on Octopus or higher, we don't need to use the host PID namespace
|
||||
assert.False(t, deployment.Spec.Template.Spec.HostPID)
|
||||
if deployment.Spec.Template.Spec.ShareProcessNamespace != nil {
|
||||
panic("ShareProcessNamespace should be nil")
|
||||
}
|
||||
@@ -422,14 +423,14 @@ func testPodDevices(t *testing.T, dataDir, deviceName string, allDevices bool) {
|
||||
c.spec.LogCollector.Enabled = true
|
||||
deployment, err = c.makeDeployment(osdProp, osd, dataPathMap)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, deployment.Spec.Template.Spec.HostPID, deployment.Spec.Template.Spec.HostPID)
|
||||
if deployment.Spec.Template.Spec.ShareProcessNamespace != nil {
|
||||
assert.False(t, deployment.Spec.Template.Spec.HostPID, deployment.Spec.Template.Spec.HostPID)
|
||||
if deployment.Spec.Template.Spec.ShareProcessNamespace == nil {
|
||||
panic("ShareProcessNamespace should be nil")
|
||||
}
|
||||
|
||||
// Test hostPID and ShareProcessNamespace
|
||||
{
|
||||
// now set ceph version to nautilus
|
||||
// now set ceph version to octopus
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "ns",
|
||||
CephVersion: cephver.Octopus,
|
||||
@@ -468,7 +469,7 @@ func TestStorageSpecConfig(t *testing.T) {
|
||||
clientset := fake.NewSimpleClientset()
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "ns",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterInfo.SetName("testing")
|
||||
clusterInfo.OwnerInfo = cephclient.NewMinimumOwnerInfo(t)
|
||||
@@ -551,7 +552,7 @@ func TestHostNetwork(t *testing.T) {
|
||||
clientset := fake.NewSimpleClientset()
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "ns",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterInfo.SetName("test")
|
||||
|
||||
@@ -710,7 +711,7 @@ func TestOSDPlacement(t *testing.T) {
|
||||
clientset := fake.NewSimpleClientset()
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "ns",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterInfo.SetName("testing")
|
||||
clusterInfo.OwnerInfo = cephclient.NewMinimumOwnerInfo(t)
|
||||
|
||||
@@ -40,7 +40,7 @@ func TestOrchestrationStatus(t *testing.T) {
|
||||
clientset := fake.NewSimpleClientset()
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: "ns",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
context := &clusterd.Context{Clientset: clientset, ConfigDir: "/var/lib/rook", Executor: &exectest.MockExecutor{}}
|
||||
spec := cephv1.ClusterSpec{}
|
||||
|
||||
@@ -492,7 +492,7 @@ func Test_getOSDUpdateInfo(t *testing.T) {
|
||||
}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
Namespace: namespace,
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterInfo.SetName("mycluster")
|
||||
clusterInfo.OwnerInfo = cephclient.NewMinimumOwnerInfo(t)
|
||||
@@ -524,7 +524,7 @@ func Test_getOSDUpdateInfo(t *testing.T) {
|
||||
// osd.1 and 3 in another namespace (another Rook cluster)
|
||||
clusterInfo2 := &cephclient.ClusterInfo{
|
||||
Namespace: "other-namespace",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterInfo2.SetName("other-cluster")
|
||||
clusterInfo2.OwnerInfo = cephclient.NewMinimumOwnerInfo(t)
|
||||
|
||||
@@ -46,7 +46,7 @@ const (
|
||||
dummyVersionsRaw = `
|
||||
{
|
||||
"mon": {
|
||||
"ceph version 14.2.8 (3a54b2b6d167d4a2a19e003a705696d4fe619afc) nautilus (stable)": 3
|
||||
"ceph version 15.2.11 (0000000000000000000000000000000000) octopus (stable)": 3
|
||||
}
|
||||
}`
|
||||
)
|
||||
|
||||
@@ -75,7 +75,7 @@ func TestPodSpec(t *testing.T) {
|
||||
TypeMeta: controllerTypeMeta,
|
||||
}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
s := scheme.Scheme
|
||||
object := []runtime.Object{rbdMirror}
|
||||
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
func TestDiffImageSpecAndClusterRunningVersion(t *testing.T) {
|
||||
|
||||
// 1st test
|
||||
fakeImageVersion := cephver.Nautilus
|
||||
fakeImageVersion := cephver.Octopus
|
||||
fakeRunningVersions := []byte(`
|
||||
{
|
||||
"mon": {
|
||||
@@ -153,18 +153,16 @@ func TestMinVersion(t *testing.T) {
|
||||
c.Spec.CephVersion.AllowUnsupported = true
|
||||
c.ClusterInfo = &client.ClusterInfo{Context: context.TODO()}
|
||||
|
||||
// All versions less than 14.2.5 are invalid
|
||||
v := &cephver.CephVersion{Major: 13, Minor: 2, Extra: 3}
|
||||
assert.Error(t, c.validateCephVersion(v))
|
||||
v = &cephver.CephVersion{Major: 14, Minor: 2, Extra: 1}
|
||||
// All versions less than 15.2.0 or invalid tag are invalid
|
||||
v := &cephver.CephVersion{Major: 15, Minor: 1, Extra: 999}
|
||||
assert.Error(t, c.validateCephVersion(v))
|
||||
v = &cephver.CephVersion{Major: 14}
|
||||
assert.Error(t, c.validateCephVersion(v))
|
||||
|
||||
// All versions at least 14.2.5 are valid
|
||||
v = &cephver.CephVersion{Major: 14, Minor: 2, Extra: 5}
|
||||
// All versions at least 15.2.0 are valid
|
||||
v = &cephver.CephVersion{Major: 15, Minor: 2, Extra: 0}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
v = &cephver.CephVersion{Major: 15}
|
||||
v = &cephver.CephVersion{Major: 16}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
}
|
||||
|
||||
@@ -173,11 +171,7 @@ func TestSupportedVersion(t *testing.T) {
|
||||
c.ClusterInfo = &client.ClusterInfo{Context: context.TODO()}
|
||||
|
||||
// Supported versions are valid
|
||||
v := &cephver.CephVersion{Major: 14, Minor: 2, Extra: 12}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
|
||||
// Supported versions are valid
|
||||
v = &cephver.CephVersion{Major: 15, Minor: 2, Extra: 5}
|
||||
v := &cephver.CephVersion{Major: 15, Minor: 2, Extra: 5}
|
||||
assert.NoError(t, c.validateCephVersion(v))
|
||||
|
||||
// Supported versions are valid
|
||||
|
||||
@@ -63,15 +63,6 @@ func DefaultCentralizedConfigs(cephVersion version.CephVersion) []Option {
|
||||
configOverride("global", "mon cluster log file", ""),
|
||||
}
|
||||
|
||||
// We disable "bluestore warn on legacy statfs"
|
||||
// This setting appeared on 14.2.2, so if detected we disable the warning
|
||||
// As of 14.2.5 (https://github.com/rook/rook/issues/3539#issuecomment-531287051), Ceph will disable this flag by default so there is no need to apply it
|
||||
if cephVersion.IsAtLeast(version.CephVersion{Major: 14, Minor: 2, Extra: 2}) && version.IsInferior(cephVersion, version.CephVersion{Major: 14, Minor: 2, Extra: 5}) {
|
||||
overrides = append(overrides, []Option{
|
||||
configOverride("global", "bluestore warn on legacy statfs", "false"),
|
||||
}...)
|
||||
}
|
||||
|
||||
// For Pacific
|
||||
if cephVersion.IsAtLeastPacific() {
|
||||
overrides = append(overrides, []Option{
|
||||
|
||||
@@ -138,7 +138,7 @@ const (
|
||||
dummyVersionsRaw = `
|
||||
{
|
||||
"mon": {
|
||||
"ceph version 14.2.8 (3a54b2b6d167d4a2a19e003a705696d4fe619afc) nautilus (stable)": 3
|
||||
"ceph version 15.2.11 (000000000000000000000000000000) octopus (stable)": 3
|
||||
}
|
||||
}`
|
||||
)
|
||||
|
||||
@@ -385,8 +385,8 @@ func finishedWithDaemonUpgrade(context *clusterd.Context, clusterInfo *cephclien
|
||||
activeMDSCount := fs.Spec.MetadataServer.ActiveCount
|
||||
logger.Debugf("restoring filesystem %s from daemon upgrade", fsName)
|
||||
logger.Debugf("bringing num active MDS daemons for fs %s back to %d", fsName, activeMDSCount)
|
||||
// TODO: Unknown (Apr 2020) if this can be removed once Rook no longer supports Nautilus.
|
||||
// upgrade guide according to nautilus https://docs.ceph.com/docs/nautilus/cephfs/upgrading/#upgrading-the-mds-cluster
|
||||
// TODO: Unknown (Aug 2021) if this can be removed once Rook no longer supports Octopus.
|
||||
// upgrade guide according to octopus https://docs.ceph.com/en/octopus/cephfs/upgrading/
|
||||
if err := cephclient.SetNumMDSRanks(context, clusterInfo, fsName, activeMDSCount); err != nil {
|
||||
return errors.Wrapf(err, "Failed to restore filesystem %s following daemon upgrade", fsName)
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ func testDeploymentObject(t *testing.T, network cephv1.NetworkSpec) (*apps.Deplo
|
||||
}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
FSID: "myfsid",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clientset := testop.New(t, 1)
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ func TestPodSpec(t *testing.T) {
|
||||
TypeMeta: controllerTypeMeta,
|
||||
}
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
s := scheme.Scheme
|
||||
object := []runtime.Object{fsMirror}
|
||||
|
||||
@@ -258,10 +258,6 @@ func TestGetGaneshaConfigObject(t *testing.T) {
|
||||
res = getGaneshaConfigObject(cephNFS, version.CephVersion{Major: 15, Minor: 2, Extra: 1}, nodeid)
|
||||
logger.Infof("Config Object for Octopus is %s", res)
|
||||
assert.Equal(t, expectedName, res)
|
||||
|
||||
res = getGaneshaConfigObject(cephNFS, version.CephVersion{Major: 14, Minor: 2, Extra: 5}, nodeid)
|
||||
logger.Infof("Config Object for Nautilus is %s", res)
|
||||
assert.Equal(t, "conf-my-nfs.a", res)
|
||||
}
|
||||
|
||||
func TestFetchOrCreatePool(t *testing.T) {
|
||||
|
||||
@@ -97,7 +97,7 @@ func TestDeploymentSpec(t *testing.T) {
|
||||
context: c,
|
||||
clusterInfo: &cephclient.ClusterInfo{
|
||||
FSID: "myfsid",
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
},
|
||||
cephClusterSpec: &cephv1.ClusterSpec{
|
||||
CephVersion: cephv1.CephVersionSpec{
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
|
||||
func newConfig(t *testing.T) *clusterConfig {
|
||||
clusterInfo := &cephclient.ClusterInfo{
|
||||
CephVersion: cephver.Nautilus,
|
||||
CephVersion: cephver.Octopus,
|
||||
}
|
||||
clusterSpec := &cephv1.ClusterSpec{
|
||||
Network: cephv1.NetworkSpec{
|
||||
|
||||
@@ -30,7 +30,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/cluster/mgr"
|
||||
"github.com/rook/rook/pkg/operator/ceph/cluster/mon"
|
||||
"github.com/rook/rook/pkg/operator/ceph/config"
|
||||
opcontroller "github.com/rook/rook/pkg/operator/ceph/controller"
|
||||
@@ -326,18 +325,6 @@ func (r *ReconcileCephObjectStore) reconcile(request reconcile.Request) (reconci
|
||||
return reconcile.Result{}, cephObjectStore, errors.Wrapf(err, "invalid object store %q arguments", cephObjectStore.Name)
|
||||
}
|
||||
|
||||
// If the CephCluster has enabled the "pg_autoscaler" module and is running Nautilus
|
||||
// we force the pg_autoscale_mode to "on"
|
||||
_, propertyExists := cephObjectStore.Spec.DataPool.Parameters[cephclient.PgAutoscaleModeProperty]
|
||||
if mgr.IsModuleInSpec(cephCluster.Spec.Mgr.Modules, mgr.PgautoscalerModuleName) &&
|
||||
!desiredCephVersion.IsAtLeastOctopus() &&
|
||||
!propertyExists {
|
||||
if len(cephObjectStore.Spec.DataPool.Parameters) == 0 {
|
||||
cephObjectStore.Spec.DataPool.Parameters = make(map[string]string)
|
||||
}
|
||||
cephObjectStore.Spec.DataPool.Parameters[cephclient.PgAutoscaleModeProperty] = cephclient.PgAutoscaleModeOn
|
||||
}
|
||||
|
||||
// CREATE/UPDATE
|
||||
_, err = r.reconcileCreateObjectStore(cephObjectStore, request.NamespacedName, cephCluster.Spec)
|
||||
if err != nil && kerrors.IsNotFound(err) {
|
||||
|
||||
@@ -142,7 +142,7 @@ const (
|
||||
dummyVersionsRaw = `
|
||||
{
|
||||
"mon": {
|
||||
"ceph version 14.2.8 (3a54b2b6d167d4a2a19e003a705696d4fe619afc) nautilus (stable)": 3
|
||||
"ceph version 15.2.11 (0000000000000000) octopus (stable)": 3
|
||||
}
|
||||
}`
|
||||
userCreateJSON = `{
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestPodSpecs(t *testing.T) {
|
||||
}
|
||||
store.Spec.Gateway.PriorityClassName = "my-priority-class"
|
||||
info := clienttest.CreateTestClusterInfo(1)
|
||||
info.CephVersion = cephver.Nautilus
|
||||
info.CephVersion = cephver.Octopus
|
||||
data := cephconfig.NewStatelessDaemonDataPathMap(cephconfig.RgwType, "default", "rook-ceph", "/var/lib/rook/")
|
||||
|
||||
c := &clusterConfig{
|
||||
@@ -107,7 +107,7 @@ func TestSSLPodSpec(t *testing.T) {
|
||||
}
|
||||
store.Spec.Gateway.PriorityClassName = "my-priority-class"
|
||||
info := clienttest.CreateTestClusterInfo(1)
|
||||
info.CephVersion = cephver.Nautilus
|
||||
info.CephVersion = cephver.Octopus
|
||||
info.Namespace = store.Namespace
|
||||
data := cephconfig.NewStatelessDaemonDataPathMap(cephconfig.RgwType, "default", "rook-ceph", "/var/lib/rook/")
|
||||
store.Spec.Gateway.SecurePort = 443
|
||||
|
||||
@@ -29,7 +29,6 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
"github.com/rook/rook/pkg/clusterd"
|
||||
"github.com/rook/rook/pkg/operator/ceph/cluster/mgr"
|
||||
"github.com/rook/rook/pkg/operator/ceph/cluster/mon"
|
||||
"github.com/rook/rook/pkg/operator/ceph/config"
|
||||
opcontroller "github.com/rook/rook/pkg/operator/ceph/controller"
|
||||
@@ -252,18 +251,6 @@ func (r *ReconcileCephBlockPool) reconcile(request reconcile.Request) (reconcile
|
||||
}
|
||||
r.clusterInfo.CephVersion = *cephVersion
|
||||
|
||||
// If the CephCluster has enabled the "pg_autoscaler" module and is running Nautilus
|
||||
// we force the pg_autoscale_mode to "on"
|
||||
_, propertyExists := cephBlockPool.Spec.Parameters[cephclient.PgAutoscaleModeProperty]
|
||||
if mgr.IsModuleInSpec(cephCluster.Spec.Mgr.Modules, mgr.PgautoscalerModuleName) &&
|
||||
!cephVersion.IsAtLeastOctopus() &&
|
||||
!propertyExists {
|
||||
if len(cephBlockPool.Spec.Parameters) == 0 {
|
||||
cephBlockPool.Spec.Parameters = make(map[string]string)
|
||||
}
|
||||
cephBlockPool.Spec.Parameters[cephclient.PgAutoscaleModeProperty] = cephclient.PgAutoscaleModeOn
|
||||
}
|
||||
|
||||
// CREATE/UPDATE
|
||||
reconcileResponse, err = r.reconcileCreatePool(clusterInfo, &cephCluster.Spec, cephBlockPool)
|
||||
if err != nil {
|
||||
|
||||
@@ -39,10 +39,8 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
// Minimum supported version is 14.2.5
|
||||
Minimum = CephVersion{14, 2, 5, 0, ""}
|
||||
// Nautilus Ceph version
|
||||
Nautilus = CephVersion{14, 0, 0, 0, ""}
|
||||
// Minimum supported version is 15.2.0
|
||||
Minimum = CephVersion{15, 2, 0, 0, ""}
|
||||
// Octopus Ceph version
|
||||
Octopus = CephVersion{15, 0, 0, 0, ""}
|
||||
// Pacific Ceph version
|
||||
@@ -54,7 +52,7 @@ var (
|
||||
cephVolumeLVMDiskSortingCephVersion = CephVersion{Major: 14, Minor: 2, Extra: 13}
|
||||
|
||||
// supportedVersions are production-ready versions that rook supports
|
||||
supportedVersions = []CephVersion{Nautilus, Octopus, Pacific}
|
||||
supportedVersions = []CephVersion{Octopus, Pacific}
|
||||
|
||||
// unsupportedVersions are possibly Ceph pin-point release that introduced breaking changes and not recommended
|
||||
unsupportedVersions = []CephVersion{cephVolumeLVMDiskSortingCephVersion}
|
||||
@@ -88,8 +86,6 @@ func (v *CephVersion) CephVersionFormatted() string {
|
||||
// ReleaseName is the name of the Ceph release
|
||||
func (v *CephVersion) ReleaseName() string {
|
||||
switch v.Major {
|
||||
case Nautilus.Major:
|
||||
return "nautilus"
|
||||
case Octopus.Major:
|
||||
return "octopus"
|
||||
case Pacific.Major:
|
||||
@@ -171,11 +167,6 @@ func (v *CephVersion) isExactly(other CephVersion) bool {
|
||||
return v.Major == other.Major && v.Minor == other.Minor && v.Extra == other.Extra
|
||||
}
|
||||
|
||||
// IsNautilus checks if the Ceph version is Nautilus
|
||||
func (v *CephVersion) IsNautilus() bool {
|
||||
return v.isRelease(Nautilus)
|
||||
}
|
||||
|
||||
// IsOctopus checks if the Ceph version is Octopus
|
||||
func (v *CephVersion) IsOctopus() bool {
|
||||
return v.isRelease(Octopus)
|
||||
@@ -229,11 +220,6 @@ func (v *CephVersion) IsAtLeastOctopus() bool {
|
||||
return v.IsAtLeast(Octopus)
|
||||
}
|
||||
|
||||
// IsAtLeastNautilus check that the Ceph version is at least Nautilus
|
||||
func (v *CephVersion) IsAtLeastNautilus() bool {
|
||||
return v.IsAtLeast(Nautilus)
|
||||
}
|
||||
|
||||
// IsIdentical checks if Ceph versions are identical
|
||||
func IsIdentical(a, b CephVersion) bool {
|
||||
if a.Major == b.Major {
|
||||
@@ -319,9 +305,9 @@ func IsInferior(a, b CephVersion) bool {
|
||||
func ValidateCephVersionsBetweenLocalAndExternalClusters(localVersion, externalVersion CephVersion) error {
|
||||
logger.Debugf("local version is %q, external version is %q", localVersion.String(), externalVersion.String())
|
||||
|
||||
// We only support Nautilus or newer
|
||||
if !externalVersion.IsAtLeastNautilus() {
|
||||
return errors.Errorf("unsupported ceph version %q, need at least nautilus, delete your cluster CR and create a new one with a correct ceph version", externalVersion.String())
|
||||
// We only support Octopus or newer
|
||||
if !externalVersion.IsAtLeastOctopus() {
|
||||
return errors.Errorf("unsupported ceph version %q, need at least octopus, delete your cluster CR and create a new one with a correct ceph version", externalVersion.String())
|
||||
}
|
||||
|
||||
// Identical version, regardless if other CRs are running, it's ok!
|
||||
|
||||
@@ -24,7 +24,6 @@ import (
|
||||
)
|
||||
|
||||
func TestToString(t *testing.T) {
|
||||
assert.Equal(t, "14.0.0-0 nautilus", Nautilus.String())
|
||||
assert.Equal(t, "15.0.0-0 octopus", Octopus.String())
|
||||
received := CephVersion{-1, 0, 0, 0, ""}
|
||||
|
||||
@@ -33,12 +32,10 @@ func TestToString(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCephVersionFormatted(t *testing.T) {
|
||||
assert.Equal(t, "ceph version 14.0.0-0 nautilus", Nautilus.CephVersionFormatted())
|
||||
assert.Equal(t, "ceph version 15.0.0-0 octopus", Octopus.CephVersionFormatted())
|
||||
}
|
||||
|
||||
func TestReleaseName(t *testing.T) {
|
||||
assert.Equal(t, "nautilus", Nautilus.ReleaseName())
|
||||
assert.Equal(t, "octopus", Octopus.ReleaseName())
|
||||
ver := CephVersion{-1, 0, 0, 0, ""}
|
||||
assert.Equal(t, unknownVersionString, ver.ReleaseName())
|
||||
@@ -67,7 +64,7 @@ ceph version 16.2.6 (ae699615bac534ea496ee965ac6192cb7e0e07c1) pacific (stable)
|
||||
bin/ceph --version
|
||||
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
|
||||
ceph version 16.1.33-403-g7ba6bece41
|
||||
(7ba6bece4187eda5d05a9b84211fe6ba8dd287bd) nautilus (rc)
|
||||
(7ba6bece4187eda5d05a9b84211fe6ba8dd287bd) pacific (rc)
|
||||
`
|
||||
extractVersionHelper(t, v1c, 16, 1, 33, 403, "7ba6bece4187eda5d05a9b84211fe6ba8dd287bd")
|
||||
extractVersionHelper(t, v1d, 16, 1, 33, 403, "7ba6bece4187eda5d05a9b84211fe6ba8dd287bd")
|
||||
@@ -82,7 +79,7 @@ ceph version 16.1.33-403-g7ba6bece41
|
||||
v2d := `
|
||||
bin/ceph --version
|
||||
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
|
||||
ceph version Development (no_version) nautilus (rc)
|
||||
ceph version Development (no_version) octopus (rc)
|
||||
`
|
||||
v, err := ExtractCephVersion(v2c)
|
||||
assert.Error(t, err)
|
||||
@@ -107,33 +104,23 @@ func TestSupported(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIsRelease(t *testing.T) {
|
||||
assert.True(t, Nautilus.isRelease(Nautilus))
|
||||
assert.True(t, Octopus.isRelease(Octopus))
|
||||
assert.True(t, Pacific.isRelease(Pacific))
|
||||
assert.True(t, Quincy.isRelease(Quincy))
|
||||
|
||||
assert.False(t, Octopus.isRelease(Nautilus))
|
||||
assert.False(t, Pacific.isRelease(Octopus))
|
||||
|
||||
OctopusUpdate := Octopus
|
||||
OctopusUpdate.Minor = 33
|
||||
OctopusUpdate.Extra = 4
|
||||
assert.True(t, OctopusUpdate.isRelease(Octopus))
|
||||
|
||||
NautilusUpdate := Nautilus
|
||||
NautilusUpdate.Minor = 33
|
||||
NautilusUpdate.Extra = 4
|
||||
assert.True(t, NautilusUpdate.isRelease(Nautilus))
|
||||
}
|
||||
|
||||
func TestIsReleaseX(t *testing.T) {
|
||||
assert.True(t, Nautilus.IsNautilus())
|
||||
assert.False(t, Octopus.IsNautilus())
|
||||
assert.False(t, Pacific.IsOctopus())
|
||||
}
|
||||
|
||||
func TestVersionAtLeast(t *testing.T) {
|
||||
assert.True(t, Nautilus.IsAtLeast(Nautilus))
|
||||
assert.False(t, Nautilus.IsAtLeast(Octopus))
|
||||
assert.True(t, Octopus.IsAtLeast(Nautilus))
|
||||
assert.True(t, Octopus.IsAtLeast(Octopus))
|
||||
|
||||
assert.True(t, (&CephVersion{1, 0, 0, 0, ""}).IsAtLeast(CephVersion{0, 0, 0, 0, ""}))
|
||||
@@ -147,31 +134,28 @@ func TestVersionAtLeast(t *testing.T) {
|
||||
|
||||
func TestVersionAtLeastX(t *testing.T) {
|
||||
assert.True(t, Octopus.IsAtLeastOctopus())
|
||||
assert.True(t, Octopus.IsAtLeastNautilus())
|
||||
assert.True(t, Nautilus.IsAtLeastNautilus())
|
||||
assert.True(t, Pacific.IsAtLeastPacific())
|
||||
assert.False(t, Nautilus.IsAtLeastOctopus())
|
||||
assert.False(t, Nautilus.IsAtLeastPacific())
|
||||
assert.False(t, Octopus.IsAtLeastPacific())
|
||||
}
|
||||
|
||||
func TestIsIdentical(t *testing.T) {
|
||||
assert.True(t, IsIdentical(CephVersion{14, 2, 2, 0, ""}, CephVersion{14, 2, 2, 0, ""}))
|
||||
assert.False(t, IsIdentical(CephVersion{14, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.True(t, IsIdentical(CephVersion{15, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.False(t, IsIdentical(CephVersion{16, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
}
|
||||
|
||||
func TestIsSuperior(t *testing.T) {
|
||||
assert.False(t, IsSuperior(CephVersion{14, 2, 2, 0, ""}, CephVersion{14, 2, 2, 0, ""}))
|
||||
assert.False(t, IsSuperior(CephVersion{14, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.True(t, IsSuperior(CephVersion{15, 2, 2, 0, ""}, CephVersion{14, 2, 2, 0, ""}))
|
||||
assert.False(t, IsSuperior(CephVersion{15, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.False(t, IsSuperior(CephVersion{15, 2, 2, 0, ""}, CephVersion{16, 2, 2, 0, ""}))
|
||||
assert.True(t, IsSuperior(CephVersion{16, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.True(t, IsSuperior(CephVersion{15, 2, 2, 0, ""}, CephVersion{15, 1, 3, 0, ""}))
|
||||
assert.True(t, IsSuperior(CephVersion{15, 2, 2, 0, ""}, CephVersion{15, 2, 1, 0, ""}))
|
||||
assert.True(t, IsSuperior(CephVersion{15, 2, 2, 1, ""}, CephVersion{15, 2, 1, 0, ""}))
|
||||
}
|
||||
|
||||
func TestIsInferior(t *testing.T) {
|
||||
assert.False(t, IsInferior(CephVersion{14, 2, 2, 0, ""}, CephVersion{14, 2, 2, 0, ""}))
|
||||
assert.False(t, IsInferior(CephVersion{15, 2, 2, 0, ""}, CephVersion{14, 2, 2, 0, ""}))
|
||||
assert.True(t, IsInferior(CephVersion{14, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.False(t, IsInferior(CephVersion{15, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.False(t, IsInferior(CephVersion{16, 2, 2, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.True(t, IsInferior(CephVersion{15, 2, 2, 0, ""}, CephVersion{16, 2, 2, 0, ""}))
|
||||
assert.True(t, IsInferior(CephVersion{15, 1, 3, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.True(t, IsInferior(CephVersion{15, 2, 1, 0, ""}, CephVersion{15, 2, 2, 0, ""}))
|
||||
assert.True(t, IsInferior(CephVersion{15, 2, 1, 0, ""}, CephVersion{15, 2, 2, 1, ""}))
|
||||
@@ -179,33 +163,33 @@ func TestIsInferior(t *testing.T) {
|
||||
|
||||
func TestValidateCephVersionsBetweenLocalAndExternalClusters(t *testing.T) {
|
||||
// TEST 1: versions are identical
|
||||
localCephVersion := CephVersion{Major: 14, Minor: 2, Extra: 1}
|
||||
externalCephVersion := CephVersion{Major: 14, Minor: 2, Extra: 1}
|
||||
localCephVersion := CephVersion{Major: 15, Minor: 2, Extra: 1}
|
||||
externalCephVersion := CephVersion{Major: 15, Minor: 2, Extra: 1}
|
||||
err := ValidateCephVersionsBetweenLocalAndExternalClusters(localCephVersion, externalCephVersion)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// TEST 2: local cluster version major is lower than external cluster version
|
||||
localCephVersion = CephVersion{Major: 14, Minor: 2, Extra: 1}
|
||||
externalCephVersion = CephVersion{Major: 15, Minor: 2, Extra: 1}
|
||||
localCephVersion = CephVersion{Major: 15, Minor: 2, Extra: 1}
|
||||
externalCephVersion = CephVersion{Major: 16, Minor: 2, Extra: 1}
|
||||
err = ValidateCephVersionsBetweenLocalAndExternalClusters(localCephVersion, externalCephVersion)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// TEST 3: local cluster version major is higher than external cluster version
|
||||
localCephVersion = CephVersion{Major: 15, Minor: 2, Extra: 1}
|
||||
externalCephVersion = CephVersion{Major: 14, Minor: 2, Extra: 1}
|
||||
localCephVersion = CephVersion{Major: 16, Minor: 2, Extra: 1}
|
||||
externalCephVersion = CephVersion{Major: 15, Minor: 2, Extra: 1}
|
||||
err = ValidateCephVersionsBetweenLocalAndExternalClusters(localCephVersion, externalCephVersion)
|
||||
assert.Error(t, err)
|
||||
|
||||
// TEST 4: local version is > but from a minor release
|
||||
// local version must never be higher
|
||||
localCephVersion = CephVersion{Major: 14, Minor: 2, Extra: 2}
|
||||
externalCephVersion = CephVersion{Major: 14, Minor: 2, Extra: 1}
|
||||
localCephVersion = CephVersion{Major: 15, Minor: 2, Extra: 2}
|
||||
externalCephVersion = CephVersion{Major: 15, Minor: 2, Extra: 1}
|
||||
err = ValidateCephVersionsBetweenLocalAndExternalClusters(localCephVersion, externalCephVersion)
|
||||
assert.Error(t, err)
|
||||
|
||||
// TEST 5: external version is > but from a minor release
|
||||
localCephVersion = CephVersion{Major: 14, Minor: 2, Extra: 1}
|
||||
externalCephVersion = CephVersion{Major: 14, Minor: 2, Extra: 2}
|
||||
localCephVersion = CephVersion{Major: 15, Minor: 2, Extra: 1}
|
||||
externalCephVersion = CephVersion{Major: 15, Minor: 2, Extra: 2}
|
||||
err = ValidateCephVersionsBetweenLocalAndExternalClusters(localCephVersion, externalCephVersion)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
@@ -222,11 +206,11 @@ func TestCephVersion_Unsupported(t *testing.T) {
|
||||
fields fields
|
||||
want bool
|
||||
}{
|
||||
{"supported", fields{Major: 14, Minor: 2, Extra: 1, Build: 0}, false},
|
||||
{"supported", fields{Major: 14, Minor: 2, Extra: 12, Build: 0}, false},
|
||||
{"supported", fields{Major: 16, Minor: 2, Extra: 1, Build: 0}, false},
|
||||
{"supported", fields{Major: 15, Minor: 2, Extra: 1, Build: 0}, false},
|
||||
{"supported", fields{Major: 15, Minor: 2, Extra: 6, Build: 0}, false},
|
||||
{"unsupported", fields{Major: 14, Minor: 2, Extra: 13, Build: 0}, true},
|
||||
{"unsupported", fields{Major: 17, Minor: 2, Extra: 0, Build: 0}, false},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
@@ -42,11 +42,6 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// test with the latest nautilus build
|
||||
nautilusTestImage = "quay.io/ceph/ceph:v14"
|
||||
// nautilusTestImagePartition is the image that contains working ceph-volume code to deploy OSDs on partitions
|
||||
// currently only used for the upgrade test from 1.5 to 1.6, this cannot be changed to v14 since ceph-volume will fail to deploy OSD on partition on Rook 1.5
|
||||
nautilusTestImagePartition = "quay.io/ceph/ceph:v14.2.12"
|
||||
// test with the latest octopus build
|
||||
octopusTestImage = "quay.io/ceph/ceph:v15"
|
||||
// test with the latest pacific build
|
||||
@@ -68,8 +63,6 @@ bdev_flock_retry = 20
|
||||
)
|
||||
|
||||
var (
|
||||
NautilusVersion = cephv1.CephVersionSpec{Image: nautilusTestImage}
|
||||
NautilusPartitionVersion = cephv1.CephVersionSpec{Image: nautilusTestImagePartition}
|
||||
OctopusVersion = cephv1.CephVersionSpec{Image: octopusTestImage}
|
||||
OctopusDevelVersion = cephv1.CephVersionSpec{Image: octopusDevelTestImage}
|
||||
PacificVersion = cephv1.CephVersionSpec{Image: pacificTestImage}
|
||||
|
||||
@@ -87,7 +87,7 @@ func (s *MultiClusterDeploySuite) SetupSuite() {
|
||||
MultipleMgrs: true,
|
||||
EnableAdmissionController: true,
|
||||
RookVersion: installer.LocalBuildTag,
|
||||
CephVersion: installer.NautilusVersion,
|
||||
CephVersion: installer.OctopusVersion,
|
||||
}
|
||||
s.settings.ApplyEnvVars()
|
||||
externalSettings := &installer.TestCephSettings{
|
||||
|
||||
@@ -83,7 +83,7 @@ func (s *UpgradeSuite) SetupSuite() {
|
||||
Mons: 1,
|
||||
SkipOSDCreation: false,
|
||||
RookVersion: installer.Version1_6,
|
||||
CephVersion: installer.NautilusPartitionVersion,
|
||||
CephVersion: installer.OctopusVersion,
|
||||
}
|
||||
|
||||
s.installer, s.k8sh = StartTestCluster(s.T, s.settings)
|
||||
@@ -100,7 +100,7 @@ func (s *UpgradeSuite) TestUpgradeRookToMaster() {
|
||||
objectUserID := "upgraded-user"
|
||||
preFilename := "pre-upgrade-file"
|
||||
numOSDs, filesystemName, rbdFilesToRead, cephfsFilesToRead := s.deployClusterforUpgrade(objectStoreName, objectUserID, message, preFilename)
|
||||
s.settings.CephVersion = installer.NautilusVersion
|
||||
s.settings.CephVersion = installer.OctopusVersion
|
||||
|
||||
clusterInfo := client.AdminClusterInfo(s.namespace)
|
||||
requireBlockImagesRemoved := false
|
||||
@@ -140,19 +140,6 @@ func (s *UpgradeSuite) TestUpgradeRookToMaster() {
|
||||
|
||||
logger.Infof("Verified upgrade from %s to master", installer.Version1_6)
|
||||
|
||||
//
|
||||
// Upgrade from nautilus to octopus
|
||||
//
|
||||
logger.Infof("*** UPGRADING CEPH FROM Nautilus TO Octopus ***")
|
||||
s.gatherLogs(s.settings.OperatorNamespace, "_before_octopus_upgrade")
|
||||
s.upgradeCephVersion(installer.OctopusVersion.Image, numOSDs)
|
||||
// Verify reading and writing to the test clients
|
||||
newFile = "post-octopus-upgrade-file"
|
||||
s.verifyFilesAfterUpgrade(filesystemName, newFile, message, rbdFilesToRead, cephfsFilesToRead)
|
||||
logger.Infof("Verified upgrade from nautilus to octopus")
|
||||
|
||||
checkCephObjectUser(s.Suite, s.helper, s.k8sh, s.namespace, objectStoreName, objectUserID, true, false)
|
||||
|
||||
//
|
||||
// Upgrade from octopus to pacific
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user