Skip to content

Commit

Permalink
feat: add upgrade with another default storage class known issue (#710)
Browse files Browse the repository at this point in the history
Signed-off-by: PoAn Yang <[email protected]>
Co-authored-by: Jillian <[email protected]>
  • Loading branch information
FrankYang0529 and jillian-maroket authored Jan 24, 2025
1 parent db9a109 commit 068d845
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/upgrade/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 9
sidebar_label: Troubleshooting
title: "Troubleshooting"
---
Expand Down
34 changes: 32 additions & 2 deletions docs/upgrade/v1-4-0-to-v1-4-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A possible cause is processes related to orphan engines of the Longhorn Instance
The `instance-manager` pod cannot be drained because of the engine `pvc-9ae0e9a5-a630-4f0c-98cc-b14893c74f9e-e-0`.
1. Check if the engine is still running on the stuck node.
Example:
```
Expand Down Expand Up @@ -80,4 +80,34 @@ A possible cause is processes related to orphan engines of the Longhorn Instance
Related issues:
- [[BUG] v1.4.0 -> v1.4.1-rc1 upgrade stuck in Pre-drained and the node stay in Cordoned](https://github.com/harvester/harvester/issues/7366)
- [[IMPROVEMENT] Cleanup orphaned volume runtime resources if the resources already deleted](https://github.com/longhorn/longhorn/issues/6764)
- [[IMPROVEMENT] Cleanup orphaned volume runtime resources if the resources already deleted](https://github.com/longhorn/longhorn/issues/6764)
### 2. Upgrade with default StorageClass that is not harvester-longhorn
Harvester adds the annotation `storageclass.kubernetes.io/is-default-class: "true"` to `harvester-longhorn`, which is the original default StorageClass. When you replace `harvester-longhorn` with another StorageClass, the following occur:
- The Harvester ManagedChart shows the error message `cannot patch "harvester-longhorn" with kind StorageClass: admission webhook "validator.harvesterhci.io" denied the request: default storage class %!s(MISSING) already exists, please reset it first`.
- The webhook denies the upgrade request.
![Upgrade with another default storage class](/img/v1.4/upgrade/upgrade-with-another-default-storage-class.png)
You can perform any of the following workarounds:
- Set `harvester-longhorn` as the default StorageClass.
- Add `spec.values.storageClass.defaultStorageClass: false` to the `harvester` ManagedChart.
```
kubectl edit managedchart harvester -n fleet-local
```
- Add `timeoutSeconds: 600` to the Harvester ManagedChart spec.
```
kubectl edit managedchart harvester -n fleet-local
```
![Upgrade with another default storage class workaround](/img/v1.4/upgrade/upgrade-with-another-default-storage-class-workaround.png)
For more information, see [Issue #7375](https://github.com/harvester/harvester/issues/7375).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion versioned_docs/version-v1.4/upgrade/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 9
sidebar_label: Troubleshooting
title: "Troubleshooting"
---
Expand Down
32 changes: 31 additions & 1 deletion versioned_docs/version-v1.4/upgrade/v1-4-0-to-v1-4-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,34 @@ A possible cause is processes related to orphan engines of the Longhorn Instance
Related issues:
- [[BUG] v1.4.0 -> v1.4.1-rc1 upgrade stuck in Pre-drained and the node stay in Cordoned](https://github.com/harvester/harvester/issues/7366)
- [[IMPROVEMENT] Cleanup orphaned volume runtime resources if the resources already deleted](https://github.com/longhorn/longhorn/issues/6764)
- [[IMPROVEMENT] Cleanup orphaned volume runtime resources if the resources already deleted](https://github.com/longhorn/longhorn/issues/6764)
### 2. Upgrade with default StorageClass that is not harvester-longhorn
Harvester adds the annotation `storageclass.kubernetes.io/is-default-class: "true"` to `harvester-longhorn`, which is the original default StorageClass. When you replace `harvester-longhorn` with another StorageClass, the following occur:
- The Harvester ManagedChart shows the error message `cannot patch "harvester-longhorn" with kind StorageClass: admission webhook "validator.harvesterhci.io" denied the request: default storage class %!s(MISSING) already exists, please reset it first`.
- The webhook denies the upgrade request.
![Upgrade with another default storage class](/img/v1.4/upgrade/upgrade-with-another-default-storage-class.png)
You can perform any of the following workarounds:
- Set `harvester-longhorn` as the default StorageClass.
- Add `spec.values.storageClass.defaultStorageClass: false` to the `harvester` ManagedChart.
```
kubectl edit managedchart harvester -n fleet-local
```
- Add `timeoutSeconds: 600` to the Harvester ManagedChart spec.
```
kubectl edit managedchart harvester -n fleet-local
```
![Upgrade with another default storage class workaround](/img/v1.4/upgrade/upgrade-with-another-default-storage-class-workaround.png)
For more information, see [Issue #7375](https://github.com/harvester/harvester/issues/7375).

0 comments on commit 068d845

Please sign in to comment.