Commit Graph
29 Commits
Author SHA1 Message Date
Alexander Kukushkin 342eec5c2f Bugfix: pg_rewind can work only with master 2016-05-25 20:50:28 +02:00
Alexander Kukushkin fee07efabb Fix python3 bugs 2016-04-18 18:09:36 +02:00
Alexander Kukushkin 24a2ea6cef Refactor acceptance tests to make them work against ZooKeeper
and make it easier to implement controllers for new DCS, i.e. consul
2016-04-10 10:37:43 +02:00
Alexander Kukushkin 9fec8a41e4 Return different status if failed over not to candidate 2016-03-19 13:15:05 +01:00
Alexander Kukushkin 79f4d9a13b Attempt to export acceptance tests coverage results to coveralls 2016-03-13 09:42:02 +01:00
Alexander Kukushkin f3a238ccbc Attempt to export acceptance tests coverage results to coveralls 2016-03-13 09:24:01 +01:00
Alexander Kukushkin 7e0723a7fc Attempt to export acceptance tests coverage results to coveralls 2016-03-13 09:17:52 +01:00
Alexander Kukushkin 62f11ab747 Attempt to export acceptance tests coverage results to coveralls 2016-03-13 09:09:31 +01:00
Alexander Kukushkin cdee1c2911 update requirements.txt 2016-03-12 16:06:35 +01:00
Alexander Kukushkin 01afd09ca2 Migrate to python-etcd 0.4.3
Despite this release was very buggy it has really nice features:
* EtcdWatchTimedOut exception is raised when `watch` call timed out
* it supports SRV autodiscovery

Since we already implemented our own SRV discovery this feature is not
really interesting for us, but it solves the problem of having two
requirements files for different python versions, because python-etcd
will install dnspython or dnspython3 as a dependency.

In order to fix https://github.com/jplana/python-etcd/issues/152 and
https://github.com/jplana/python-etcd/pull/154 I had to override
`api_execute` method.
2016-03-12 15:49:42 +01:00
Alexander Kukushkin 60997b463d Merge branch 'master' of github.com:zalando/patroni into feature/acceptance_tests 2016-03-10 20:40:22 +01:00
Alexander Kukushkin c955e29805 Disable gce boto plugins by overriding BOTO_CONFIG
These plugins are not compatible with python 3 and breaking unit tests
2016-03-10 20:02:40 +01:00
Alexander Kukushkin dbb3e8308b Merge branch 'master' of github.com:zalando/patroni into codequality 2016-02-22 19:20:23 +01:00
Alexander Kukushkin acd21eae4c Fix obvious bugs and pep8 formatting 2015-10-25 18:11:45 +01:00
Alexander Kukushkin 364d9b5a8a Revert "Small changes added for testing, and failed merge from master."
This reverts commit fc68acd0ab.
2015-10-24 13:13:23 +02:00
Alexander Kukushkin c9577e1a62 Merge Feike-s and my work on pypi package alltogether 2015-09-06 12:56:13 +02:00
Alexander Kukushkin 1774d6e31a Merge branches watch-leader-key and package-refactoring 2015-09-05 16:09:28 +02:00
Alexander Kukushkin 3a4a2dbb94 Merge branch 'master' of github.com:zalando/patroni into feature/watch-leader-key 2015-09-05 15:31:37 +02:00
Alexander Kukushkin ac2740eeb9 Drop unused variable server_version 2015-09-05 15:22:38 +02:00
Alexander Kukushkin 7cce02ae95 Always use pg_xlog_location_diff to calculate bytes written to xlog
Drop unused functionality (lsn_to_bytes, bytes_to_lsn)
Revert some changes.
2015-09-05 15:19:17 +02:00
Alexander Kukushkin faf295dcd0 Add initialize key into Cluster 2015-05-24 19:26:35 +02:00
Alexander Kukushkin 1096e04343 Bigfix, cursor.closed contains boolean value 2015-05-24 16:00:31 +02:00
Alexander Kukushkin db34e1f458 Write get_postgresql_status exception into log file 2015-05-24 15:57:10 +02:00
Alexander Kukushkin 755f54f266 Improve test coverage for governor.py 2015-05-24 15:42:41 +02:00
Alexander Kukushkin 8dd99170bf Refactor exceptions handling in etcd.py and ha.py
update_leader can throw EtcdError exception
unused HealthiestMemberError exception is removed
2015-05-24 15:40:36 +02:00
Alexander Kukushkin 188741de5a Merge branch 'master' of github.com:CyberDem0n/governor into restapi 2015-05-24 09:02:42 +02:00
Alexander Kukushkin ce267d9f1e query method will retry only in case of communication error 2015-05-24 09:01:23 +02:00
Alexander Kukushkin d202f72a42 Added simple web server which shows current state of postgres
Server always returns json which contains some status of postgres:
* instance type: master/slave
* xlog location for master
* xlog received_location, replayed_location
This server could be used by haproxy
GET / returns 200 if there is postgres master behind governor.
GET /slave returns 200 is there is postgres slave behind governor
In all other cases it returns 503
Currently server always listening on 0.0.0.0:8080, but it should be
configurable. In the next versions this rest api could also report some
status of etcd and could be used by is_healthiest_node method
2015-05-23 20:29:51 +02:00
Alexander Kukushkin f53c369c69 Connect timeout 5 seconds for psycopg2
Refactored query and is_healthiest_node methods
query method wont retry more then 3 times if OperationalError raised
is_healthiest_node takes into account that one of the nodes could be
still a master
2015-05-23 20:21:13 +02:00