pkdone / gke-mongodb-shards-demo

MongoDB Sharded Cluster Deployment Demo for Kubernetes on GKE
MIT License
48 stars 33 forks source link

pin mongo to 3.4.10 #3

Closed marekaf closed 6 years ago

marekaf commented 6 years ago

Hi again :) Yesterday/today they changed the latest tag on mongo docker image from 3.4 -> 3.6 https://github.com/docker-library/official-images/commit/9ab6d581b051a7b78fc212924f583bbde1aa74bd#diff-c7d492b78482cdbec624f40bb1b722fd

that breaks quite a lot of things, 3.6 seems not to have --bind_ip_all by default and sh.addShard yields this error

mongos> sh.addShard("Shard4RepSet/mongod-shard4-0.mongodb-shard4-service.default.svc.cluster.local:27017");
{
        "code" : 96,
        "ok" : 0,
        "errmsg" : "can't add shard 'Shard4RepSet/mongod-shard4-0.mongodb-shard4-service.default.svc.cluster.local:27017' because a local database 'config' exists in another config"
}

I'd recommend pinning the mongo docker image - mongo:latest -> mongo:3.4.10 What do you think?

pkdone commented 6 years ago

Hi, many thanks for spotting this. My preference is to fix this to support 3.6 which I am just testing changes for now for the project https://github.com/pkdone/gke-mongodb-demo and then I will do the same changes here.

pkdone commented 6 years ago

Just tracking changes

pkdone commented 6 years ago

Fixed now for MongoDB 3.6 - added bind all ip addresses because authentication is already enabled (MongoDB 3.6 added bind to just 127.0.0.1 default behaviour to make users think and act on setting up security first, which is already performed for this project).

marekaf commented 6 years ago

I had a problem adding a shard to a running cluster as I mentioned above. That was probably just the fact the cluster nodes were 3.4 and the new shards were 3.6, but I still wanted to mention it again.