This message was deleted.
# harvester
a
This message was deleted.
c
Hi jerry, it would be great if there is a support bundle. And there is a question, is there any objects in VolumeSnapshotClass resource of harvester cluster?
j
Hi jack, I noticed that there were associated objects with volumesnapshot, so I deleted it, but mcc-harvester still recovered normally.
c
do you mean it’s fine for now?
j
Hi Jack,The problem still persists, with the following situation remaining unchanged: Modified(1) [Cluster fleet-local/local]; volumesnapshotclass.snapshot.storage.k8s.io longhorn missing; volumesnapshotclass.snapshot.storage.k8s.io longhorn-snapshot missing.
@clean-cpu-90380 This is the support bundle. Please check it.
1
p
The bundle is complaining
longhorn-snapshot
is missing.
c
yeah, after I checked the bundle, I found something weird. seem it needs snapshot.storage.k8s.io/v1beta1 (pic1), but in cluster, it’s snapshot.storage.k8s.io/v1 (pic2)
j
Thank you. So, if I change the relevant information, can I solve this problem?
c
in harvester 1.2.1, it’s still v1beta1 https://github.com/harvester/harvester/blob/v1.2.1/deploy/charts/harvester/templates/longhorn-volumesnapshotclass.yaml did you create those v1 volumesnapshotclass before?
j
Yes, so how should I solve this problem?
c
just a second, what happened after you clicked upgrade button? did it show anything error message?
👀 1
j
error message: admission webhook "validator.harvesterhci.io" denied the request: managed chart harvester is not ready, please wait for it to be ready
c
What is content of yaml you created for longhorn-snapshot?
👀 1
j
cat longhorn.yaml
apiVersion: snapshot.storage.k8s.io/v1beta1 deletionPolicy: Delete driver: driver.longhorn.io kind: VolumeSnapshotClass metadata: annotations: meta.helm.sh/release-name: harvester meta.helm.sh/release-namespace: harvester-system creationTimestamp: "2024-02-01T070015Z" generation: 1 labels: app.kubernetes.io/managed-by: Helm name: longhorn resourceVersion: "430536529" uid: e105c5cc-3142-4e24-b5a6-ab454823af96
cat longhorn-snapshot.yaml
apiVersion: snapshot.storage.k8s.io/v1beta1 deletionPolicy: Delete driver: driver.longhorn.io kind: VolumeSnapshotClass metadata: annotations: meta.helm.sh/release-name: harvester meta.helm.sh/release-namespace: harvester-system creationTimestamp: "2024-03-19T012200Z" generation: 1 labels: app.kubernetes.io/instance: harvester app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: harvester app.kubernetes.io/version: v1.2.0 helm.sh/chart: harvester-1.2.0 name: longhorn-snapshot resourceVersion: "427879751" uid: a4214b3f-2515-4f9c-b44f-d993427384b0 parameters: type: snap
👀 1
c
try following steps ## step1
helm get manifest harvester -n harvester-system
you’ll get following thing,
Copy code
---
apiVersion: snapshot.storage.k8s.io/v1beta1
deletionPolicy: Delete
driver: driver.longhorn.io
kind: VolumeSnapshotClass
metadata:
  annotations:
    objectset.rio.cattle.io/id: default-mcc-harvester-cattle-fleet-local-system
  labels:
    objectset.rio.cattle.io/hash: e852fa897f5eae59a44b4bfe186aad80b10b94b3
  name: longhorn

---
apiVersion: snapshot.storage.k8s.io/v1beta1
deletionPolicy: Delete
driver: driver.longhorn.io
kind: VolumeSnapshotClass
metadata:
  annotations:
    objectset.rio.cattle.io/id: default-mcc-harvester-cattle-fleet-local-system
  labels:
    app.kubernetes.io/instance: harvester
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: harvester
    app.kubernetes.io/version: v1.2.0
    helm.sh/chart: harvester-1.2.0
    objectset.rio.cattle.io/hash: e852fa897f5eae59a44b4bfe186aad80b10b94b3
  name: longhorn-snapshot
  namespace: longhorn-system
parameters:
  type: snap
## step2 apply longhorn-snapshot and longhorn these two volmesnapshotclass resource I’m not sure if your result is same as me or not by running that helm command.
the reason it show modified and missing because it check
<http://objectset.rio.cattle.io/id|objectset.rio.cattle.io/id>
<http://objectset.rio.cattle.io/hash|objectset.rio.cattle.io/hash>
these two filed
👀 1
so you should bring these two field back to
longhorn
longhorn-snapshot
volumesnapshotsclass resource
but I think your result should be same as me like
e852fa897f5eae59a44b4bfe186aad80b10b94b3
👀 1
BTW, reproduce way is to delete
<http://objectset.rio.cattle.io/hash|objectset.rio.cattle.io/hash>
field, the bundle will show missing error.
👀 1
j
This file is obtained by
helm get manifest harvester -n harvester-system
. I'm not sure if it would be helpful for you to solve the problem.
c
In the end of file, you’ll see this. Remove existing volumesnapshotclass and apply it
Copy code
apiVersion: <http://snapshot.storage.k8s.io/v1beta1|snapshot.storage.k8s.io/v1beta1>
deletionPolicy: Delete
driver: <http://driver.longhorn.io|driver.longhorn.io>
kind: VolumeSnapshotClass
metadata:
  annotations:
    <http://objectset.rio.cattle.io/id|objectset.rio.cattle.io/id>: default-mcc-harvester-cattle-fleet-local-system
  labels:
    <http://objectset.rio.cattle.io/hash|objectset.rio.cattle.io/hash>: e852fa897f5eae59a44b4bfe186aad80b10b94b3
  name: longhorn

---
apiVersion: <http://snapshot.storage.k8s.io/v1beta1|snapshot.storage.k8s.io/v1beta1>
deletionPolicy: Delete
driver: <http://driver.longhorn.io|driver.longhorn.io>
kind: VolumeSnapshotClass
metadata:
  annotations:
    <http://objectset.rio.cattle.io/id|objectset.rio.cattle.io/id>: default-mcc-harvester-cattle-fleet-local-system
  labels:
    <http://app.kubernetes.io/instance|app.kubernetes.io/instance>: harvester
    <http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: Helm
    <http://app.kubernetes.io/name|app.kubernetes.io/name>: harvester
    <http://app.kubernetes.io/version|app.kubernetes.io/version>: v1.2.0
    <http://helm.sh/chart|helm.sh/chart>: harvester-1.2.0
    <http://objectset.rio.cattle.io/hash|objectset.rio.cattle.io/hash>: e852fa897f5eae59a44b4bfe186aad80b10b94b3
  name: longhorn-snapshot
  namespace: longhorn-system
parameters:
  type: snap
🙌 1
1
👍 1
j
@clean-cpu-90380 According to your method, the problem has been resolved. Thank you very much for your solution.
🙌 1