Commit Graph
10 Commits
Author SHA1 Message Date
Feike Steenbergen b8ce6794de Initialize cluster with encoding=UTF8 by default. 2015-05-18 13:35:43 +02:00
Feike Steenbergen 0b669e0d20 Cleanup
Removed aws reference from Dockerfile, remove unnecessary steps.
Connect using libpq parameters, therefore providing nice application name for Governor.
2015-05-15 13:52:20 +02:00
Feike Steenbergen 2b56379b85 Change default port for the health check to 8008. 2015-05-12 15:48:30 +02:00
Feike Steenbergen c4168bfeb5 Bugfix: Headers sent before http status for the pg_status page. 2015-05-12 14:56:02 +02:00
Feike Steenbergen 362b6b4fa2 Made healtcheck port configurable, fixed standalone status page. 2015-05-12 14:48:40 +02:00
Feike Steenbergen ed30684d85 Merge branch 'features/refactoring' of github.com:zalando/governor into feature/status_page
Conflicts:
	helpers/postgresql.py
2015-05-12 14:39:51 +02:00
Feike Steenbergen a56b346295 Hardened the health checks and implemented a real status page.
For the postgresql helper, hardened the code to get "the" cursor of the postgresql instance.
For the statuspage, a small status json is returned.
To find out what status a PostgreSQL cluster is in we use the cursor (instead of the provided query() function), as the query function does some retrying etc. For the healthcheck we want to simple provide an answer to a simple query, if we have to reconnect, we are not *that* healthy anyway.

Dropped catching exceptions in the do_GET block, as the HTTPServer will do that nicely for us anyway.
2015-05-12 11:58:47 +02:00
Feike Steenbergen e7adb69503 Start the http request handler for load balancing as a thread in Governor.
When not running standalone, some better referencing to the Postgresql instance was needed.
2015-05-11 13:11:09 +02:00
Feike Steenbergen 91b71f8579 Created tatuspage, a health check for a PostgreSQL cluster served using http.
The StatusPage uses a BaseHTTPServer to server 3 simple http endpoints:

- pg_master, returns 200 if PostgreSQL is running as master
- pg_slave,  returns 200 if PostgreSQL is running as slave
- pg_status, returns some information about the cluster

It does this by relying on the PostgreSQL connection of the Governor.
2015-05-11 11:46:01 +02:00
Feike Steenbergen 0b053e3b33 Created a Dockerfile to be able to run Governor using a local etcd.
Usefull for developing and testing the Governor locally.
2015-05-07 13:17:28 +02:00