@Slava_Sarzhan
So, I have gotten a step closer, I believe. Seems an orphaned pvc was the issue above. I’m now upgraded to 1.16.
However, I’m now stuck in an initialization loop in the operator.
The operator logs keeps showing this every 20 seconds or so:
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:261
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:222
2024-06-02T10:13:08.485Z INFO initiating replset {"controller": "psmdb-controller", "object": {"name":"psmdb-db","namespace":"mongodb"}, "namespace": "mongodb", "name": "psmdb-db", "reconcileID": "e768cca6-bf03-4ad2-897f-dd66bd7c81b0", "replset": "rs0", "pod": "psmdb-db-rs0-0"}
2024-06-02T10:13:17.677Z ERROR failed to reconcile cluster {"controller": "psmdb-controller", "object": {"name":"psmdb-db","namespace":"mongodb"}, "namespace": "mongodb", "name": "psmdb-db", "reconcileID": "e768cca6-bf03-4ad2-897f-dd66bd7c81b0", "replset": "rs0", "error": "handleReplsetInit: exec add admin user: command terminated with exit code 137 / / ", "errorVerbose": "exec add admin user: command terminated with exit code 137 / / \nhandleReplsetInit\ngithub.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).reconcileCluster\n\t/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/mgo.go:100\ngithub.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).reconcileReplsets\n\t/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:551\ngithub.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).Reconcile\n\t/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:402\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:261\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:222\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1695"}
github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).reconcileReplsets
/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:553
github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).Reconcile
/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:402
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:114
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:311
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:261
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:222
2024-06-02T10:13:17.936Z ERROR failed to send telemetry to https://check.percona.com {"controller": "psmdb-controller", "object": {"name":"psmdb-db","namespace":"mongodb"}, "namespace": "mongodb", "name": "psmdb-db", "reconcileID": "40b2ee2a-7678-48ce-a05a-2dc304c0d3fe", "error": "[GET /versions/v1/{product}/{operatorVersion}/{apply}][500] VersionService_Apply default &{Code:13 Details:[] Message:failed to parse version: Disabled}"}
github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).ensureVersion
/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/version.go:356
github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).Reconcile
/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:362
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:114
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:311
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:261
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.1/pkg/internal/controller/controller.go:222
And the pods all restart about every 3 minutes and 15 seconds.
I also seem to have that reconcile error with TLS. Not sure why.
This now the PerconaServerMongoDB CR:
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDB
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"psmdb.percona.com/v1","kind":"PerconaServerMongoDB"}
meta.helm.sh/release-name: psmdb-db
meta.helm.sh/release-namespace: mongodb
creationTimestamp: '2024-06-02T10:26:31Z'
finalizers:
- delete-psmdb-pods-in-order
generation: 1
labels:
app.kubernetes.io/instance: psmdb-db
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: psmdb-db
app.kubernetes.io/version: 1.16.0
helm.sh/chart: psmdb-db-1.16.0
managedFields:
- apiVersion: psmdb.percona.com/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:kubectl.kubernetes.io/last-applied-configuration: {}
f:meta.helm.sh/release-name: {}
f:meta.helm.sh/release-namespace: {}
f:finalizers:
.: {}
v:"delete-psmdb-pods-in-order": {}
f:labels:
.: {}
f:app.kubernetes.io/instance: {}
f:app.kubernetes.io/managed-by: {}
f:app.kubernetes.io/name: {}
f:app.kubernetes.io/version: {}
f:helm.sh/chart: {}
f:spec:
.: {}
f:backup:
.: {}
f:enabled: {}
f:image: {}
f:pitr:
.: {}
f:enabled: {}
f:crVersion: {}
f:image: {}
f:imagePullPolicy: {}
f:multiCluster:
.: {}
f:enabled: {}
f:pause: {}
f:pmm:
.: {}
f:enabled: {}
f:image: {}
f:serverHost: {}
f:replsets: {}
f:secrets:
.: {}
f:users: {}
f:sharding:
.: {}
f:balancer:
.: {}
f:enabled: {}
f:configsvrReplSet:
.: {}
f:affinity:
.: {}
f:antiAffinityTopologyKey: {}
f:expose:
.: {}
f:enabled: {}
f:exposeType: {}
f:podDisruptionBudget:
.: {}
f:maxUnavailable: {}
f:resources:
.: {}
f:limits:
.: {}
f:cpu: {}
f:memory: {}
f:requests:
.: {}
f:cpu: {}
f:memory: {}
f:size: {}
f:volumeSpec:
.: {}
f:persistentVolumeClaim:
.: {}
f:resources:
.: {}
f:requests:
.: {}
f:storage: {}
f:enabled: {}
f:mongos:
.: {}
f:affinity:
.: {}
f:antiAffinityTopologyKey: {}
f:expose:
.: {}
f:exposeType: {}
f:podDisruptionBudget:
.: {}
f:maxUnavailable: {}
f:resources:
.: {}
f:limits:
.: {}
f:cpu: {}
f:memory: {}
f:requests:
.: {}
f:cpu: {}
f:memory: {}
f:size: {}
f:unmanaged: {}
f:updateStrategy: {}
f:upgradeOptions:
.: {}
f:apply: {}
f:schedule: {}
f:setFCV: {}
f:versionServiceEndpoint: {}
manager: helm
operation: Update
time: '2024-06-02T10:26:31Z'
- apiVersion: psmdb.percona.com/v1
fieldsType: FieldsV1
fieldsV1:
f:status:
.: {}
f:conditions: {}
f:host: {}
f:observedGeneration: {}
f:ready: {}
f:replsets:
.: {}
f:rs0:
.: {}
f:ready: {}
f:size: {}
f:status: {}
f:size: {}
f:state: {}
manager: percona-server-mongodb-operator
operation: Update
subresource: status
time: '2024-06-02T10:30:25Z'
name: psmdb-db
namespace: mongodb
resourceVersion: '709924067'
uid: cff9bcf2-14fc-4d8e-9f44-755f652bf871
selfLink: /apis/psmdb.percona.com/v1/namespaces/mongodb/perconaservermongodbs/psmdb-db
status:
conditions:
- lastTransitionTime: '2024-06-02T10:26:34Z'
status: 'True'
type: initializing
- lastTransitionTime: '2024-06-02T10:26:35Z'
message: >-
reconcile StatefulSet for rs0: get StatefulSet for replset rs0: failed
to get ssl annotations: waiting for TLS secret
reason: ErrorReconcile
status: 'True'
type: error
- lastTransitionTime: '2024-06-02T10:26:36Z'
status: 'True'
type: initializing
- lastTransitionTime: '2024-06-02T10:27:30Z'
message: 'rs0: ready'
reason: RSReady
status: 'True'
type: ready
- lastTransitionTime: '2024-06-02T10:27:30Z'
status: 'True'
type: initializing
- lastTransitionTime: '2024-06-02T10:30:25Z'
message: 'rs0: ready'
reason: RSReady
status: 'True'
type: ready
- lastTransitionTime: '2024-06-02T10:30:25Z'
status: 'True'
type: initializing
host: psmdb-db-rs0.mongodb.svc.cluster.local
observedGeneration: 1
ready: 3
replsets:
rs0:
ready: 3
size: 3
status: ready
size: 3
state: initializing
spec:
backup:
enabled: true
image: percona/percona-backup-mongodb:2.4.1
pitr:
enabled: false
crVersion: 1.16.0
image: percona/percona-server-mongodb:6.0.15
imagePullPolicy: Always
multiCluster:
enabled: false
pause: false
pmm:
enabled: false
image: percona/pmm-client:2.41.2
serverHost: monitoring-service
replsets:
- affinity:
antiAffinityTopologyKey: kubernetes.io/hostname
arbiter:
affinity:
antiAffinityTopologyKey: kubernetes.io/hostname
enabled: false
size: 1
expose:
enabled: false
exposeType: ClusterIP
name: rs0
nonvoting:
affinity:
antiAffinityTopologyKey: kubernetes.io/hostname
enabled: false
podDisruptionBudget:
maxUnavailable: 1
resources:
limits:
cpu: 800m
memory: 1G
requests:
cpu: 800m
memory: 1G
size: 3
volumeSpec:
persistentVolumeClaim:
resources:
requests:
storage: 3Gi
podDisruptionBudget:
maxUnavailable: 1
resources:
limits:
cpu: 300m
memory: 0.5G
requests:
cpu: 300m
memory: 0.5G
size: 3
volumeSpec:
persistentVolumeClaim:
resources:
requests:
storage: 10Gi
secrets:
users: psmdb-db-secrets
sharding:
balancer:
enabled: false
configsvrReplSet:
affinity:
antiAffinityTopologyKey: kubernetes.io/hostname
expose:
enabled: false
exposeType: ClusterIP
podDisruptionBudget:
maxUnavailable: 1
resources:
limits:
cpu: 300m
memory: 0.5G
requests:
cpu: 300m
memory: 0.5G
size: 3
volumeSpec:
persistentVolumeClaim:
resources:
requests:
storage: 3Gi
enabled: false
mongos:
affinity:
antiAffinityTopologyKey: kubernetes.io/hostname
expose:
exposeType: ClusterIP
podDisruptionBudget:
maxUnavailable: 1
resources:
limits:
cpu: 300m
memory: 0.5G
requests:
cpu: 300m
memory: 0.5G
size: 1
unmanaged: false
updateStrategy: OnDelete
upgradeOptions:
apply: Disabled
schedule: 34 9 * * *
setFCV: false
versionServiceEndpoint: https://check.percona.com
Any tips to troubleshoot or repair would be greatly appreciated.
Scott