Git Product home page Git Product logo

Comments (7)

chatton avatar chatton commented on September 17, 2024

Hi @pixie79 thanks for the report!

Could you provide the output of kubectl describe sts mongodb and the operator logs?

from mongodb-kubernetes-operator.

pixie79 avatar pixie79 commented on September 17, 2024

Hi @chatton

Here you go:

➜ talos-engine git:(master) kubectl describe sts mongod
Name: mongodb
Namespace: default
CreationTimestamp: Tue, 01 Sep 2020 09:08:38 +0100
Selector: app=mongodb-svc
Labels: app=mongodb-svc
Annotations:
Replicas: 3 desired | 3 total
Update Strategy: RollingUpdate
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
Labels: app=mongodb-svc
Service Account: mongodb-kubernetes-operator
Init Containers:
mongod-posthook:
Image: quay.io/mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook:1.0.2
Port:
Host Port:
Command:
cp
version-upgrade-hook
/hooks/version-upgrade
Environment:
Mounts:
/hooks from hooks (rw)
Containers:
mongodb-agent:
Image: quay.io/mongodb/mongodb-agent:10.15.1.6468-1
Port:
Host Port:
Command:
agent/mongodb-agent
-cluster=/var/lib/automation/config/automation-config
-skipMongoStart
-noDaemonize
-healthCheckFilePath=/var/log/mongodb-mms-automation/healthstatus/agent-health-status.json
-serveStatusPort=5000
Readiness: exec [/var/lib/mongodb-mms-automation/probes/readinessprobe] delay=5s timeout=1s period=10s #success=1 #failure=240
Environment:
AGENT_STATUS_FILEPATH: /var/log/mongodb-mms-automation/healthstatus/agent-health-status.json
MANAGED_SECURITY_CONTEXT: true
Mounts:
/data from data-volume (rw)
/var/lib/automation/config from automation-config (ro)
/var/lib/tls/ca/ from tls-ca (ro)
/var/lib/tls/server/ from tls-secret (ro)
/var/log/mongodb-mms-automation/healthstatus from healthstatus (rw)
mongod:
Image: mongo:4.2.7
Port:
Host Port:
Command:
/bin/sh
-c

  # run post-start hook to handle version changes
  /hooks/version-upgrade

  # wait for config to be created by the agent
  while [ ! -f /data/automation-mongod.conf ]; do sleep 3 ; done ; sleep 2 ;

  # start mongod with this configuration
  exec mongod -f /data/automation-mongod.conf ;

Environment:
  AGENT_STATUS_FILEPATH:     /healthstatus/agent-health-status.json
  MANAGED_SECURITY_CONTEXT:  true
Mounts:
  /data from data-volume (rw)
  /healthstatus from healthstatus (rw)
  /hooks from hooks (rw)
  /var/lib/tls/ca/ from tls-ca (ro)
  /var/lib/tls/server/ from tls-secret (ro)

Volumes:
healthstatus:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit:
hooks:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit:
automation-config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: mongodb-config
Optional: false
tls-ca:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: ca
Optional: false
tls-secret:
Type: Secret (a volume populated by a Secret)
SecretName: mongodb-server-certificate-key
Optional: false
Volume Claims:
Name: data-volume
StorageClass:
Labels:
Annotations:
Capacity: 10G
Access Modes: [ReadWriteOnce]
Events:
Type Reason Age From Message


Normal SuccessfulCreate 16m statefulset-controller create Claim data-volume-mongodb-0 Pod mongodb-0 in StatefulSet mongodb success
Normal SuccessfulCreate 16m statefulset-controller create Pod mongodb-0 in StatefulSet mongodb successful
Normal SuccessfulCreate 15m statefulset-controller create Claim data-volume-mongodb-1 Pod mongodb-1 in StatefulSet mongodb success
Normal SuccessfulCreate 15m statefulset-controller create Pod mongodb-1 in StatefulSet mongodb successful
Normal SuccessfulCreate 14m statefulset-controller create Claim data-volume-mongodb-2 Pod mongodb-2 in StatefulSet mongodb success
Normal SuccessfulCreate 14m statefulset-controller create Pod mongodb-2 in StatefulSet mongodb successful

log.txt

from mongodb-kubernetes-operator.

chatton avatar chatton commented on September 17, 2024

Hi @pixie79 the logs are saying MongoDB.mongodb.com "mongodb" is invalid: spec.users: Required value this looks to indicate that the users field is not at the correct level of indentation, the example you provided looks correct though, could you double check that users is under spec.users?

If everything looks okay could you provide the exact file you're using and I'll use it to try and repro thanks!

from mongodb-kubernetes-operator.

pixie79 avatar pixie79 commented on September 17, 2024

I agree it looks like it is under the correct indentation, but I wonder if it is the '-' (which i copied from one of the examples)

Mark
mongo.yaml.gz

from mongodb-kubernetes-operator.

chatton avatar chatton commented on September 17, 2024

Hi @pixie79 sorry for the delay, I tried to repro using v0.2.0. The CR you provided is not rejected based on the user field, one thing that does happen though is that your current MongoDB user name is invalid, I get the following error message.

error creating automation config config map: Secret "mongodb-mongoRoot-scram-credentials" is invalid: metadata.name: Invalid value: "mongodb-mongoRoot-scram-credentials": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')	{"ReplicaSet": "default/mongodb"}

With this fixed, the operator then does go to the next phase of reconciliation.

Are you using a version older than 0.2.0?

There will be a new release shortly (today or tomorrow) maybe you could try again with the new release to ensure everything is as up to date as possible

from mongodb-kubernetes-operator.

theburi avatar theburi commented on September 17, 2024

This issue is labeled as stale because it has been open for more than 30 days with no activity. Remove stale label or comment or this will be closed in a few days.

from mongodb-kubernetes-operator.

github-actions avatar github-actions commented on September 17, 2024

This issue was closed because it became stale and did not receive further updates. If the issue is still affecting you, please re-open it, or file a fresh Issue with updated information.

from mongodb-kubernetes-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.