bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.99k stars 9.21k forks source link

[bitnami/postgresql-ha] Upgrade from 10.0.9 to 11 fails #17424

Closed farcop closed 2 months ago

farcop commented 1 year ago

Name and Version

bitnami/postgresql-ha 11.7.7

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. helm install postgresql-ha https://charts.bitnami.com/bitnami/postgresql-ha-10.0.9.tgz
  2. helm upgrade postgresql-ha https://charts.bitnami.com/bitnami/postgresql-ha-11.7.7.tgz \
    --set postgresql.password=$PASSWORD \
    --set postgresql.repmgrPassword=$REPMGR_PASSWORD \
    --set pgpool.adminPassword=$ADMIN_PASSWORD

    Are you using any custom parameters or values?

No

What is the expected behavior?

helm upgrade was successful

What do you see instead?

helm upgrade postgresql-ha https://charts.bitnami.com/bitnami/postgresql-ha-11.7.7.tgz \
    --set postgresql.password=$PASSWORD \
    --set postgresql.repmgrPassword=$REPMGR_PASSWORD \
    --set pgpool.adminPassword=$ADMIN_PASSWORD
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/farcop/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/farcop/.kube/config
Error: UPGRADE FAILED: cannot patch "postgresql-ha-postgresql" with kind StatefulSet: StatefulSet.apps "postgresql-ha-postgresql" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

Additional information

it fails because of in commit https://github.com/bitnami/charts/commit/3cd7dc272c618e8c2d9de055ddcf8471ddd6458b selector role: data was added I suppose

aoterolorenzo commented 1 year ago

Hi @farcop,

Let me create a task for the team to take a look at this, solving the issue without having to revert the #14426 issue. We sill reach you back as soon as we can.

farcop commented 1 year ago

Hi @aoterolorenzo

It would be great! Because the witness functionality helps us get around another bug https://github.com/bitnami/charts/issues/17015

Arherion commented 11 months ago

Hi guys,

Just faced same thing, any update/workaround?

farcop commented 11 months ago

@Arherion Hi! You can delete stateful set before upgrade helm chart for workaround.

github-actions[bot] commented 11 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

farcop commented 11 months ago

Not stale. Any updates here?

github-actions[bot] commented 10 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

farcop commented 10 months ago

Hey guys! What's the point open any issues here when you won’t take it in account anyway and are closed as stale?

aoterolorenzo commented 10 months ago

@farcop seems the bot removed the on-hold label so the stale bot is doing its thing. I will re-add it.

As a update for the issue, the internal task is still on the backlog. We cannot provide an ETA since it depends in team's workload.

fmulero commented 2 months ago

Hi @farcop

I am revisiting our old tasks and I think it makes no sense to keep this issue open. This particular problem can be sorted out with something like this (not fully tested):

$ kubectl label pod role=data -l app.kubernetes.io/component=postgresql,app.kubernetes.io/instance=postgresql-ha
pod/postgresql-ha-postgresql-0 labeled
pod/postgresql-ha-postgresql-2 labeled
pod/postgresql-ha-postgresql-1 labeled
$ kubectl delete sts  -l app.kubernetes.io/component=postgresql,app.kubernetes.io/instance=postgresql-ha --cascade=orphan
statefulset.apps "postgresql-ha-postgresql" deleted

That should leave the pods working and ready to be adopted by the new statefulset.

github-actions[bot] commented 2 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 2 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.