
Upgrades Rook Ceph to version 1.16.6 and its Ceph version to 18.2.5. Static overrides were adapted to the new Rook Ceph version. A new upgrade lifecycle is now used to make preparations on the upgrade process based on currently installed version. ECblock pools was renamed to be compliant to the upstream new Standard. This action aims to avoid the need to manually patch ECblock resources on every subsequent update. A job that monitors the removal of the CSI pluginholder pods was added. On rook ceph 1.16, pluginholder pods were deprecated, and, to avoid draining all nodes on the update process, a job that monitors all PVs is now deployed. As soon as all PVs are pointing to the updated CSI provisioner, the holderpods can be safely removed. The configuration for CSI readAffinity is transfered to the cephcluster resource when updating from 1.13 to 1.16 to solve the breaking change introduced on 1.14. The upgrade from 1.13 is currently not working in the DX platforms yet due to some floating monitor related issue. This will be covered in https://review.opendev.org/c/starlingx/app-rook-ceph/+/948487. Test Plan: PASS: Update app with ecblock on SX and check update was successfully without data loss PASS: Update app with holder pods and check their removal on ipv4 and ipv6 PASS: Update app with readAffinity option enabled on the previous version PASS: Update Ceph minor version to 18.2.5 PASS: Fresh install [SX/DX/DX+/STD] PASS: Update app from previous version and confirm all daemons are updated to new ceph/rook version [SX/DX+/STD] PASS: Ensure proper operation of services: cephfs, RBD, ecblock, RGW [SX/DX/DX+/STD] Story: 2011372 Task: 51748 Change-Id: I2684573940ff5bac4709157131c6e6aad9114ade Signed-off-by: Caio Correa <caio.correa@windriver.com> Signed-off-by: Ítalo Vieira <italo.gomesvieira@windriver.com>
132 lines
4.4 KiB
Diff
132 lines
4.4 KiB
Diff
From 853d5db8ad9077bf96f46952a30d80f62e1e3c9e Mon Sep 17 00:00:00 2001
|
|
From: Caio Correa <caio.correa@windriver.com>
|
|
Date: Fri, 5 Apr 2024 08:01:17 -0300
|
|
Subject: [PATCH] Add chart for duplex preparation
|
|
|
|
This patch adds a pre-install rook that edits the entrypoint to
|
|
rook-ceph-mon. On a duplex this entrypoint should be the floating IP
|
|
to acomplish the roaming mon strategy.
|
|
|
|
Signed-off-by: Caio Correa <caio.correa@windriver.com>
|
|
Signed-off-by: Ítalo Vieira <italo.gomesvieira@windriver.com>
|
|
---
|
|
.../pre-install-duplex-preparation.yaml | 82 +++++++++++++++++++
|
|
deploy/charts/rook-ceph-cluster/values.yaml | 18 ++++
|
|
2 files changed, 100 insertions(+)
|
|
create mode 100644 deploy/charts/rook-ceph-cluster/templates/pre-install-duplex-preparation.yaml
|
|
|
|
diff --git a/deploy/charts/rook-ceph-cluster/templates/pre-install-duplex-preparation.yaml b/deploy/charts/rook-ceph-cluster/templates/pre-install-duplex-preparation.yaml
|
|
new file mode 100644
|
|
index 000000000..aa276ec55
|
|
--- /dev/null
|
|
+++ b/deploy/charts/rook-ceph-cluster/templates/pre-install-duplex-preparation.yaml
|
|
@@ -0,0 +1,82 @@
|
|
+{{/*
|
|
+#
|
|
+# Copyright (c) 2020 Intel Corporation, Inc.
|
|
+#
|
|
+# SPDX-License-Identifier: Apache-2.0
|
|
+#
|
|
+*/}}
|
|
+
|
|
+{{- if .Values.hook.duplexPreparation.enable }}
|
|
+{{ $root := . }}
|
|
+---
|
|
+apiVersion: v1
|
|
+kind: ConfigMap
|
|
+metadata:
|
|
+ name: config-rook-ceph-duplex-preparation
|
|
+ namespace: {{ $root.Release.Namespace }}
|
|
+ annotations:
|
|
+ "helm.sh/hook": "pre-install"
|
|
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
|
|
+data:
|
|
+ rook_duplex_preparation.sh: |-
|
|
+ #!/bin/bash
|
|
+
|
|
+ cat > endpoint.yaml << EOF
|
|
+ apiVersion: v1
|
|
+ kind: ConfigMap
|
|
+ metadata:
|
|
+ name: rook-ceph-mon-endpoints
|
|
+ namespace: $NAMESPACE
|
|
+ data:
|
|
+ data: a=$FLOAT_IP:6789
|
|
+ mapping: '{"node":{"a":{"Name":"$ACTIVE_CONTROLLER","Hostname":"$ACTIVE_CONTROLLER","Address":"$FLOAT_IP"}}}'
|
|
+ maxMonId: "0"
|
|
+ EOF
|
|
+
|
|
+ kubectl apply -f endpoint.yaml
|
|
+
|
|
+ rm -f endpoint.yaml
|
|
+---
|
|
+apiVersion: batch/v1
|
|
+kind: Job
|
|
+metadata:
|
|
+ name: rook-ceph-duplex-preparation
|
|
+ namespace: {{ $root.Release.Namespace }}
|
|
+ labels:
|
|
+ heritage: {{$root.Release.Service | quote }}
|
|
+ release: {{$root.Release.Name | quote }}
|
|
+ chart: "{{$root.Chart.Name}}"
|
|
+ annotations:
|
|
+ "helm.sh/hook": "pre-install"
|
|
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
|
|
+spec:
|
|
+ template:
|
|
+ metadata:
|
|
+ name: rook-ceph-duplex-preparation
|
|
+ namespace: {{ $root.Release.Namespace }}
|
|
+ labels:
|
|
+ heritage: {{$root.Release.Service | quote }}
|
|
+ release: {{$root.Release.Name | quote }}
|
|
+ chart: "{{$root.Chart.Name}}"
|
|
+ spec:
|
|
+ serviceAccountName: rook-ceph-system
|
|
+ restartPolicy: OnFailure
|
|
+ volumes:
|
|
+ - name: config-rook-ceph-duplex-preparation
|
|
+ configMap:
|
|
+ name: config-rook-ceph-duplex-preparation
|
|
+ containers:
|
|
+ - name: duplex-preparation
|
|
+ image: {{ .Values.hook.image }}
|
|
+ command: [ "/bin/bash", "/tmp/mount/rook_duplex_preparation.sh" ]
|
|
+ env:
|
|
+ - name: NAMESPACE
|
|
+ value: {{ $root.Release.Namespace }}
|
|
+ - name: ACTIVE_CONTROLLER
|
|
+ value: {{ $root.Values.hook.duplexPreparation.activeController }}
|
|
+ - name: FLOAT_IP
|
|
+ value: {{ $root.Values.hook.duplexPreparation.floatIP | quote }}
|
|
+ volumeMounts:
|
|
+ - name: config-rook-ceph-duplex-preparation
|
|
+ mountPath: /tmp/mount
|
|
+{{- end }}
|
|
diff --git a/deploy/charts/rook-ceph-cluster/values.yaml b/deploy/charts/rook-ceph-cluster/values.yaml
|
|
index b7d2e1d6d..f1965b5a8 100644
|
|
--- a/deploy/charts/rook-ceph-cluster/values.yaml
|
|
+++ b/deploy/charts/rook-ceph-cluster/values.yaml
|
|
@@ -698,3 +698,21 @@ cephObjectStores:
|
|
# -- CSI driver name prefix for cephfs, rbd and nfs.
|
|
# @default -- `namespace name where rook-ceph operator is deployed`
|
|
csiDriverNamePrefix:
|
|
+
|
|
+hook:
|
|
+ image: docker.io/openstackhelm/ceph-config-helper:ubuntu_jammy_18.2.2-1-20240312
|
|
+ duplexPreparation:
|
|
+ enable: false
|
|
+ activeController: controller-0
|
|
+ floatIP: 192.188.204.1
|
|
+ cleanup:
|
|
+ enable: true
|
|
+ cluster_cleanup: rook-ceph
|
|
+ rbac:
|
|
+ clusterRole: rook-ceph-cleanup
|
|
+ clusterRoleBinding: rook-ceph-cleanup
|
|
+ role: rook-ceph-cleanup
|
|
+ roleBinding: rook-ceph-cleanup
|
|
+ serviceAccount: rook-ceph-cleanup
|
|
+ mon_hosts:
|
|
+ - controller-0
|