calculate_memory_settings_automatically always gives all memory to data service
It looks like memory is always being allocated based on all the services regardless if you pass in the --node-services argument.
https://github.com/gruntwork-io/terraform-aws-couchbase/blob/027eb19e57a7bc2522a1287c4adf008d655afc40/modules/run-couchbase-server/run-couchbase-server#L754
Is there a reason this is ignoring the $node_services argument passed in and always using local cluster_services="$DEFAULT_SERVICES"?
Is the run-couchbase-server module/script actually setting up the _ramsize for services on the cluster then it tells the node what to allocate when it's added to the cluster?
Are you using --manage-memory-manually?
I am for the data nodes but the index nodes are not.
I spent yesterday tracing out what is going on. I thought that we were setting the resources for each node (type) based on those settings, however, if I understand correctly now it's really just the first data node that setts the resources for the entire cluster. 🤯 Obviously I've not read every single doc on the couchbase's site. (still not sure where this is mentioned, perhaps assumed)
This function reads like it came from an example that had all services on every node. Shouldn't it give index more memory in the MDS example since it is on a separate node?
I'm assuming this will need to be re-written to work in production.
Please see the documentation here and let me know if that helps!
Please see the documentation here and let me know if that helps!
Yeah, saw that. It should be more explicit that you must use the --manage-memory-manually flag when separating services and nodes like the MDS example. The calculate_memory_settings_automatically function isn't smart enough to deal with anything but running all services on every node.
A PR to improve the docs and make that clearer is very welcome!
This repo is being archived, feel free to use a fork if necessary.