cockroachdb / dcos-cockroachdb-service

Framework for running CockroachDB on Mesosphere DC/OS
Apache License 2.0
8 stars 6 forks source link

support foldered service name #51

Open realmbgl opened 6 years ago

realmbgl commented 6 years ago

hello, the dc/os cockroachdb service allows the configuration of the service name. Service names in dc/os can be scoped, so you can have a service name like /test/cockroachdb. Service name resolves the {{FRAMEWORK_NAME}} template. I see that this template for example is also used in start.sh.mustache which causes the following error if the name is foldered.

I180123 17:26:00.792720 41 cli/start.go:503  starting cockroach node
E180123 17:26:00.800914 1 cli/error.go:68  failed to start server: unable to resolve RPC address "cockroachdb-2-node-join./test/cockroachdb.autoip.dcos.thisdcos.directory:26257": lookup cockroachdb-2-node-join./test/cockroachdb.autoip.dcos.thisdcos.directory: no such host
Error: failed to start server: unable to resolve RPC address "cockroachdb-2-node-join./test/cockroachdb.autoip.dcos.thisdcos.directory:26257": lookup cockroachdb-2-node-join./test/cockroachdb.autoip.dcos.thisdcos.directory: no such host
Failed running "start"

This is easy to fix. Like in this case instead of

{{TASK_NAME}}.{{FRAMEWORK_NAME}}.autoip.dcos.thisdcos.directory

use the following

{{TASK_NAME}}.$FRAMEWORK_HOST
a-robinson commented 6 years ago

Thanks @realmbgl! I'll update this the next time I have a DC/OS cluster up and running to test the changes on.