microcks / microcks-ansible-operator

Kubernetes Operator for easy setup and management of Microcks installs
https://microcks.io
Apache License 2.0
26 stars 6 forks source link

openshift 4.14 mongodb failed #123

Closed inzagod closed 2 months ago

inzagod commented 2 months ago

Describe the bug

hi all, with microcks 1.10 operator mongodb pod don't want to start because adminUsername data is missing in the secret

Error: couldn't find key adminUsername in Secret microcksinstall/my-microcksinstall-mongodb-connection

please see below the secret yaml

kind: Secret
apiVersion: v1
metadata:
  name: my-microcksinstall-mongodb-connection
  namespace: microcksinstall
  uid: 6d2e45a7-e107-4a90-bb71-912901e7add7
  resourceVersion: '2317696355'
  creationTimestamp: '2023-05-11T09:30:35Z'
  labels:
    app: my-microcksinstall
    container: mongodb
    group: microcks
  ownerReferences:
    - apiVersion: microcks.github.io/v1alpha1
      kind: MicrocksInstall
      name: microcksinstall
      uid: 09a080af-cf22-4e23-9fd9-75fabfbbf4e9
  managedFields:
    - manager: Swagger-Codegen
      operation: Update
      apiVersion: v1
      time: '2023-05-11T09:30:35Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:data':
          .: {}
          'f:adminPassword': {}
          'f:data': {}
          'f:password': {}
          'f:username': {}
        'f:metadata':
          'f:labels':
            .: {}
            'f:app': {}
            'f:container': {}
            'f:group': {}
          'f:ownerReferences':
            .: {}
            'k:{"uid":"09a080af-cf22-4e23-9fd9-75fabfbbf4e9"}': {}
        'f:type': {}
data:
  adminPassword: ZEhWclZFeFdlV05NZFdaU1RIQlZUMFpqZVVwS1RuWk9VWFZsU1ZGNVNVRT0=
  data: ''
  password: VlhCblRXZDJkSEZyZFd4VlUyRndkM2xHV0ZwQmFuZE1jVlpNZFZwemFIUT0=
  username: dXNlcmNaelh0
type: kubernetes.io/basic-auth

notice that the operator has automatic updates and i cannot revert to an older version

can you help me please ?

ludo

Expected behavior

No response

Actual behavior

mongodb pod don't want to start it is in CreateContainerConfigError state

Error: couldn't find key adminUsername in Secret microcksinstall/my-microcksinstall-mongodb-connection

How to Reproduce?

No response

Microcks version or git rev

1.10

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

operator

Additional information

No response

inzagod commented 2 months ago

hi all, i tried to add the adminusername : mongodb in the secret and the pod begin to start well but it crash after few moment because, while mongodb has been updated, notice that after a few moment the secret is overwritten because it managed by microcksinstall but in the microcksinstall yaml i cannot set the adminusername secret value

because the operator has automatic updates (like every operators) the operator is already up to date and i cannot rollback to an older version ! how can i do now to migrate my datas (in pvc) in 1.9 version to 1.10.1 version ? i am stuck !

i join you the log file when the pod try to start and we saw that the mongodb version is too high for the datas :

{"t":{"$date":"2024-09-05T13:24:51.482+00:00"},"s":"F",  "c":"STORAGE",  "id":4671205, "ctx":"initandlisten","msg":"This version of MongoDB is too recent to start up on the existing data files. Try MongoDB 4.2 or earlier."}

very thanks a lot

ludo my-microcksinstall-mongodb-865995b5b4-9sdj2-mongodb.log

inzagod commented 2 months ago

hi all, i close this issue because restart from scratch (not enough data) solve the issue i create another one because i have another issue in another cluster (restart from scratch but scc issue with mongodb) thanks a lot ludo