Commit Graph
442 Commits
Author SHA1 Message Date
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 9894a7ce2a Merge pull request #20 from zalando/feature/retry
Retry requests to configuration store
2015-09-04 16:24:43 +02:00
Alexander Kukushkin a69565fc5f Set Postgresql._SERVER_VERSION only after real connect. 2015-09-04 13:22:44 +02:00
Alexander Kukushkin c913c8ad92 Calculate xlog bytes with using lsn_to_bytes method
This method behaves differently depending on server version and will
allow to use patroni with postgres older than 9.3
2015-09-04 12:11:55 +02:00
Alexander Kukushkin 8b9e99090f Move lsn_to_bytes and bytes_to_lsn into Postgresql class
and make their behavior version specific
2015-09-04 10:41:59 +02:00
Alexander Kukushkin 9361732722 Fix pep8 formatting and unit-tests 2015-09-04 08:29:16 +02:00
Alexander Kukushkin df06860bde Merge pull request #23 from pgexperts/93compat
93compat
2015-09-04 08:14:13 +02:00
Josh Berkus 5612cd0280 Changed use_slots to be backwards compatible by using config.get() per PR feedback. 2015-09-03 22:20:27 -07:00
Josh Berkus aeea7196bd Fixing flake8 issue. 2015-09-03 21:46:06 -07:00
Josh Berkus 6df56fc6cc Another try at the is_healthiest_node bugfix. 2015-09-03 21:41:33 -07:00
Josh Berkus 2b62adae21 Fixed inherited bug in is_healthiest_node() with LSN position. 2015-09-03 21:22:59 -07:00
Josh Berkus bdb1454e35 Another commit because flake8 is a huge waste of time. 2015-09-03 21:10:30 -07:00
Josh Berkus 5f4a9ffabb Text spacing changes in an attempt to get flake8 to stop complaining. 2015-09-03 21:04:42 -07:00
Josh Berkus f5627a498e Fixed test_postgresql.py to include use_slots. 2015-09-03 18:41:30 -07:00
Josh Berkus f2338e074c Added documentation, sample config for optional replication slots. 2015-09-03 18:16:44 -07:00
Josh Berkus 2b801a3ccc Next 9.3 compatibility commit. Removed pg_lsn, since it's not available in 9.3. 2015-09-03 18:03:25 -07:00
Josh Berkus 330f9023ee Interim commit to make replication slots optional for 9.3 users. 2015-09-03 17:46:41 -07:00
Alexander Kukushkin 50420771ce Retry when executing take_leader method. 2015-09-03 16:53:15 +02:00
Alexander Kukushkin 2f6399de27 More unit-tests for etcd 2015-09-03 16:35:58 +02:00
Alexander Kukushkin 66286733b2 Enable retry functionality for etcd with default deadline=10 seconds 2015-09-03 15:03:09 +02:00
Alexander Kukushkin 8d99fd17a0 Merge branch 'master' of github.com:zalando/patroni into feature/retry 2015-09-03 13:18:58 +02:00
Alexander Kukushkin e8b2fb112b It is better to reap childs before running relatively long sleep v0.1 2015-09-03 11:50:58 +02:00
Alexander Kukushkin 58410db9dd Implemented Retry class inspired by KazooRetry 2015-09-03 11:47:08 +02:00
Alexander Kukushkin 7456662eef Merge branch 'master' of github.com:zalando/patroni into feature/watch-leader-key 2015-09-03 10:33:26 +02:00
Alexander Kukushkin a670b598f4 Implement unit test for reap_children function 2015-09-02 16:48:40 +02:00
Oleksii Kliukin da132ca1fc Do not rely on env vars for superuser role name.
Environment variables may not be set in Docker.
Instead, obtain the superuser role from the database.
2015-09-02 15:20:16 +02:00
Alexander Kukushkin 7eed8521d0 Merge branch 'master' of github.com:zalando/patroni into feature/watch-leader-key 2015-09-02 13:33:44 +02:00
Alexander Kukushkin a7f7a7bf58 Remove spurious print 2015-09-02 13:33:07 +02:00
Alexander Kukushkin 7cdb5f7138 Merge branch 'master' of github.com:zalando/patroni into feature/watch-leader-key 2015-09-02 13:28:14 +02:00
Alexander Kukushkin 8bc9d00391 Code cleanup 2015-09-02 13:26:40 +02:00
Alexander Kukushkin 0beecb97a7 Reschedule next ha loop after promote 2015-09-02 13:25:33 +02:00
Oleksii Kliukin a5f2ab6f88 Better SIGCHLD handling, use correct user name.
- Defer SIGCHLD processing until the later stage in order to allow
  subprocess to run its own reaping of children and return the correct
  exit code from the process called.

- When changing the password at startup, do not assume the user postgres.
2015-09-02 12:56:23 +02:00
Oleksii Kliukin 3e4d2df33b put a real restore/replication command inside the test postgres.yaml files 2015-09-02 12:04:39 +02:00
Alexander Kukushkin c6abf85740 Bugfix: sleep method was renamed to watch 2015-09-02 08:42:47 +02:00
Alexander Kukushkin eb85caa3bd Remove spurious print 2015-09-01 17:16:15 +02:00
Alexander Kukushkin 3924a90c74 Create conn_url propery in a Leader object 2015-09-01 16:43:28 +02:00
Alexander Kukushkin 5a0634d7b0 Create name property in a Cluster object
It returns self.member.name and simplifies later usage in code.
2015-09-01 16:37:03 +02:00
Feike Steenbergen 61e01b1435 Update documentation and Dockerfile to point to a SNAPSHOT version. Include python-etcd in Dockerfile 2015-09-01 11:35:32 +02:00
Alexander Kukushkin ead0b7444f Merge pull request #10 from zalando/feature/python-etcd
python-etcd
2015-09-01 10:04:20 +02:00
Alexander Kukushkin 10c95a23e4 Rename sleep to watch in a AbstractDCS
This method suppose to watch for changes of leader key if current node
is not leader and also it could watch for changes in a members list if
current conde is the leader.
2015-09-01 09:59:37 +02:00
Alexander Kukushkin fab321c6b0 Watch for changes of leader key 2015-09-01 09:54:57 +02:00
Alexander Kukushkin 3b1efff53e Refactor Cluster object
`Cluster.leader` is not reference to `Member` anymore, but to `Leader`
`Leader` class contains field `index` (update index). This field is very
useful for watching for events which changing leader key. Also `Leader`
contains `member` field, which should reference real member.
2015-08-27 10:53:22 +02:00
Alexander Kukushkin 65d3df3ec0 Merge branch 'master' of github.com:zalando/patroni into feature/python-etcd 2015-08-26 15:23:42 +02:00
Alexander Kukushkin c2aaa876d2 Merge branch 'feature/cloexec' of github.com:zalando/patroni into feature/python-etcd 2015-08-26 15:18:02 +02:00
Alexander Kukushkin 60a360a4da Reset _machines_cache before doing next load attempt 2015-08-26 15:17:24 +02:00
Alexander Kukushkin 353fc58bee Do not inherit rest api port on fork 2015-08-26 15:14:44 +02:00
Oleksii Kliukin af10bb8ab8 make sure replica-creation scripts are also available to patroni docker image. 2015-08-25 18:22:47 +02:00
Oleksii Kliukin 6b60be09a1 include restore command in the entyrpoint 2015-08-25 16:19:22 +02:00