Lab - Configure a Sharded Cluster

If you are getting the following error when you try running validation for shard addition, then the issue is the indentation in the conf file. The conf files follow YAML format and they are quite pesky. Use YAML validator ( Looker for YAML “linters”) to ensure the indentation is fine.

vagrant@m103:~$ validate_lab_first_sharded_cluster

Replica set ‘m103-repl’ not configured correctly - make sure each node is started with

a wiredTiger cache size of 0.1 GB. Your cluster will crash in the following lab

if you don’t do this!

2 Likes

Are you getting above even after using wiredtiger storage parameter?
For indentation issues it would give different type of errors while starting mongod instance itself

Good advice, but should also highlight that if one forgets to include this storage.wiredTiger.engineConfig.cacheSizeGB option, then it will also throw the same error message.

As at August 2019, the culprits were engineConfig and cacheSizeGB which had 3 spaces instead of 2 if copied directly from the lab, and perhaps it hasn’t yet been fixed. Let’s make @Shubham_Ranjan aware.

image

1 Like

it was definitely indentation as the validation went thru after I fixed the indentation. I face similar issues when I work with YAML for IaC (Information as Code) in AWS and I use linters to fix such issues.

007_jb, that definitely would be another reason and thanks for pointing that out.

Hi @007_jb,

Thanks for surfacing this. I will have it fixed.

~ Shubham

1 Like