OpenEBS Replicated PV Mayastor Legacy Upgrades
A legacy installation of Replicated PV Mayastor (1.0.x and below) cannot be seamlessly upgraded and needs manual intervention.
Follow the below steps if you wish to upgrade from Replicated PV Mayastor 1.0.x to Replicated PV Mayastor 2.x and above. The Replicated PV Mayastor uses etcd as a persistent datastore for its configuration. As a first step, take a snapshot of the etcd. The detailed steps for taking a snapshot can be found in the etcd documentation.
warning
As compared to Replicated PV Mayastor 1.0, the Replicated PV Mayastor 2.x feature-set introduces breaking changes in some of the components, due to which the upgrade process from 1.0 to 2.x is not seamless. The list of such changes are given below:
ETCD:
- Control Plane: The prefixes for control plane have changed from
/namespace/$NAMESPACE/control-plane/
to/openebs.io/mayastor/apis/v0/clusters/$KUBE_SYSTEM_UID/namespaces/$NAMESPACE/
- Data Plane: The Data Plane nexus information containing a list of healthy children has been moved from
$nexus_uuid
to/openebs.io/mayastor/apis/v0/clusters/$KUBE_SYSTEM_UID/namespaces/$NAMESPACE/volume/$volume_uuid/nexus/$nexus_uuid/info
RPC:
- Control Plane: The RPC for the control plane has been changed from NATS to gRPC.
- Data Plane: The registration heartbeat has been changed from NATS to gRPC.
Pool CRDs:
- The pool CRDs have been renamed
DiskPools
(previously, MayastorPools). :::
- To start the upgrade process, the following previously deployed components have to be deleted.
- To delete the control-plane components, execute:
Commands
- Next, delete the associated RBAC operator. To do so, execute:
Commands
In the above command, add the previously installed Replicated Storage's version in the format v1.x.x :::
- Once all the above components have been successfully removed, fetch the latest helm chart from Mayastor-extension repo and save it to a file, say
helm_templates.yaml
. To do so, execute:
Command
- Next, update the
helm_template.yaml
file, add the following helm label to all the resources that are being created.
Helm label
- Copy the
etcd
andio-engine
spec from thehelm_templates.yaml
and save it in two different files say, mayastor_2.0_etcd.yaml and mayastor_io_v2.0.yaml. Once done, remove theetcd
andio-engine
specs fromhelm_templates.yaml
. These components need to be upgraded separately.
- Install the new control-plane components using the
helm-templates.yaml
file.
Command
info
In the above method of installation, the nexus (target) High Availability (HA) is disabled by default. The steps to enable HA are described later in this document.
- Verify the status of the pods. Upon successful deployment, all the pods will be in a running state.
Command
Sample Output
- Verify the etcd prefix and compat mode.
Command
Sample Output
- Verify if the DiskPools are online.
Command
Sample Output
- Next, verify the status of the volumes.
Command
Sample Output
- After upgrading control-plane components, the data-plane pods have to be upgraded. To do so, deploy the
io-engine
DaemonSet from Replicated PV Mayastor's new version.
Using the command given below, the data-plane pods (now io-engine pods) will be upgraded to Replicated PV Mayastor v2.0.
Command
Delete the previously deployed data-plane pods (
mayastor-xxxxx
). The data-plane pods need to be manually deleted as their update-strategy is set todelete
. Upon successful deletion, the newio-engine
pods will be up and running.NATS has been replaced by gRPC for Replicated PV Mayastor versions 2.0 or later. Hence, the NATS components (StatefulSets and services) have to be removed from the cluster.
Command
- After
control-plane
andio-engine
, the etcd has to be upgraded. Before starting the etcd upgrade, label the etcd PV and PVCs with helm. Use the below example to create alabels.yaml
file. This will be needed to make them helm compatible.
labels.yaml file
Command to patch etcd PVC
Command to patch etcd PV
- Next, deploy the etcd YAML. To deploy, execute:
Command
Now, verify the etcd space and compat mode, execute:
Command
Sample Output
- Once all the components have been upgraded, the HA module can now be enabled via the helm upgrade command.
Command to check the Helm List
Sample Output
- This concludes the process of legacy upgrade. Run the below commands to verify the upgrade,
Command to check the helm list
Sample Output
Command to check the status of pods
Sample Output
Command to check the Status of Replicated PV Mayastor Volumes
Sample Output