237 Commits

Author SHA1 Message Date
Feike Steenbergen
b0707c8ddd Merge branch 'master' of github.com:zalando/patroni into feature/external_backup
Conflicts:
	requirements-py2.txt
2015-08-11 11:27:53 +02:00
Alexander Kukushkin
e9d46b0adb Merge branch 'master' of github.com:zalando/patroni into feature/lost-dcs-data 2015-08-11 10:19:07 +02:00
Oleksii Kliukin
7f2dcc0a95 Move replica creation code into a separte file. So far, only the class that makes replicas with pg_basebackup is called. 2015-08-03 11:44:11 +02:00
Oleksii Kliukin
5171964758 Merge branch 'master' into feature/callbacks 2015-07-27 16:19:03 +02:00
Oleksii Kliukin
b92bfb34a5 Futher test for postgresql module (includes callbacks) 2015-07-27 13:04:01 +02:00
Oleksii Kliukin
859da0db0a Make unit tets run again. 2015-07-27 10:10:29 +02:00
Alexander Kukushkin
26935c3725 Merge branch 'master' of github.com:zalando/patroni into feature/lost-dcs-data 2015-07-15 12:49:38 +02:00
Alexander Kukushkin
66f4f790d2 Improve test coverage 2015-07-15 12:49:17 +02:00
Alexander Kukushkin
b54119b918 Run is_healthiest_node against last know healthy configuration of cluster
This will help to survive when everything was wiped from configuration
store.
2015-07-15 11:20:25 +02:00
Alexander Kukushkin
71fce312c2 Enforce flake8 check 2015-07-10 10:53:04 +02:00
Alexander Kukushkin
54400c6dec Merge branch 'multidcs' of github.com:CyberDem0n/governor into feature/multidcs
Conflicts:
	governor.py
	tests/test_governor.py
	tests/test_postgresql.py
2015-07-08 08:47:26 +02:00
Alexander Kukushkin
c5edcb589b return result of last_operation as a string 2015-07-07 12:24:02 +02:00
Alexander Kukushkin
cc71906009 Inherit Etcd from abstract class 2015-07-02 15:15:07 +02:00
Alexander Kukushkin
10d992a974 Merge pull request #26 from CyberDem0n/master
Reduce amount of writes into etcd
2015-06-24 16:39:50 +02:00
Alexander Kukushkin
275e18e58a Refactor tests 2015-06-10 14:21:23 +02:00
Oleksii Kliukin
8ab7717f13 increase test coverage for the changes in postgresql.py 2015-06-05 10:03:42 +02:00
Alexander Kukushkin
5cceac7621 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	tests/test_postgresql.py
2015-06-02 12:38:45 +02:00
Alexander Kukushkin
d9fbbf3ae9 Make pg_hba section more compact 2015-06-02 12:37:26 +02:00
Alexander Kukushkin
88631e14fa Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	helpers/postgresql.py
	tests/test_postgresql.py
2015-06-02 10:28:28 +02:00
Alexander Kukushkin
f9ce29d49f rename address to conn_url in a Member obj
and introduce new field: api_url
2015-06-02 08:52:34 +02:00
Alexander Kukushkin
bacd05d99e Determine preferable local address to connect through.
If listen contains '*' or 0.0.0.0 - connect via localhost
In all other cases pick the first one.
2015-06-01 17:00:15 +02:00
Alexander Kukushkin
1bcc2b5fa6 Extend postgres?.yml with pg_hba section to give possibility to customize pg_hba.conf 2015-06-01 16:05:35 +02:00
Alexander Kukushkin
ccdff5ea99 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	helpers/postgresql.py
	tests/test_postgresql.py
2015-06-01 14:14:53 +02:00
Alexander Kukushkin
adcc7ac256 Try to avoid "double" promotion.
Also check presence of trigger_file on master after promotion when
pg_is_in_recovery() = false and if it is there - remove it.
Plus check presence of trigger_file on a new slave (after running
pg_basebackup) and if it is there - also remove it.
2015-06-01 13:48:44 +02:00
Alexander Kukushkin
939254021e Code cleanup: do not modify os.environ but pass copy of it to subprocess.call 2015-06-01 11:03:06 +02:00
Alexander Kukushkin
b85262637d Bugfix: do not create replication slot for master 2015-06-01 09:20:24 +02:00
Alexander Kukushkin
0cd81a1ecf Merge branch 'restapi' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	tests/test_postgresql.py
2015-05-27 11:15:15 +02:00
Alexander Kukushkin
9968a66048 helpers/postgresql.py
Replace os.system with subprocess.call
2015-05-27 11:08:06 +02:00
Alexander Kukushkin
bbf1110518 Merge branch 'restapi' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	governor.py
	helpers/postgresql.py
	postgres0.yml
	postgres1.yml
	tests/test_postgresql.py
2015-05-26 09:56:35 +02:00
Alexander Kukushkin
faf295dcd0 Add initialize key into Cluster 2015-05-24 19:26:35 +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
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
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
Alexander Kukushkin
d56b8772e5 Update unit tests 2015-05-20 18:21:08 +02:00
Alexander Kukushkin
ebb8bce0f6 some simple tests 2015-05-19 12:49:53 +02:00