From d777dfb486f7eab161be9d449d89d245b18931a9 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Tue, 12 Nov 2019 16:09:56 -0800 Subject: [PATCH] Update upgrade-from-v0.6.2-to-v0.7.0.md Add recreate storage class step Signed-off-by: Sheng Yang --- docs/upgrade-from-v0.6.2-to-v0.7.0.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/upgrade-from-v0.6.2-to-v0.7.0.md b/docs/upgrade-from-v0.6.2-to-v0.7.0.md index 3c1c8c3..aebaf3f 100644 --- a/docs/upgrade-from-v0.6.2-to-v0.7.0.md +++ b/docs/upgrade-from-v0.6.2-to-v0.7.0.md @@ -13,7 +13,7 @@ The users need to follow this guide to upgrade from v0.6.2 to v0.7.0. 3. Wait for the app to complete the upgrade. ### Use YAML file -Use `kubectl apply --force https://raw.githubusercontent.com/longhorn/longhorn/v0.7.0/deploy/longhorn.yaml` +Use `kubectl apply https://raw.githubusercontent.com/longhorn/longhorn/v0.7.0/deploy/longhorn.yaml` And wait for all the pods to become running and Longhorn UI working. @@ -46,6 +46,25 @@ longhorn-manager-t59kt 1/1 Running 0 3d14h longhorn-ui-b466b6d74-w7wzf 1/1 Running 0 50m ``` +#### Recreate StorageClass +If you've encounted following error during applying the yaml +``` +The StorageClass "longhorn" is invalid: provisioner: Forbidden: updates to provisioner are forbidden. +``` +You need to recreate the `longhorn` storageClass in order to make Kubernetes work with Longhorn v0.7.0, since we've changed the provisioner from `rancher.io/longhorn` to `driver.longhorn.io`. + +Use the following command to recreate the default StorageClass: +``` +kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v0.7.0/examples/storageclass.yaml +kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v0.7.0/examples/storageclass.yaml +``` + +Noticed the PVs created by the old storageClass will still use `rancher.io/longhorn` as provisioner. Longhorn v0.7.0 supports attach/detach/deleting of the PVs created by the previous version of Longhorn, but it doesn't support creating new PVs using the old provisioner name. Please use the new StorageClass for the new volumes. + +#### Migrate the old PVs to use the new StorageClass + +TODO + ## Post upgrade 1. Bring back the workload online. 1. Make sure all the volumes are back online.