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
c6cc731bf0
Merge pull request #166 from zalando/feature/clonefrom
...
Correct implementation of 'clonefrom' feature
2016-04-10 10:33:18 +02:00
Alexander Kukushkin
2c3f38f522
Merge pull request #170 from zalando/bugfix/patronictl-output_members
...
In some cases output_members function was showing cluster=None
2016-04-10 10:32:59 +02:00
Alexander Kukushkin
d7d69af12f
In some cases output_members function was showing cluster=None
2016-04-08 16:50:22 +02:00
Alexander Kukushkin
836cf3a1b8
Merge pull request #169 from jankeirse/master
...
Add KillMode to avoid issues when restarting
2016-04-05 17:04:09 +02:00
Jan Keirse
2fc01137b7
add killmode to avoid restart issues
...
This fixes https://github.com/zalando/patroni/issues/167
2016-04-05 16:47:21 +02:00
Jan Keirse
0eaf08541b
Merge remote-tracking branch 'refs/remotes/zalando/master'
2016-04-05 16:44:21 +02:00
Oleksii Kliukin
708f45568b
Merge pull request #168 from zalando/feature/patroni_config_from_environment
...
Read Patroni configuration from the environment.
2016-04-04 17:27:32 +02:00
Oleksii Kliukin
4ad190549a
Fix a typo in the help message.
2016-04-04 12:33:05 +02:00
Oleksii Kliukin
60e6ed67e3
Add unit tests.
2016-04-04 10:06:28 +02:00
Oleksii Kliukin
9744019341
Read Patroni configuration from the environment.
...
The environment variable name is PATRONI_CONFIGURATION.
If both the filename and the variable supplied, the file takes priority.
2016-04-04 09:40:30 +02:00
Alexander Kukushkin
727021306d
Merge pull request #164 from zalando/feature/fast-reattach-former-leader
...
Speed up reattach of former leader to the cluster
2016-03-31 21:57:24 +02:00
Alexander Kukushkin
e76f820cb5
Merge pull request #165 from zalando/feature/abc-metaclass
...
Set metaclass of AbstractDCS with `six` to be python 2&3 compatible
2016-03-31 21:57:12 +02:00
Alexander Kukushkin
ada50e418c
Update scenario description
2016-03-31 17:13:29 +02:00
Alexander Kukushkin
7c683336fb
Don't expose empty tags dict in API and DCS
2016-03-30 15:16:57 +02:00
Alexander Kukushkin
24cc93ac70
Don't expose known boolean tags with value not True
2016-03-30 15:00:25 +02:00
Alexander Kukushkin
db5999a639
Correct implementation of 'clonefrom' feature
...
According to https://github.com/zalando/patroni/issues/48 'clonefrom'
tag should be boolean and it should be used to mark node as a suitable
for creation of a new replica from. If there are more then one such node
in the cluster (with tag clonefrom=true), one of them will be chosed
randomly.
2016-03-30 11:30:05 +02:00
Alexander Kukushkin
0469d4374d
Set metaclass of AbstractDCS with six to be python 2&3 compatible
2016-03-24 17:07:56 +01:00
Alexander Kukushkin
d4cb15179f
Return "demote reason" more precise depending on cluster state
2016-03-24 14:52:27 +01:00
Alexander Kukushkin
9c41ce9f1c
We should run checkpoint before shutdown all the time except one case
...
(when patroni is being shutdown)
2016-03-24 14:50:34 +01:00
Alexander Kukushkin
e6af18f0bb
Former leader was not able to reattach to cluster without pg_rewind
...
It was shutdown correctly and I expected such 'join' working, but it was
not, because new leader didn't had enough time to catch up with the
master before promote.
2016-03-24 14:45:21 +01:00
Alexander Kukushkin
454c9dcb33
Merge pull request #163 from zalando/bugfix/zookeeper
...
Bugfix: In some cases Ha.cluster can be None after calling `get_cluster`
2016-03-24 12:36:25 +01:00
Alexander Kukushkin
9dc588231f
Speed up reattach of former leader to the cluster
...
Instead of starting it up in "read-only", it wil wait 2 seconds, to give
a time to somebody to prompte and after it will execute normal `recover`
procedure.
2016-03-24 12:29:30 +01:00
Alexander Kukushkin
0d3dca56ff
In some cases Ha.cluster can be None after calling get_cluster
...
Such situation is causing patroni crash. Usually it was happening during
manual failover, after former master has demoted and `reset_cluster`
method has been called. In this case `fetch_cluster` was `False` and
`_load_cluster` method was returning value from `self._cluster`, which
was `None`.
2016-03-24 12:06:39 +01:00
Alexander Kukushkin
786dbcca24
Merge pull request #161 from zalando/feature/remove-unused-code
...
Remove unused code from unit tests
2016-03-24 08:57:34 +01:00
Alexander Kukushkin
3a7d2c3874
Remove unused code from unit tests
2016-03-21 20:48:17 +01:00
Alexander Kukushkin
6c0c1b1341
Merge pull request #160 from zalando/feature/failover-candidate
...
Rename ambiguous `Failover.member` to candidate
2016-03-21 18:00:08 +01:00
Alexander Kukushkin
9fec8a41e4
Return different status if failed over not to candidate
2016-03-19 13:15:05 +01:00
Alexander Kukushkin
54055c1ff8
Rename ambiguous Failover.member to candidate
...
But! 'member' is still accepted by REST API and also name 'member' is
used to strore/read this value to/from DCS (for backward comatibility)
2016-03-18 15:59:47 +01:00
Alexander Kukushkin
ba1dc49294
Merge pull request #159 from zalando/bugfix/scheduled-failover
...
Ha loop was writing into scheduled_at during "manual_failover"
2016-03-18 13:38:57 +01:00
Alexander Kukushkin
ca3414bda0
Ha loop was writing into scheduled_at during "manual_failover"
2016-03-18 13:24:30 +01:00
Alexander Kukushkin
92394598c7
Merge pull request #156 from zalando/feature/delete-cluster-iface
...
Implement `delete_cluster` interface in for all available dcs
2016-03-18 08:54:09 +01:00
Alexander Kukushkin
8a7d2b53e0
Add forgotten mock to the test_ha.py
2016-03-15 16:40:55 +01:00
Alexander Kukushkin
0e0c8ed8d7
Implement delete_cluster interface in for all available dcs
...
In addition to that rename confusing `Etcd.client` and
`ZooKeeper.client` into `_client`. This attribute is available from
AbstractDCS and people had wrong impression that it provides the same
interface for different DCS implementations, which is obviously not the
case. For Etcd it has type etcd.Client and for ZooKeeper - KazooClient.
2016-03-15 16:25:48 +01:00
Oleksii Kliukin
3fdf249f4b
Bumped version to 0.80
v0.80
2016-03-14 16:02:49 +01:00
Oleksii Kliukin
75d196a1f4
Update the TODO list.
2016-03-14 15:57:34 +01:00
Oleksii Kliukin
f132e2b4ad
Merge pull request #153 from zalando/feature/acceptance_tests_behave
...
Feature/acceptance tests behave
2016-03-14 15:24:52 +01:00
Alexander Kukushkin
ffebfd84fd
Merge branch 'master' of github.com:zalando/patroni into feature/acceptance_tests_behave
2016-03-14 11:54:44 +01:00
Alexander Kukushkin
780c2bc594
Merge pull request #155 from zalando/bugfix/python-etcd-0.4.3
...
Migrate to python-etcd 0.4.3
2016-03-14 10:56:19 +01:00
Alexander Kukushkin
7d4ec19bca
Enable etcd cluster id check
2016-03-14 10:51:50 +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
Oleksii Kliukin
6985df3aca
Restore the test for the clone from the replica.
2016-03-11 16:59:35 +01:00
Oleksii Kliukin
59836f8775
Merge branch 'master' of https://github.com/zalando/patroni into feature/acceptance_tests_behave
2016-03-11 16:58:56 +01:00
Oleksii Kliukin
e802bba5f9
Merge pull request #151 from zalando/feature/base_backup_from_the_replica
...
First implementation of cloning from the replica.
2016-03-11 16:57:06 +01:00
Oleksii Kliukin
25106e97f3
Merge pull request #146 from zalando/feature/remove-unused-code
...
Feature/remove unused code
2016-03-11 16:47:23 +01:00