cockroachdb / dcos-cockroachdb-service

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

Fix metric gathering url and port #75

Closed minyk closed 3 years ago

minyk commented 5 years ago

Hello.

Currently, metric system isn't working like this:

CONNECTION ERROR] HTTPConnectionPool(host='pg.cockroachdb.l4lb.thisdcos.directory', port=8123): Max retries exceeded with url: /_status/vars (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0c2db94978>: Failed to establish a new connection: [Errno 111] Connection refused',))
[CONNECTION ERROR] Waiting 60 seconds to retry...

I think https://github.com/cockroachdb/dcos-cockroachdb-service/commit/04e30997899daaef555b633a022272c573e5acfc and https://github.com/cockroachdb/dcos-cockroachdb-service/commit/e2136823bab0573923e27329692230568734878c commits set the wrong VIP prefix and PORT_HTTP.

This PR fix the url and the port, and use framework_name.replace("/","") for nested service ID like this: test/cockroachdb.

After this PR, I'll send another PR for join.sh.mustache and init.sh.mustache which contains FRAMEWORK_NAME env variable too. The nested service is also broken by these uses.

Thank you.