zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.37k stars 980 forks source link

Skip major upgrade for standby clusters with warning #2775

Closed hughcapet closed 1 month ago

hughcapet commented 1 month ago

otherwise it fails non-gracefully

time="2024-10-15T09:37:25Z" level=debug msg="making GET http request: x" cluster-name=default/x-standby pkg=cluster
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x3a8 pc=0x14ffba2]

goroutine 161 [running]:
github.com/zalando/postgres-operator/pkg/util/patroni.apiURL(0x0)
    /go/src/github.com/zalando/postgres-operator/pkg/util/patroni/patroni.go:67 +0x22
github.com/zalando/postgres-operator/pkg/util/patroni.(*Patroni).GetClusterMembers(0xc000010420, 0xc000b32720?)
    /go/src/github.com/zalando/postgres-operator/pkg/util/patroni/patroni.go:291 +0x1f
github.com/zalando/postgres-operator/pkg/cluster.(*Cluster).majorVersionUpgrade(0xc000983908)
    /go/src/github.com/zalando/postgres-operator/pkg/cluster/majorversionupgrade.go:174 +0x6c3
github.com/zalando/postgres-operator/pkg/cluster.(*Cluster).Sync(0xc000983908, 0xc000b38488)
    /go/src/github.com/zalando/postgres-operator/pkg/cluster/sync.go:160 +0xdf5
github.com/zalando/postgres-operator/pkg/controller.(*Controller).processEvent(0xc0007b5188, {{0xc1bbab6bc0334e6f, 0x4f53bbb, 0x3a8a6a0}, {0xc000ca74a0, 0x24}, {0x21bf2de, 0x4}, 0x0, 0xc000b38488, ...})
    /go/src/github.com/zalando/postgres-operator/pkg/controller/postgresql.go:343 +0x1007
github.com/zalando/postgres-operator/pkg/controller.(*Controller).processClusterEventsQueue(0xc0007b5188, 0x9, 0xc0006db380, 0x0?)
    /go/src/github.com/zalando/postgres-operator/pkg/controller/postgresql.go:377 +0x2c5
created by github.com/zalando/postgres-operator/pkg/controller.(*Controller).Run in goroutine 1
    /go/src/github.com/zalando/postgres-operator/pkg/controller/controller.go:446 +0x5c
idanovinda commented 1 month ago

👍

hughcapet commented 1 month ago

👍