Collecting Information About the Current Deployment

Before you upgrade a LINSTOR Operator v1 deployment to Operator v2, and remove the old v1 deployment, collect information on the state of your cluster. You will use this collected information from your Operator v1 deployment when you deploy Operator v2. Doing this ensures that the new upgraded deployment will have a compatible configuration with your old deployment.

This is the second step when migrating the LINSTOR Operator from version 1 (v1) to version 2 (v2).

Prerequisites

To collect information about your current deployment, you will need to install the following tools:

Running the Data Collection Script

To collect the necessary information to migrate resources in your Operator v1 deployment to an upgraded Operator v2 deployment, you can run a script provided by LINBIT.

curl --proto '=https' --tlsv1.2 -sSf https://charts.linstor.io/migration/collect.sh | bash -s

When you run the script, the script will ask you if you want to keep modifications made with the LINSTOR Operator. For each modification, the script will show you the proposed change to the deployed resources and ask you for confirmation before making a change.

The script will also tell you about values in your deployment that cannot automatically be migrated, along with recommended actions, in case you need to keep the modification.

Example output from the script is as follows:

Using kubectl context: kubernetes-admin@kubernetes
Found LinstorControllers: ["linstor-op-cs"]
Found LinstorSatelliteSets: ["linstor-op-ns"]
Found LinstorCSIDrivers: ["linstor-op"]
Found LINSTOR Controller passphrase secret
--- Default resource
+++ Updated resource
@@ -3,4 +3,5 @@ kind: LinstorCluster
 metadata:
   name: linstorcluster
 spec:
+  linstorPassphraseSecret: linstor-op-passphrase
   patches: []
Apply the patch (Y/n)? y
[...]
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
| The following non-default values have not been converted:                                                                                                       |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Resource            | Key                            | Recommended Action                                  | Value                                              |
|---------------------|--------------------------------|-----------------------------------------------------|----------------------------------------------------|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------
| After upgrading, apply the following resources. They have been saved to v2-resources.yaml |
---------------------------------------------------------------------------------------------
[...]

A copy of the identified resources in your current deployment is saved in a file named v2-resources.yaml.

Collecting Helm-Generated Secrets

Helm automatically generates a passphrase for LINSTOR. Once LINSTOR is initialized with the passphrase, the LINSTOR Controller will not be able fully start without supplying the passphrase.

To migrate the generated passphrase to LINSTOR Operator v2, create a backup of the secret by entering the following command:

# kubectl get secrets linstor-op-passphrase -ogo-template='{{.data.MASTER_PASSPHRASE}}{{"\n"}}'

Output from the command will show a generated passphrase. Save the passphrase for later use.