pkdone / gke-mongodb-shards-demo

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

pin mongo docker image tag to mongo:3.4.10 #4

Closed marekaf closed 6 years ago

marekaf commented 6 years ago

Yesterday/today they changed the latest tag on mongo docker image from 3.4 -> 3.6 docker-library/official-images@9ab6d58#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

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.

marekaf commented 6 years ago

Ok, great, thanks for the reply. I'm going the other way for now as my running cluster is 3.4.10 and I want to add another shard. I'll keep an eye on both repos and probably upgrade later on as well.

pkdone commented 6 years ago

Just to let you know that the two changes are backwards compatible (bind_ip param works fine on 3.4 too, and the generate script just has a longer sleep line due to a new shell bug (see inline comment in that bash script)). So you can incorporate those changes but keep your fork on 3.4, if you wanted to keep both code bases closer. Thanks Paul