gislab-augsburg / helm-charts

it@M Helm Charts
https://artifacthub.io/packages/search?repo=it-at-m
MIT License
0 stars 0 forks source link

postgresql: no persistent volumes available #9

Closed gislab-augsburg closed 3 months ago

gislab-augsburg commented 4 months ago

Events:

mb@nbo00370518:~/dave2/helm-charts/charts/dave$ oc get events
LAST SEEN   TYPE      REASON             OBJECT                                         MESSAGE
5s          Normal    FailedBinding      persistentvolumeclaim/data-dave-postgresql-0   no persistent volumes available for this claim and no storage class is set
19s         Warning   FailedScheduling   pod/dave-postgresql-0                          0/29 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/29 nodes are available: 29 Preemption is not helpful for scheduling..
19s         Normal    SuccessfulCreate   statefulset/dave-postgresql                    create Claim data-dave-postgresql-0 Pod dave-postgresql-0 in StatefulSet dave-postgresql success
19s         Normal    SuccessfulCreate   statefulset/dave-postgresql                    create Pod dave-postgresql-0 in StatefulSet dave-postgresql successful

Die PVC wird erzeugt, bleibt aber auf 'Pending' weil 'No Persistent Volume'

Wenn man die storage class auf "thin-csi" festlegen will:

https://github.com/gislab-augsburg/helm-charts/blob/601293bc9ac3d4253c124efcf71ea79a56734862/charts/dave/values-lhm.yaml#L115-L121

kommt:

mb@nbo00370518:~/dave2/helm-charts/charts/dave$ helm upgrade --install -f values.yaml -f values-lhm.yaml dave .
Error: UPGRADE FAILED: cannot patch "dave-postgresql" with kind StatefulSet: StatefulSet.apps "dave-postgresql" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
gislab-augsburg commented 4 months ago

@klml kannst du da helfen?

gislab-augsburg commented 4 months ago

Wenn ich per Hand eine PVC erstelle mit Namen 'data-dave-postgresql-0' wird die vom postgresql pod genommen und er fährt hoch.

klml commented 4 months ago

mit "no storage class is set" kam schon öfters vor. Hattest du postgresql.storageClass intern gesetzt?

gislab-augsburg commented 3 months ago

ich hab in den values-lhm gesetzt:

postgresql:
  storageClass: "thin-csi"

-> kein Effekt

postgresql:  
  primary:
    persistence:
      storageClass: "thin-csi"

->

mb@nbo00370518:~/dave2/helm-charts/charts/dave$ helm upgrade --install -f values.yaml -f values-lhm.yaml dave .
Error: UPGRADE FAILED: cannot patch "dave-postgresql" with kind StatefulSet: StatefulSet.apps "dave-postgresql" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
klml commented 3 months ago

Forbidden: updates to statefulset spec

@gislab-augsburg da musst du das statefulset vorher einmal deleten

gislab-augsburg commented 3 months ago

:man_facepalming: ok so geht es:

e74eeb0e619042000de5e477183ee6b0191b4be5

gislab-augsburg commented 3 months ago

..