picatz / terraform-google-nomad

📗 Terraform Module for Nomad clusters with Consul on GCP
https://registry.terraform.io/modules/picatz/nomad/google
MIT License
78 stars 16 forks source link

Why is the nomad server configuration using a temporary folder for data? #55

Closed maelp closed 1 year ago

maelp commented 1 year ago

I see that this line configures the server to use a temporary path for data, is it intended, or should it also use /nomad/data?

Side question: if we run both a binary with the server config and another binary with the client config, on the same server, both pointing to the same data dir, does it cause issues?

picatz commented 1 year ago

I see that this line configures the server to use a temporary path for data, is it intended, or should it also use /nomad/data?

This is definitely unintended. The data_dir option is used by Nomad server nodes to store cluster state, including the replicated log and snapshot data. This is a great find, and something I plan to fix in the next release of this module.

Side question: if we run both a binary with the server config and another binary with the client config, on the same server, both pointing to the same data dir, does it cause issues?

Not totally sure, I don't think I've ever done this. From a security perspective, I would advise against doing so. But, I think this would be a good question for Discuss.

picatz commented 1 year ago

Thank you!