Closed EugenMayer closed 2 years ago
Any chance to get a hint or glimps on the procedure here (or the plans with those in 5.1)? Thank you!
Looking at https://github.com/CrunchyData/postgres-operator/blob/master/docs/content/releases/5.1.0.md it seems like the upgrades are not included in 5.1 as maybe planed before.
Leaves us with probably the questions
pgbackuprest
and then restore on a new cluster running the new versions? Does this even work with a wal based backup?For all of you looking for some possible context for https://access.crunchydata.com/documentation/crunchy-postgres-containers/latest/examples/administration/upgrade/ - if found https://github.com/CrunchyData/crunchy-containers/tree/master/examples/kube/upgrade - especially https://github.com/CrunchyData/crunchy-containers/blob/master/examples/kube/upgrade/upgrade.json at least gives an idea how to utilizeCCP_IMAGE_TAG
but well, leaves a lot open for guessing.
I do not understand why we are not getting a short answer on this - i mean everything would be acceptable, pick one of these if you like - just to make it easier / shorter for the crunchy-data operators to pick from
convinient / automatic upgrading of pg major versions
for paying customers - anybody else is either in 1. or 2.No matter which answer it is, it's fine. Just let us know :)
I found this https://www.crunchydata.com/blog/easy-major-postgresql-upgrades-using-pgo-v51 I have tried and it works well Adding this to the docs would be especially useful Magnificent work on the project
I found this https://www.crunchydata.com/blog/easy-major-postgresql-upgrades-using-pgo-v51 I have tried and it works well Adding this to the docs would be especially useful Magnificent work on the project
I just installed the certified postgres operator (v5.1.0) on my Openshift cluster, but there is not pgupgrade crd:
$ oc get crd | grep crunchy
postgresclusters.postgres-operator.crunchydata.com 2022-05-02T10:53:36Z
$ oc create -f - <<EOF
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PGUpgrade
metadata:
name: hippo-upgrade
spec:
postgresClusterName: hippo
fromPostgresVersion: 13
toPostgresVersion: 14
image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi8-5.1.0-0
EOF
error: unable to recognize "STDIN": no matches for kind "PGUpgrade" in version "postgres-operator.crunchydata.com/v1beta1"
How did you install the operator?
The pgupgrade crd is also missing in the source code: https://github.com/CrunchyData/postgres-operator/tree/master/config/crd/bases
I guess the feature has been postponed to the next release.
Major PG Upgrade functionality is now available in PGO v5.1. Details can be found in the following blog post:
https://www.crunchydata.com/blog/easy-major-postgresql-upgrades-using-pgo-v51
I found this https://www.crunchydata.com/blog/easy-major-postgresql-upgrades-using-pgo-v51 I have tried and it works well Adding this to the docs would be especially useful Magnificent work on the project
I just installed the certified postgres operator (v5.1.0) on my Openshift cluster, but there is not pgupgrade crd:
$ oc get crd | grep crunchy postgresclusters.postgres-operator.crunchydata.com 2022-05-02T10:53:36Z $ oc create -f - <<EOF apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PGUpgrade metadata: name: hippo-upgrade spec: postgresClusterName: hippo fromPostgresVersion: 13 toPostgresVersion: 14 image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi8-5.1.0-0 EOF error: unable to recognize "STDIN": no matches for kind "PGUpgrade" in version "postgres-operator.crunchydata.com/v1beta1"
How did you install the operator?
I found this https://www.crunchydata.com/blog/easy-major-postgresql-upgrades-using-pgo-v51 I have tried and it works well Adding this to the docs would be especially useful Magnificent work on the project
I just installed the certified postgres operator (v5.1.0) on my Openshift cluster, but there is not pgupgrade crd:
$ oc get crd | grep crunchy postgresclusters.postgres-operator.crunchydata.com 2022-05-02T10:53:36Z $ oc create -f - <<EOF apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PGUpgrade metadata: name: hippo-upgrade spec: postgresClusterName: hippo fromPostgresVersion: 13 toPostgresVersion: 14 image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi8-5.1.0-0 EOF error: unable to recognize "STDIN": no matches for kind "PGUpgrade" in version "postgres-operator.crunchydata.com/v1beta1"
How did you install the operator?
I also installed the Certified PGO 5.3.0 on OpenShift 4.10 and I cannot find a PGUpgrade CRD - @andrewlecuyer I also couldn´t find the CRD listed in the OperatorHub
@zerkms i deployed the install/default 5.3.0 variant and installed it based on my old pg12 image version. I updaed pgbackuprest and bouncer to the latest versions and everything seemed to work with.
I verified that i had the pgo-operator and pgo-operator-upgrade on 5.3.0.
When i now switch the following
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: pg-cluster
spec:
image: kwcr.io/infra/crunchydata/crunchy-postgres:centos8-12.9-0
postgresVersion: 12
to
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: pg-cluster
spec:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.6-2
postgresVersion: 14
and deploy the kustomization, i see that one replica is removed and a new one, based on 14.6.2, is started. This one never compleats because it waits for the cluster leader (the master is still on 12 at this point).
I had to revert to 12 for now.
What is the expected behavior in this case. I used https://access.crunchydata.com/documentation/postgres-operator/5.3.0/tutorial/update-cluster/ as the reference docs, but there is nothing about postgresVersion any longer.
I see there is https://www.crunchydata.com/blog/easy-major-postgresql-upgrades-using-pgo-v51 which reads differently and seems to spawn an additional cluster using the old version. Then this one is migrated to the new version using an task.
What is the current / right way to do that?
Any help would be awesome.
Sorry for the confusion above - if useful for anybody (and not obvious as for me)
Hint: if you deploy your cluster into a namespace, you will need to add -n <namespace>
to all the operations done in the blog. Also when creating the task ,you will need to create the task in the namespace the cluster runs in.
We are aware of
but this did not help up understand how it is expected to be actually done. What we could grasp is
"Somewhere (some deployment or pod) needs to get an ENV variable called CCP_IMAGE_TAG to the image of the next major, e.g when we are on
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-12.9-0
right now, CCP_IMAGE_TAG must point toregistry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.5-0
"Yet we are not sure how to do that. We are using the
kustomize
way of deploying the operator via https://github.com/CrunchyData/postgres-operator-examples/tree/main/kustomize/install and using. We are currently using v5.0.4 and pg12.I understand the question has been asked several times, but either it is us or maybe the answer was yet not sufficient. Thank you a lot for a more detailed answer.
Alternatively, we have seen that v5.1 will have an auto-upgrade mode with https://github.com/CrunchyData/postgres-operator/pull/2853 - is it expected to wait for that? If yes, es there a broad timeline when 5.1 will be available?