Commit Graph
22 Commits
Author SHA1 Message Date
Feike Steenbergen 92d2fda4a4 Dockerfile: Bump etcd version, include boto as a dependency 2015-06-05 10:23:49 +02:00
Feike Steenbergen ea416d98d7 Api: Bugfix for current_xlog_location in slaves. 2015-05-26 15:40:32 +02:00
Feike Steenbergen 1322413863 Added some small TODO items. 2015-05-26 09:49:40 +02:00
Feike Steenbergen f3e1c74d9b Unittests: Remove some more unneccesary code. 2015-05-21 14:59:54 +02:00
Feike Steenbergen ebfa29b89b Remove "testing" code from the helpers 2015-05-21 14:58:24 +02:00
Feike Steenbergen 7f458a84bb Remove unnessecary functions from unittest, fix one bug (return tuples) in cursor. 2015-05-21 14:53:25 +02:00
Feike Steenbergen 836a681157 Fixed the tests, by testing also found an squashed a bug in the StatusPage on python 3. 2015-05-21 14:40:07 +02:00
Feike Steenbergen 7afba469b4 Add Tests for testing the statuspage, extend the PostgreSQL test to return a wider result. 2015-05-21 13:56:08 +02:00
Feike Steenbergen c05453cc98 Merge branch 'master' of github.com:zalando/governor 2015-05-21 12:17:56 +02:00
Feike Steenbergen d958ed4fbc Add badges to Governor showing test coverage and build status. 2015-05-21 09:31:35 +02:00
Feike Steenbergen 24c29aee04 Add hostssl entry to pg_hba 2015-05-19 13:03:14 +02:00
Feike Steenbergen f6fc60800a Close connection when querying other members of cluster. 2015-05-18 16:54:36 +02:00
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