From 14495d1e5ac2196d64bc57c4a0f7ce93f9ebe079 Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Wed, 29 Jul 2020 16:19:28 -0600 Subject: [PATCH] ceph: upgrade documentation for v1.4 The upgrade guide is now updated for upgrades from v1.3 to v1.4. The v1.2 upgrade yamls are removed and the docs are cleaned up from 1.3 upgrade steps that are no longer necessary. Signed-off-by: Travis Nielsen --- Documentation/ceph-csi-snapshot.md | 4 +- Documentation/ceph-upgrade.md | 328 +++++------ .../ceph/upgrade-from-v1.2-apply.yaml | 281 ---------- .../ceph/upgrade-from-v1.2-crds.yaml | 529 ------------------ .../ceph/upgrade-from-v1.3-crds.yaml | 494 +++++++++------- .../ceph/upgrade-from-v1.3-delete.yaml | 79 +++ tests/framework/installer/ceph_manifests.go | 2 +- 7 files changed, 495 insertions(+), 1222 deletions(-) delete mode 100644 cluster/examples/kubernetes/ceph/upgrade-from-v1.2-apply.yaml delete mode 100644 cluster/examples/kubernetes/ceph/upgrade-from-v1.2-crds.yaml create mode 100644 cluster/examples/kubernetes/ceph/upgrade-from-v1.3-delete.yaml diff --git a/Documentation/ceph-csi-snapshot.md b/Documentation/ceph-csi-snapshot.md index 1b28c1795..7750f58f9 100644 --- a/Documentation/ceph-csi-snapshot.md +++ b/Documentation/ceph-csi-snapshot.md @@ -6,9 +6,9 @@ indent: true ## RBD Snapshots -### Snapshot Beta Prerequisites +### Prerequisites -1. Requires kubernetes v1.17+ which supports snapshot beta. +1. Requires Kubernetes v1.17+ which supports snapshot beta. 2. Install the new snapshot controller and snapshot beta CRD. More info can be found [here](https://github.com/kubernetes-csi/external-snapshotter/tree/v2.1.1#usage) diff --git a/Documentation/ceph-upgrade.md b/Documentation/ceph-upgrade.md index 5e447fd32..5a188c55c 100644 --- a/Documentation/ceph-upgrade.md +++ b/Documentation/ceph-upgrade.md @@ -10,16 +10,15 @@ This guide will walk you through the steps to upgrade the software in a Rook-Cep version to the next. This includes both the Rook-Ceph operator software itself as well as the Ceph cluster software. -Since the release of Rook 1.0, upgrades for both the operator and for Ceph are nearly entirely -automated save for where Rook's permissions need to be explicitly updated by an admin. Achieving the -level of upgrade automation has been refined by community feedback, and we will always be open to -further feedback for improving automation and improving Rook. +Upgrades for both the operator and for Ceph are nearly entirely +automated save for where Rook's permissions need to be explicitly updated by an admin or when +incompatibilities need to be addressed manually due to customizations. We welcome feedback and opening issues! ## Supported Versions -This guide is for upgrading from **Rook v1.2.x to Rook v1.3.x**. +This guide is for upgrading from **Rook v1.3.x to Rook v1.4.x**. Please refer to the upgrade guides from previous releases for supported upgrade paths. Rook upgrades are only supported between official releases. Upgrades to and from `master` are not @@ -28,6 +27,7 @@ supported. For a guide to upgrade previous versions of Rook, please refer to the version of documentation for those releases. +* [Upgrade 1.2 to 1.3](https://rook.io/docs/rook/v1.3/ceph-upgrade.html) * [Upgrade 1.1 to 1.2](https://rook.io/docs/rook/v1.2/ceph-upgrade.html) * [Upgrade 1.0 to 1.1](https://rook.io/docs/rook/v1.1/ceph-upgrade.html) * [Upgrade 0.9 to 1.0](https://rook.io/docs/rook/v1.0/ceph-upgrade.html) @@ -41,31 +41,33 @@ those releases. With this upgrade guide, there are a few notes to consider: * **WARNING**: Upgrading a Rook cluster is not without risk. There may be unexpected issues or - obstacles that damage the integrity and health of your storage cluster, including data loss. Only - proceed with this guide if you are comfortable with that. + obstacles that damage the integrity and health of your storage cluster, including data loss. * The Rook cluster's storage may be unavailable for short periods during the upgrade process for both Rook operator updates and for Ceph version updates. * We recommend that you read this document in full before you undertake a Rook cluster upgrade. ## Before you Upgrade -Rook v1.3 has several breaking changes that must be considered **before** upgrading to Rook v1.3. -1. Ceph Mimic is no longer supported. You must update to Ceph Nautilus v14.2.5 or newer **before** updating to Rook v1.3. See the - Rook v1.2 [Upgrade Guide for Ceph](https://rook.github.io/docs/rook/v1.2/ceph-upgrade.html#ceph-version-upgrades). -2. Directory-based OSDs are no longer supported. If you are specifying a - [`directory`](https://github.com/rook/rook/blob/release-1.2/cluster/examples/kubernetes/ceph/cluster-test.yaml#L49-L50) - in your CephCluster CR you will need to convert these OSDs to device-based OSDs. See below for [converting legacy OSDs](#converting-legacy-osds). -3. OSDs created **before Rook v0.9** are no longer supported during upgrade. To detect if you have these legacy - OSDs in your cluster, run `lsblk` on each host to see what partitions exist. - - If you see **three partitions** on a device running an OSD, this is a legacy OSD. See below for [converting legacy OSDs](#converting-legacy-osds). - - If you see a single partition or LV with the `ceph` prefix, the OSD is **not** a legacy OSD and you will not need to convert the OSDs. -4. Make sure the `lvm2` package is installed on the host where OSDs are running. If not, the prepare job will fail and the upgrade will be blocked. +Rook v1.4 has a breaking change that should be considered before upgrading. + +1. Make sure the `lvm2` package is installed on the host where OSDs are running. If not, the prepare job will fail + and the upgrade of OSDs will be blocked. + * This only applies to non-PVC OSDs. Beginning in v1.3, OSDs created on PVCs no longer rely on LVM. +2. CSI Snapshots: See the next section if you are currently using Ceph-CSI snapshots. + ### CSI Snapshots -CSI snapshot is moved from Alpha to Beta and is not backward compatible. The snapshots +CSI snapshots have moved from Alpha to Beta and are **not** backward compatible. The snapshots created with the Alpha version must be deleted before the upgrade. +If you desire to continue using Ceph-CSI 2.x with Alpha snapshots, then: + +* Skip this section +* Set the CSI version to 2.x as described below in the [CSI Version](#csi-version) section. + +To continue with the Ceph-CSI v3.0 driver that is recommended with v1.4: + 1. List all the volumesnapshots created ```bash @@ -98,46 +100,58 @@ volumesnapshotclass.snapshot.storage.k8s.io "csi-rbdplugin-snapclass" deleted *Note:* The underlying snapshots on the storage system will be deleted by ceph-csi -### Converting Legacy OSDs +#### Delete the Alpha CRDs -If you have legacy OSDs as described in the previous section, it is recommended to migrate the OSDs before the upgrade, -although the migration is not strictly required before upgrade. If you proceed with the upgrade to v1.3 the OSDs will -continue running. However, they will no longer be managed by Rook. The OSDs will never again be updated when you update -Ceph or any other settings in your CephCluster CR. +As we are updating the snapshot resources from `Alpha` to `Beta` we need to +delete the old `alphav1` snapshot CRD created by external-snapshotter sidecar container -The procedure to migrate the OSDs requires raw devices or partitions be available as mentioned in the [Ceph Prerequisites](ceph-prerequisites.md). -After you have available storage devices available in your cluster, do the following: -1. Configure OSDs on the new devices using the [Storage selection settings](https://rook.github.io/docs/rook/v1.3/ceph-cluster-crd.html#storage-selection-settings). - If you have specified `useAllDevices: true`, you may need to restart the operator in order to trigger creation of new OSDs on new devices. -2. Follow the [OSD Removal Guide](https://rook.github.io/docs/rook/v1.3/ceph-osd-mgmt.html#remove-an-osd) to remove the legacy OSDs. - - Before removing each OSD, ensure the PGs are all `active+clean` before continuing with the next OSD to ensure your data is safe. +Check if we have any `v1alpha1` CRD created in our kubernetes cluster -If you need to re-use your devices and add OSDs to the same devices, you'll need to zap a device before creating a new -OSD on the same device. For steps on zapping the device see the [Rook cleanup instructions](ceph-teardown.md#zapping-devices). +```console +kubectl get crd volumesnapshotclasses.snapshot.storage.k8s.io -o yaml |grep v1alpha1 + - name: v1alpha1 + - v1alpha1 +kubectl get crd volumesnapshotcontents.snapshot.storage.k8s.io -o yaml |grep v1alpha1 + - name: v1alpha1 + - v1alpha1 +kubectl get crd volumesnapshots.snapshot.storage.k8s.io -o yaml |grep v1alpha1 + - name: v1alpha1 + - v1alpha1 +``` + +As we have `v1alpha1` CRD created in our kubernetes cluster, we need to delete +the Alpha CRD + +```console +kubectl delete crd volumesnapshotclasses.snapshot.storage.k8s.io volumesnapshotcontents.snapshot.storage.k8s.io volumesnapshots.snapshot.storage.k8s.io + +customresourcedefinition.apiextensions.k8s.io "volumesnapshotclasses.snapshot.storage.k8s.io" deleted +customresourcedefinition.apiextensions.k8s.io "volumesnapshotcontents.snapshot.storage.k8s.io" deleted +customresourcedefinition.apiextensions.k8s.io "volumesnapshots.snapshot.storage.k8s.io" deleted +``` + +Finally, if you desire to use the beta snapshots, check that the [prerequisites](ceph-csi-snapshot.md#prerequisites) are met. -> **Removing OSDs and zapping devices is destructive so proceed with extreme caution** ## Upgrading the Rook-Ceph Operator ## Patch Release Upgrades Unless otherwise noted due to extenuating requirements, upgrades from one patch release of Rook to -another are as simple as updating the image of the Rook operator. For example, when Rook v1.3.1 is -released, the process of updating from v1.3.0 is as simple as running the following: +another are as simple as updating the image of the Rook operator. For example, when Rook v1.4.1 is +released, the process of updating from v1.4.0 is as simple as running the following: ```console -kubectl -n rook-ceph set image deploy/rook-ceph-operator rook-ceph-operator=rook/ceph:v1.3.1 +kubectl -n rook-ceph set image deploy/rook-ceph-operator rook-ceph-operator=rook/ceph:v1.4.1 ``` ## Helm Upgrades If you have installed Rook via the Helm chart, Helm will handle some details of the upgrade for you. -In particular, Helm will handle updating the RBAC and trigger the operator update. -The details expected to be handled by Helm will be noted in each section as follows: +In particular, Helm will handle updating the RBAC and trigger the operator update and restart. -> Automatically updated if you are upgrading via the helm chart -## Upgrading from v1.2 to v1.3 +## Upgrading from v1.3 to v1.4 **Rook releases from master are expressly unsupported.** It is strongly recommended that you use [official releases](https://github.com/rook/rook/releases) of Rook. Unreleased versions from the @@ -170,12 +184,6 @@ export ROOK_SYSTEM_NAMESPACE="rook-ceph" export ROOK_NAMESPACE="rook-ceph" ``` -You must also update one of the upgrade manifests to set the namespace for your -unique cluster if you aren't using the default `rook-ceph` namespace above. -```sh -sed -i.bak "s/namespace: rook-ceph/namespace: $ROOK_NAMESPACE/g" upgrade-from-v1.2-apply.yaml -``` - In order to successfully upgrade a Rook cluster, the following prerequisites must be met: * The cluster should be in a healthy state with full functionality. Review the @@ -183,8 +191,11 @@ In order to successfully upgrade a Rook cluster, the following prerequisites mus starting state. * All pods consuming Rook storage should be created, running, and in a steady state. No Rook persistent volumes should be in the act of being created or deleted. -* Your Helm version should be newer than v3.2.0 for avoiding [this issue](https://github.com/helm/helm/issues/7697). -* For the already deployed Rook cluster with the Helm older than v3.2.0, you also need to execute the following commands. + +### Helm + +* Your Helm version should be newer than v3.2.0 to avoid [this issue](https://github.com/helm/helm/issues/7697). +* For a Rook cluster already deployed with Helm older than v3.2.0, also execute the following commands. ```sh KIND=ClusterRole @@ -215,7 +226,6 @@ In a healthy Rook cluster, the operator, the agents and all Rook namespace pods `Running` state and have few, if any, pod restarts. To verify this, run the following commands: ```sh -kubectl -n $ROOK_SYSTEM_NAMESPACE get pods kubectl -n $ROOK_NAMESPACE get pods ``` @@ -228,6 +238,7 @@ The Rook toolbox contains the Ceph tools that can give you status details of the TOOLS_POD=$(kubectl -n $ROOK_NAMESPACE get pod -l "app=rook-ceph-tools" -o jsonpath='{.items[0].metadata.name}') kubectl -n $ROOK_NAMESPACE exec -it $TOOLS_POD -- ceph status ``` + ```console cluster: id: a3f4d647-9538-4aff-9fd1-b845873c3fe9 @@ -267,6 +278,11 @@ be an issue that needs to be investigated further. There are other commands you details on the health of the system, such as `ceph osd status`. See the [Ceph troubleshooting docs](https://docs.ceph.com/docs/master/rados/troubleshooting/) for help. +Rook will prevent the upgrade of the Ceph daemons if the health is in a `HEALTH_ERR` state. +If you desired to proceed with the upgrade anyway, you will need to set either +`skipUpgradeChecks: true` or `continueUpgradeAfterChecksEvenIfNotHealthy: true` +as described in the [cluster CR settings](https://rook.github.io/docs/rook/v1.4/ceph-cluster-crd.html#cluster-settings). + ### Container Versions The container version running in a specific pod in the Rook cluster can be verified in its pod spec @@ -274,12 +290,10 @@ output. For example for the monitor pod `mon-b`, we can verify the container ver with the below commands: ```sh -POD_NAME=$(kubectl -n $ROOK_NAMESPACE get pod -o custom-columns=name:.metadata.name --no-headers | grep rook-ceph-mon-b) +POD_NAME=$(kubectl -n $ROOK_NAMESPACE get pod -o custom-columns=name:.metadata.name --no-headers | grep rook-ceph-mon-a) kubectl -n $ROOK_NAMESPACE get pod ${POD_NAME} -o jsonpath='{.spec.containers[0].image}' ``` -### All Pods Status and Version - The status and container versions for all Rook pods can be collected all at once with the following commands: @@ -310,11 +324,9 @@ Any pod that is using a Rook volume should also remain healthy: ## Rook Operator Upgrade Process -In the examples given in this guide, we will be upgrading a live Rook cluster running `v1.2.7` to -the version `v1.3.0`. This upgrade should work from any official patch release of Rook v1.2 to any -official patch release of v1.3. We will further assume that your previous cluster was created using -an earlier version of this guide and manifests. If you have created custom manifests, these steps -may not work as written. +In the examples given in this guide, we will be upgrading a live Rook cluster running `v1.3.8` to +the version `v1.4.0`. This upgrade should work from any official patch release of Rook v1.3 to any +official patch release of v1.4. **Rook release from `master` are expressly unsupported.** It is strongly recommended that you use [official releases](https://github.com/rook/rook/releases) of Rook. Unreleased versions from the @@ -324,46 +336,41 @@ time without compatibility support and without prior notice. Let's get started! -## 0. Update Ceph to Nautilus version 14.2.5 or higher +## 1. Remove Alpha Snapshots -As described above in the [Before You Upgrade](#before-you-upgrade) section, you must upgrade to -Nautilus version 14.2.5 or higher before upgrading to Rook v1.3. - -## 1. Migrate Legacy OSDs - -As described above in the [Before You Upgrade](#before-you-upgrade) section, it is recommended to migrate legacy OSDs -before upgrading to Rook v1.3. +As described above in the [CSI Snapshots](#csi-snapshots) section, if you are using alpha snapshots +it is required to remove them before the upgrade since they are not compatible with beta snaphots +available with Ceph-CSI v3.0. ## 2. Update the RBAC and CRDs > Automatically updated if you are upgrading via the helm chart -First apply new resources. This includes slightly modified privileges (RBAC) needed by the Operator. -Also update Ceph Custom Resource Definitions (CRDs) at this time. Many CRDs have had a `status` item -added to them which must be present for Rook v1.3 to update CRD statuses. +First apply new resources. This includes slightly modified privileges (RBAC) needed by the Operator +and updates to the Custom Resource Definitions (CRDs). ```sh -kubectl apply -f upgrade-from-v1.2-apply.yaml -f upgrade-from-v1.2-crds.yaml +kubectl delete -f upgrade-from-v1.3-delete.yaml +kubectl apply -f upgrade-from-v1.3-apply.yaml -f upgrade-from-v1.3-crds.yaml ``` -## 3. Update Ceph CSI version to v2.0 +## 3. Update Ceph CSI version to v3.0 -If you have specified custom CSI images in the Rook-Ceph Operator deployment, you should update your -the deployment to use the latest Ceph-CSI v2.0 and related drivers. If you have not specified custom -CSI images in the Operator deployment this step is unnecessary since Rook v1.3 will use the latest -drivers by default. +> Rook v1.4 will install Ceph-CSI v3.0 use the latest drivers by default. +> If you have not specified custom CSI images in the Operator deployment this step is unnecessary. -See the section [CSI Updates](#csi-updates) for details about how to do this. +If you have specified custom CSI images in the Rook-Ceph Operator deployment, it is recommended to update to use the latest Ceph-CSI v3.0 driver. +See the section [CSI Version](#csi-version) for more details. ## 4. Update the Rook Operator > Automatically updated if you are upgrading via the helm chart -The largest portion of the upgrade is triggered when the operator's image is updated to `v1.3.x`. +The largest portion of the upgrade is triggered when the operator's image is updated to `v1.4.x`. When the operator is updated, it will proceed to update all of the Ceph daemons. ```sh -kubectl -n $ROOK_SYSTEM_NAMESPACE set image deploy/rook-ceph-operator rook-ceph-operator=rook/ceph:v1.3.0 +kubectl -n $ROOK_SYSTEM_NAMESPACE set image deploy/rook-ceph-operator rook-ceph-operator=rook/ceph:v1.4.0 ``` ## 5. Wait for the upgrade to complete @@ -371,62 +378,59 @@ kubectl -n $ROOK_SYSTEM_NAMESPACE set image deploy/rook-ceph-operator rook-ceph- Watch now in amazement as the Ceph mons, mgrs, OSDs, rbd-mirrors, MDSes and RGWs are terminated and replaced with updated versions in sequence. The cluster may be offline very briefly as mons update, and the Ceph Filesystem may fall offline a few times while the MDSes are upgrading. This is normal. -Continue on to the next upgrade step while the update is commencing. -Before moving on, the Ceph cluster's core (RADOS) components (i.e., mons, mgrs, and OSDs) must be -fully updated. +The versions of the components can be viewed as they are updated: ```sh watch --exec kubectl -n $ROOK_NAMESPACE get deployments -l rook_cluster=$ROOK_NAMESPACE -o jsonpath='{range .items[*]}{.metadata.name}{" \treq/upd/avl: "}{.spec.replicas}{"/"}{.status.updatedReplicas}{"/"}{.status.readyReplicas}{" \trook-version="}{.metadata.labels.rook-version}{"\n"}{end}' ``` -As an example, this cluster is midway through updating the OSDs from v1.2 to v1.3. When all -deployments report `1/1/1` availability and `rook-version=v1.3.0`, the Ceph cluster's core +As an example, this cluster is midway through updating the OSDs from v1.3 to v1.4. When all +deployments report `1/1/1` availability and `rook-version=v1.4.0`, the Ceph cluster's core components are fully updated. ```console Every 2.0s: kubectl -n rook-ceph get deployment -o j... -rook-ceph-mgr-a req/upd/avl: 1/1/1 rook-version=v1.3.0 -rook-ceph-mon-a req/upd/avl: 1/1/1 rook-version=v1.3.0 -rook-ceph-mon-b req/upd/avl: 1/1/1 rook-version=v1.3.0 -rook-ceph-mon-c req/upd/avl: 1/1/1 rook-version=v1.3.0 -rook-ceph-osd-0 req/upd/avl: 1// rook-version=v1.3.0 -rook-ceph-osd-1 req/upd/avl: 1/1/1 rook-version=v1.2.7 -rook-ceph-osd-2 req/upd/avl: 1/1/1 rook-version=v1.2.7 +rook-ceph-mgr-a req/upd/avl: 1/1/1 rook-version=v1.4.0 +rook-ceph-mon-a req/upd/avl: 1/1/1 rook-version=v1.4.0 +rook-ceph-mon-b req/upd/avl: 1/1/1 rook-version=v1.4.0 +rook-ceph-mon-c req/upd/avl: 1/1/1 rook-version=v1.4.0 +rook-ceph-osd-0 req/upd/avl: 1// rook-version=v1.4.0 +rook-ceph-osd-1 req/upd/avl: 1/1/1 rook-version=v1.3.8 +rook-ceph-osd-2 req/upd/avl: 1/1/1 rook-version=v1.3.8 ``` -The MDS, NFS, and RGW daemons are the last to update. An easy check to see if the upgrade is totally -finished is to check that there is only one `rook-version` reported across the cluster. It is safe -to proceed with the next step before the MDSes and RGWs are finished updating. +An easy check to see if the upgrade is totally +finished is to check that there is only one `rook-version` reported across the cluster. ```console # kubectl -n $ROOK_NAMESPACE get deployment -l rook_cluster=$ROOK_NAMESPACE -o jsonpath='{range .items[*]}{"rook-version="}{.metadata.labels.rook-version}{"\n"}{end}' | sort | uniq This cluster is not yet finished: - rook-version=v1.2.7 - rook-version=v1.3.0 + rook-version=v1.3.8 + rook-version=v1.4.0 This cluster is finished: - rook-version=v1.3.0 + rook-version=v1.4.0 ``` ## 6. Verify the updated cluster -At this point, your Rook operator should be running version `rook/ceph:v1.3.0`. +At this point, your Rook operator should be running version `rook/ceph:v1.4.0`. Verify the Ceph cluster's health using the [health verification section](#health-verification). ## Ceph Version Upgrades -Rook v1.3 supports Ceph Nautilus 14.2.5 or newer and Ceph Octopus v15.2.0 or newer. These are the +Rook v1.4 supports Ceph Nautilus 14.2.5 or newer and Ceph Octopus v15.2.0 or newer. These are the only supported major versions of Ceph. > **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.** Rook is cautious when performing upgrades. When an upgrade is requested (the Ceph image has been updated in the CR), Rook will go through all the daemons one by one and will individually perform -checks on them. It will make sure a particular daemon can be stopped before performing the upgrade, -once the deployment has been updated, it checks if this is ok to continue. After each daemon is +checks on them. It will make sure a particular daemon can be stopped before performing the upgrade. +Once the deployment has been updated, it checks if this is ok to continue. After each daemon is updated we wait for things to settle (monitors to be in a quorum, PGs to be clean for OSDs, up for MDSs, etc.), then only when the condition is met we move to the next daemon. We repeat this process until all the daemons have been updated. @@ -436,7 +440,7 @@ until all the daemons have been updated. Official Ceph container images can be found on [Docker Hub](https://hub.docker.com/r/ceph/ceph/tags/). These images are tagged in a few ways: -* The most explicit form of tags are full-ceph-version-and-build tags (e.g., `v15.2.0-20200324`). +* The most explicit form of tags are full-ceph-version-and-build tags (e.g., `v15.2.4-20200630`). These tags are recommended for production clusters, as there is no possibility for the cluster to be heterogeneous with respect to the version of Ceph running in containers. * Ceph major version tags (e.g., `v15`) are useful for development and test clusters so that the @@ -449,7 +453,7 @@ These images are tagged in a few ways: #### 1. Update the main Ceph daemons The majority of the upgrade will be handled by the Rook operator. Begin the upgrade by changing the -Ceph image field in the cluster CRD (`spec:cephVersion:image`). +Ceph image field in the cluster CRD (`spec.cephVersion.image`). ```sh NEW_CEPH_IMAGE='ceph/ceph:v15.2.4-20200630' @@ -472,119 +476,51 @@ Determining when the Ceph has fully updated is rather simple. # kubectl -n $ROOK_NAMESPACE get deployment -l rook_cluster=$ROOK_NAMESPACE -o jsonpath='{range .items[*]}{"ceph-version="}{.metadata.labels.ceph-version}{"\n"}{end}' | sort | uniq This cluster is not yet finished: ceph-version=14.2.7-0 - ceph-version=15.2.0-0 + ceph-version=15.2.4-0 This cluster is finished: - ceph-version=15.2.0-0 + ceph-version=15.2.4-0 ``` #### 3. Verify the updated cluster Verify the Ceph cluster's health using the [health verification section](#health-verification). -If you see a health warning about enabling msgr2, please see the section in the Rook v1.0 guide on -[updating the mon ports](https://rook.io/docs/rook/v1.0/ceph-upgrade.html#6-update-the-mon-ports). +## CSI Version + +If you have a cluster running with CSI drivers enabled and you want to configure Rook +to use non-default CSI images, the following settings will need to be applied for the desired +version of CSI. + +The operator configuration variables have recently moved from the operator deployment to the +`rook-ceph-operator-config` ConfigMap. The values in the operator deployment can still be set, +but if the ConfigMap settings are applied, they will override the operator deployment settings. + +> If the cluster was originally installed prior to v1.3, the configmap may not exist. +> See the latest operator.yaml for example configmap settings. -```sh -TOOLS_POD=$(kubectl -n $ROOK_NAMESPACE get pod -l "app=rook-ceph-tools" -o jsonpath='{.items[0].metadata.name}') -kubectl -n $ROOK_NAMESPACE exec -it $TOOLS_POD -- ceph status -``` ```console - cluster: - id: b02807da-986a-40b0-ab7a-fa57582b1e4f - health: HEALTH_WARN - 3 monitors have not enabled msgr2 +kubectl -n $ROOK_NAMESPACE edit configmap rook-ceph-operator-config ``` -Alternatively, this warning can suppressed if a temporary workaround is needed. +The default upstream images are included below, which you can change to your desired images. -```sh -TOOLS_POD=$(kubectl -n $ROOK_NAMESPACE get pod -l "app=rook-ceph-tools" -o jsonpath='{.items[0].metadata.name}') -kubectl -n $ROOK_NAMESPACE exec -it $TOOLS_POD -- ceph config set global mon_warn_on_msgr2_not_enabled false -``` - - -## CSI Updates -If you have a cluster running with CSI drivers enabled and you have configured the Rook-Ceph -Operator to use custom CSI images, the environment (`env`) variables need to be updated -periodically. If this is the case, it is easiest to `kubectl edit` the Operator Deployment and -modify everything needed at once. You can switch between using Rook-Ceph's default CSI images and -custom CSI images as you wish. - -### Update snapshot CRD from Alpha to Beta - -Since CSI snapshot has a breaking change, we need to delete the snapshotter Alpha CRD -created by external-snapshotter sidecar container. - -As we are updating the snapshot resources from `Alpha` to `Beta` we need to -delete the old `alphav1` snapshot CRD created by external-snapshotter sidecar container - -Check if we have any `v1alpha1` CRD created in our kubernetes cluster - -```bash -[$]kubectl get crd volumesnapshotclasses.snapshot.storage.k8s.io -o yaml |grep v1alpha1 - - name: v1alpha1 - - v1alpha1 -[$]kubectl get crd volumesnapshotcontents.snapshot.storage.k8s.io -o yaml |grep v1alpha1 - - name: v1alpha1 - - v1alpha1 -[$]kubectl get crd volumesnapshots.snapshot.storage.k8s.io -o yaml |grep v1alpha1 - - name: v1alpha1 - - v1alpha1 -``` - -As we have `v1alpha1` CRD created in our kubernetes cluster, we need to delete -the Alpha CRD - -```bash -[$]kubectl delete crd volumesnapshotclasses.snapshot.storage.k8s.io -customresourcedefinition.apiextensions.k8s.io "volumesnapshotclasses.snapshot.storage.k8s.io" deleted -[$]kubectl delete crd volumesnapshotcontents.snapshot.storage.k8s.io -customresourcedefinition.apiextensions.k8s.io "volumesnapshotcontents.snapshot.storage.k8s.io" deleted -[$]kubectl delete crd volumesnapshots.snapshot.storage.k8s.io -customresourcedefinition.apiextensions.k8s.io "volumesnapshots.snapshot.storage.k8s.io" deleted -``` - -We need to ensure [prerequisites](ceph-csi-drivers.md#Prerequisites) are met for snapshotter - -### Update the RBAC required for external-snapshotter - -The RBAC required for snapshotter beta is sightly changes,we need to apply new -RBAC for snapshotter to work. - -```sh -kubectl apply -f upgrade-from-v1.3-apply.yaml +```yaml +ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.0.0" +ROOK_CSI_REGISTRAR_IMAGE: "quay.io/k8scsi/csi-node-driver-registrar:v1.2.0" +ROOK_CSI_PROVISIONER_IMAGE: "quay.io/k8scsi/csi-provisioner:v1.6.0" +ROOK_CSI_SNAPSHOTTER_IMAGE: "quay.io/k8scsi/csi-snapshotter:v2.1.1" +ROOK_CSI_ATTACHER_IMAGE: "quay.io/k8scsi/csi-attacher:v2.1.0" +ROOK_CSI_RESIZER_IMAGE: "quay.io/k8scsi/csi-resizer:v0.4.0" ``` ### Use default images + If you would like Rook to use the inbuilt default upstream images, then you may simply remove all -`env` variables matching `ROOK_CSI_*_IMAGE` from the Rook-Ceph operator deployment. - -### Use custom images -OR, if you would like to use images hosted in a different location like a local image registry, then -the following `env` variables will need to be configured in the Rook-Ceph operator deployment. The -suggested upstream images are included below, which you should change to match where your images are -located. - -```yaml - env: - - name: ROOK_CSI_CEPH_IMAGE - value: "quay.io/cephcsi/cephcsi:v3.0.0" - - name: ROOK_CSI_REGISTRAR_IMAGE - value: "quay.io/k8scsi/csi-node-driver-registrar:v1.2.0" - - name: ROOK_CSI_PROVISIONER_IMAGE - value: "quay.io/k8scsi/csi-provisioner:v1.6.0" - - name: ROOK_CSI_SNAPSHOTTER_IMAGE - value: "quay.io/k8scsi/csi-snapshotter:v2.1.1" - - name: ROOK_CSI_ATTACHER_IMAGE - value: "quay.io/k8scsi/csi-attacher:v2.1.0" - - name: ROOK_CSI_RESIZER_IMAGE - value: "quay.io/k8scsi/csi-resizer:v0.4.0" -``` +variables matching `ROOK_CSI_*_IMAGE` from the above ConfigMap and/or the operator deployment. ### Verifying updates -You can use the below command to see the CSI images currently being used in the cluster. Once there -is only a single version of each image and the version is the latest one you expect, the CSI pods -are updated. + +You can use the below command to see the CSI images currently being used in the cluster. ```console # kubectl --namespace rook-ceph get pod -o jsonpath='{range .items[*]}{range .spec.containers[*]}{.image}{"\n"}' -l 'app in (csi-rbdplugin,csi-rbdplugin-provisioner,csi-cephfsplugin,csi-cephfsplugin-provisioner)' | sort | uniq diff --git a/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-apply.yaml b/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-apply.yaml deleted file mode 100644 index 09886d998..000000000 --- a/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-apply.yaml +++ /dev/null @@ -1,281 +0,0 @@ -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-external-provisioner-runner-rules - labels: - rbac.ceph.rook.io/aggregate-to-cephfs-external-provisioner-runner: "true" -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "delete", "update", "patch"] - - apiGroups: [""] - resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["list", "watch", "create", "update", "patch"] - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update", "patch"] - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["persistentvolumeclaims/status"] - verbs: ["update", "patch"] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-external-provisioner-runner-rules - labels: - rbac.ceph.rook.io/aggregate-to-rbd-external-provisioner-runner: "true" -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "delete", "update", "patch"] - - apiGroups: [""] - resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update", "patch"] - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "watch"] - - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["list", "watch", "create", "update", "patch"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshots"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshotcontents"] - verbs: ["create", "get", "list", "watch", "update", "delete"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshotclasses"] - verbs: ["get", "list", "watch"] - - apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["create", "list", "watch", "delete", "get", "update"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshots/status"] - verbs: ["update"] - - apiGroups: [""] - resources: ["persistentvolumeclaims/status"] - verbs: ["update", "patch"] ---- -# Aspects of ceph-mgr that operate within the cluster's namespace -kind: Role -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: rook-ceph-mgr - namespace: rook-ceph -rules: -- apiGroups: - - "" - resources: - - pods - - services - - pods/log - verbs: - - get - - list - - watch - - delete -- apiGroups: - - batch - resources: - - jobs - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - ceph.rook.io - resources: - - "*" - verbs: - - "*" ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: rook-ceph-global-rules - labels: - operator: rook - storage-backend: ceph - rbac.ceph.rook.io/aggregate-to-rook-ceph-global: "true" -rules: -- apiGroups: - - "" - resources: - # Pod access is needed for fencing - - pods - # Node access is needed for determining nodes where mons should run - - nodes - - nodes/proxy - - services - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - events - # PVs and PVCs are managed by the Rook provisioner - - persistentvolumes - - persistentvolumeclaims - - endpoints - verbs: - - get - - list - - watch - - patch - - create - - update - - delete -- apiGroups: - - storage.k8s.io - resources: - - storageclasses - verbs: - - get - - list - - watch -- apiGroups: - - batch - resources: - - jobs - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - ceph.rook.io - resources: - - "*" - verbs: - - "*" -- apiGroups: - - rook.io - resources: - - "*" - verbs: - - "*" -- apiGroups: - - policy - - apps - resources: - # This is for the clusterdisruption controller - - poddisruptionbudgets - # This is for both clusterdisruption and nodedrain controllers - - deployments - - replicasets - verbs: - - "*" -- apiGroups: - - healthchecking.openshift.io - resources: - - machinedisruptionbudgets - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - machine.openshift.io - resources: - - machines - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - storage.k8s.io - resources: - - csidrivers - verbs: - - create ---- -# Rook Ceph Operator Config ConfigMap -# Use this ConfigMap to override Rook-Ceph Operator configurations. -# NOTE! Precedence will be given to this config if the same Env Var config also exists in the -# Operator Deployment. -# To move a configuration(s) from the Operator Deployment to this ConfigMap, add the config -# here. It is recommended to then remove it from the Deployment to eliminate any future confusion. -kind: ConfigMap -apiVersion: v1 -metadata: - name: rook-ceph-operator-config - # should be in the namespace of the operator - namespace: rook-ceph -data: ---- -# The role for the operator to manage resources in its own namespace -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: rook-ceph-system - namespace: rook-ceph - labels: - operator: rook - storage-backend: ceph -rules: -- apiGroups: - - "" - resources: - - pods - - configmaps - - services - verbs: - - get - - list - - watch - - patch - - create - - update - - delete -- apiGroups: - - apps - resources: - - daemonsets - - statefulsets - - deployments - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - k8s.cni.cncf.io - resources: - - network-attachment-definitions - verbs: - - get diff --git a/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-crds.yaml b/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-crds.yaml deleted file mode 100644 index 8f0885e6f..000000000 --- a/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-crds.yaml +++ /dev/null @@ -1,529 +0,0 @@ -# Latest custom resource definitions -# Do NOT apply this until after all Rook-Ceph clusters have been updated ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephclusters.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephCluster - listKind: CephClusterList - plural: cephclusters - singular: cephcluster - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - annotations: {} - cephVersion: - properties: - allowUnsupported: - type: boolean - image: - type: string - dashboard: - properties: - enabled: - type: boolean - urlPrefix: - type: string - port: - type: integer - minimum: 0 - maximum: 65535 - ssl: - type: boolean - dataDirHostPath: - pattern: ^/(\S+) - type: string - disruptionManagement: - properties: - machineDisruptionBudgetNamespace: - type: string - managePodBudgets: - type: boolean - osdMaintenanceTimeout: - type: integer - manageMachineDisruptionBudgets: - type: boolean - skipUpgradeChecks: - type: boolean - continueUpgradeAfterChecksEvenIfNotHealthy: - type: boolean - mon: - properties: - allowMultiplePerNode: - type: boolean - count: - maximum: 9 - minimum: 0 - type: integer - volumeClaimTemplate: {} - mgr: - properties: - modules: - items: - properties: - name: - type: string - enabled: - type: boolean - network: - properties: - hostNetwork: - type: boolean - provider: - type: string - selectors: {} - storage: - properties: - disruptionManagement: - properties: - machineDisruptionBudgetNamespace: - type: string - managePodBudgets: - type: boolean - osdMaintenanceTimeout: - type: integer - manageMachineDisruptionBudgets: - type: boolean - useAllNodes: - type: boolean - nodes: - items: - properties: - name: - type: string - config: - properties: - metadataDevice: - type: string - storeType: - type: string - pattern: ^(filestore|bluestore)$ - databaseSizeMB: - type: string - walSizeMB: - type: string - journalSizeMB: - type: string - osdsPerDevice: - type: string - encryptedDevice: - type: string - pattern: ^(true|false)$ - useAllDevices: - type: boolean - deviceFilter: - type: string - devicePathFilter: - type: string - devices: - type: array - items: - properties: - name: - type: string - config: {} - resources: {} - type: array - useAllDevices: - type: boolean - deviceFilter: - type: string - devicePathFilter: - type: string - config: {} - storageClassDeviceSets: {} - monitoring: - properties: - enabled: - type: boolean - rulesNamespace: - type: string - rbdMirroring: - properties: - workers: - type: integer - removeOSDsIfOutAndSafeToRemove: - type: boolean - external: - properties: - enable: - type: boolean - cleanupPolicy: - properties: - deleteDataDirOnHosts: - type: string - pattern: ^$|^yes-really-destroy-data$ - placement: {} - resources: {} - # somehow this is breaking the status, but let's keep this here so we don't forget it once we move to controller-runtime - # subresources: - # status: {} - additionalPrinterColumns: - - name: DataDirHostPath - type: string - description: Directory used on the K8s nodes - JSONPath: .spec.dataDirHostPath - - name: MonCount - type: string - description: Number of MONs - JSONPath: .spec.mon.count - - name: Age - type: date - JSONPath: .metadata.creationTimestamp - - name: Phase - type: string - description: Phase - JSONPath: .status.phase - - name: Message - type: string - description: Message - JSONPath: .status.message - - name: Health - type: string - description: Ceph Health - JSONPath: .status.ceph.health ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephclients.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephClient - listKind: CephClientList - plural: cephclients - singular: cephclient - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - caps: - type: object - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephfilesystems.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystem - listKind: CephFilesystemList - plural: cephfilesystems - singular: cephfilesystem - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - metadataServer: - properties: - activeCount: - minimum: 1 - maximum: 10 - type: integer - activeStandby: - type: boolean - annotations: {} - placement: {} - resources: {} - metadataPool: - properties: - failureDomain: - type: string - replicated: - properties: - size: - minimum: 0 - maximum: 10 - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - minimum: 0 - maximum: 10 - type: integer - codingChunks: - minimum: 0 - maximum: 10 - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - dataPools: - type: array - items: - properties: - failureDomain: - type: string - replicated: - properties: - size: - minimum: 0 - maximum: 10 - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - minimum: 0 - maximum: 10 - type: integer - codingChunks: - minimum: 0 - maximum: 10 - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - preservePoolsOnDelete: - type: boolean - additionalPrinterColumns: - - name: ActiveMDS - type: string - description: Number of desired active MDS daemons - JSONPath: .spec.metadataServer.activeCount - - name: Age - type: date - JSONPath: .metadata.creationTimestamp - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephnfses.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephNFS - listKind: CephNFSList - plural: cephnfses - singular: cephnfs - shortNames: - - nfs - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - rados: - properties: - pool: - type: string - namespace: - type: string - server: - properties: - active: - type: integer - annotations: {} - placement: {} - resources: {} - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectstores.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStore - listKind: CephObjectStoreList - plural: cephobjectstores - singular: cephobjectstore - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - gateway: - properties: - type: - type: string - sslCertificateRef: {} - port: - type: integer - minimum: 1 - maximum: 65535 - securePort: {} - instances: - type: integer - annotations: {} - placement: {} - resources: {} - metadataPool: - properties: - failureDomain: - type: string - replicated: - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - dataPool: - properties: - failureDomain: - type: string - replicated: - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - preservePoolsOnDelete: - type: boolean - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectstoreusers.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStoreUser - listKind: CephObjectStoreUserList - plural: cephobjectstoreusers - singular: cephobjectstoreuser - shortNames: - - rcou - - objectuser - scope: Namespaced - version: v1 - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephblockpools.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBlockPool - listKind: CephBlockPoolList - plural: cephblockpools - singular: cephblockpool - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - failureDomain: - type: string - replicated: - properties: - size: - type: integer - minimum: 0 - maximum: 9 - targetSizeRatio: - type: number - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - minimum: 0 - maximum: 9 - codingChunks: - type: integer - minimum: 0 - maximum: 9 - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: volumes.rook.io -spec: - group: rook.io - names: - kind: Volume - listKind: VolumeList - plural: volumes - singular: volume - shortNames: - - rv - scope: Namespaced - version: v1alpha2 - subresources: - status: {} \ No newline at end of file diff --git a/cluster/examples/kubernetes/ceph/upgrade-from-v1.3-crds.yaml b/cluster/examples/kubernetes/ceph/upgrade-from-v1.3-crds.yaml index 604cd52b4..a717e731d 100644 --- a/cluster/examples/kubernetes/ceph/upgrade-from-v1.3-crds.yaml +++ b/cluster/examples/kubernetes/ceph/upgrade-from-v1.3-crds.yaml @@ -1,29 +1,3 @@ -# Latest custom resource definitions -# Do NOT apply this until after all Rook-Ceph clusters have been updated ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephrbdmirrors.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephRBDMirror - listKind: CephRBDMirrorList - plural: cephrbdmirrrors - singular: cephrbdmirror - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - count: - type: integer - subresources: - status: {} ---- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: @@ -128,7 +102,7 @@ spec: type: string storeType: type: string - pattern: ^(filestore|bluestore)$ + pattern: ^(bluestore)$ databaseSizeMB: type: string walSizeMB: @@ -163,12 +137,30 @@ spec: type: string config: {} storageClassDeviceSets: {} + driveGroups: + type: array + nullable: true + items: + properties: + name: + type: string + spec: {} + placement: {} + required: + - name + - spec monitoring: properties: enabled: type: boolean rulesNamespace: type: string + externalMgrEndpoints: + type: array + items: + properties: + ip: + type: string removeOSDsIfOutAndSafeToRemove: type: boolean external: @@ -177,9 +169,20 @@ spec: type: boolean cleanupPolicy: properties: - deleteDataDirOnHosts: + confirmation: type: string pattern: ^$|^yes-really-destroy-data$ + sanitizeDisks: + properties: + method: + type: string + pattern: ^(complete|quick)$ + dataSource: + type: string + pattern: ^(zero|random)$ + iteration: + type: integer + format: int32 placement: {} resources: {} healthCheck: {} @@ -213,14 +216,14 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: cephobjectstores.ceph.rook.io + name: cephclients.ceph.rook.io spec: group: ceph.rook.io names: - kind: CephObjectStore - listKind: CephObjectStoreList - plural: cephobjectstores - singular: cephobjectstore + kind: CephClient + listKind: CephClientList + plural: cephclients + singular: cephclient scope: Namespaced version: v1 validation: @@ -228,191 +231,38 @@ spec: properties: spec: properties: - gateway: - properties: - type: - type: string - sslCertificateRef: {} - port: - type: integer - minimum: 1 - maximum: 65535 - securePort: {} - instances: - type: integer - externalRgwEndpoints: - type: array - items: - properties: - ip: - type: string - annotations: {} - placement: {} - resources: {} - metadataPool: - properties: - failureDomain: - type: string - replicated: - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - dataPool: - properties: - failureDomain: - type: string - replicated: - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - preservePoolsOnDelete: - type: boolean - healthCheck: - properties: - bucket: - properties: - enabled: - type: boolean - interval: - type: string - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectrealms.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectRealm - listKind: CephObjectRealmList - plural: cephobjectrealms - singular: cephobjectrealm - scope: Namespaced - version: v1 - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectzonegroups.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZoneGroup - listKind: CephObjectZoneGroupList - plural: cephobjectzonegroups - singular: cephobjectzonegroup - scope: Namespaced - version: v1 - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectzones.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZone - listKind: CephObjectZoneList - plural: cephobjectzones - singular: cephobjectzone - scope: Namespaced - version: v1 - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephblockpools.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBlockPool - listKind: CephBlockPoolList - plural: cephblockpools - singular: cephblockpool - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - failureDomain: - type: string - replicated: - properties: - size: - type: integer - minimum: 0 - maximum: 9 - targetSizeRatio: - type: number - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - minimum: 0 - maximum: 9 - codingChunks: - type: integer - minimum: 0 - maximum: 9 - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: + caps: type: object subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition +metadata: + name: cephrbdmirrors.ceph.rook.io +spec: + group: ceph.rook.io + names: + kind: CephRBDMirror + listKind: CephRBDMirrorList + plural: cephrbdmirrors + singular: cephrbdmirror + scope: Namespaced + version: v1 + validation: + openAPIV3Schema: + properties: + spec: + properties: + count: + type: integer + minimum: 1 + maximum: 100 + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition metadata: name: cephfilesystems.ceph.rook.io spec: @@ -519,6 +369,42 @@ spec: --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition +metadata: + name: cephnfses.ceph.rook.io +spec: + group: ceph.rook.io + names: + kind: CephNFS + listKind: CephNFSList + plural: cephnfses + singular: cephnfs + shortNames: + - nfs + scope: Namespaced + version: v1 + validation: + openAPIV3Schema: + properties: + spec: + properties: + rados: + properties: + pool: + type: string + namespace: + type: string + server: + properties: + active: + type: integer + annotations: {} + placement: {} + resources: {} + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition metadata: name: cephobjectstores.ceph.rook.io spec: @@ -619,4 +505,186 @@ spec: interval: type: string subresources: - status: {} \ No newline at end of file + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: cephobjectstoreusers.ceph.rook.io +spec: + group: ceph.rook.io + names: + kind: CephObjectStoreUser + listKind: CephObjectStoreUserList + plural: cephobjectstoreusers + singular: cephobjectstoreuser + shortNames: + - rcou + - objectuser + scope: Namespaced + version: v1 + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: cephobjectrealms.ceph.rook.io +spec: + group: ceph.rook.io + names: + kind: CephObjectRealm + listKind: CephObjectRealmList + plural: cephobjectrealms + singular: cephobjectrealm + scope: Namespaced + version: v1 + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: cephobjectzonegroups.ceph.rook.io +spec: + group: ceph.rook.io + names: + kind: CephObjectZoneGroup + listKind: CephObjectZoneGroupList + plural: cephobjectzonegroups + singular: cephobjectzonegroup + scope: Namespaced + version: v1 + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: cephobjectzones.ceph.rook.io +spec: + group: ceph.rook.io + names: + kind: CephObjectZone + listKind: CephObjectZoneList + plural: cephobjectzones + singular: cephobjectzone + scope: Namespaced + version: v1 + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: cephblockpools.ceph.rook.io +spec: + group: ceph.rook.io + names: + kind: CephBlockPool + listKind: CephBlockPoolList + plural: cephblockpools + singular: cephblockpool + scope: Namespaced + version: v1 + validation: + openAPIV3Schema: + properties: + spec: + properties: + failureDomain: + type: string + replicated: + properties: + size: + type: integer + minimum: 0 + maximum: 9 + targetSizeRatio: + type: number + requireSafeReplicaSize: + type: boolean + erasureCoded: + properties: + dataChunks: + type: integer + minimum: 0 + maximum: 9 + codingChunks: + type: integer + minimum: 0 + maximum: 9 + compressionMode: + type: string + enum: + - "" + - none + - passive + - aggressive + - force + parameters: + type: object + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: volumes.rook.io +spec: + group: rook.io + names: + kind: Volume + listKind: VolumeList + plural: volumes + singular: volume + shortNames: + - rv + scope: Namespaced + version: v1alpha2 + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: objectbuckets.objectbucket.io +spec: + group: objectbucket.io + versions: + - name: v1alpha1 + served: true + storage: true + names: + kind: ObjectBucket + listKind: ObjectBucketList + plural: objectbuckets + singular: objectbucket + shortNames: + - ob + - obs + scope: Cluster + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: objectbucketclaims.objectbucket.io +spec: + versions: + - name: v1alpha1 + served: true + storage: true + group: objectbucket.io + names: + kind: ObjectBucketClaim + listKind: ObjectBucketClaimList + plural: objectbucketclaims + singular: objectbucketclaim + shortNames: + - obc + - obcs + scope: Namespaced + subresources: + status: {} diff --git a/cluster/examples/kubernetes/ceph/upgrade-from-v1.3-delete.yaml b/cluster/examples/kubernetes/ceph/upgrade-from-v1.3-delete.yaml new file mode 100644 index 000000000..4f092e2d2 --- /dev/null +++ b/cluster/examples/kubernetes/ceph/upgrade-from-v1.3-delete.yaml @@ -0,0 +1,79 @@ +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: cephfs-csi-nodeplugin-rules +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: cephfs-external-provisioner-runner-rules +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rbd-csi-nodeplugin-rules +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rbd-external-provisioner-runner-rules +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rook-ceph-cluster-mgmt-rules +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rook-ceph-global-rules +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rook-ceph-mgr-cluster-rules +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rook-ceph-mgr-system-rules +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: cephfs-csi-nodeplugin +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: cephfs-external-provisioner-runner +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rbd-csi-nodeplugin +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rbd-external-provisioner-runner +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rook-ceph-cluster-mgmt +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rook-ceph-global +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rook-ceph-mgr-cluster +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: rook-ceph-mgr-system diff --git a/tests/framework/installer/ceph_manifests.go b/tests/framework/installer/ceph_manifests.go index 6f4cfd743..ecc7faa10 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -28,7 +28,7 @@ const ( // Version1_2 rook version 1.2 Version1_2 = "v1.2.7" // Version1_3 rook version 1.3 - Version1_3 = "v1.3.1" + Version1_3 = "v1.3.8" ) type CephManifests interface {