canonical / mongodb-k8s-operator

Operator charm for MongoDB
Apache License 2.0
13 stars 15 forks source link

Mongo not able to start #229

Open markbeierl opened 11 months ago

markbeierl commented 11 months ago

Steps to reproduce

  1. sudo snap install microk8s --classic --channel=1.26
  2. sudo snap install juju --classic --channel=2.9/stable
  3. microk8s.enable hostpath-storage
  4. juju bootstrap microk8s
  5. juju deploy ch:mongodb-k8s -m test --channel 5/edge --storage mongodb=50M

Expected behavior

Mongo is usable after deployment.

Actual behavior

Charm shows mongo as usable, but the following errors are seen in the log, and the pod does not respond to port 27017 externally.

root@mongodb-k8s-0:/# nc -zvw1 mongodb-k8s 27017
nc: connect to mongodb-k8s (10.152.183.20) port 27017 (tcp) timed out: Operation now in progress
root@mongodb-k8s-0:/# nc -zvw1 127.0.0.1 27017
Connection to 127.0.0.1 27017 port [tcp/*] succeeded!

Versions

Operating system: Ubuntu 22.04 Juju CLI: 2.9 Juju agent: 2.9.45 Charm revision: mongodb-k8s 5/edge 36 microk8s: v1.26.10 revision 6102

Log output

2023-11-23T14:52:50.903577443Z 2023-11-23T14:52:50.903Z [pbm-agent] 2023-11-23T14:52:50.000+0000 W [agentCheckup] get current storage status: query mongo: mongo: no documents in result
2023-11-23T14:52:50.905493118Z 2023-11-23T14:52:50.905Z [pbm-agent] 2023-11-23T14:52:50.000+0000 E [agentCheckup] check storage connection: unable to get storage: get config: get: mongo: no documents in result
2023-11-23T14:52:55.905212611Z 2023-11-23T14:52:55.905Z [pbm-agent] 2023-11-23T14:52:55.000+0000 E [agentCheckup] check storage connection: unable to get storage: get config: get: mongo: no documents in result

Additional context

This charm has been used in OSM for a long time, but unfortunately just recently stopped working in all releases (v10.0, v12.0, v14.0). The community is going to be replacing Mongo Charm with a Helm chart as they no longer trust charms.

github-actions[bot] commented 11 months ago

https://warthogs.atlassian.net/browse/DPE-3047