2515 Commits
Author SHA1 Message Date
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
Feike Steenbergen e96265e4d1 Make Patroni suitable for packaging.
- Restructured the repository: Moved patroni into its own directory.
- Changed readme into reStructuredText
2015-09-01 17:05:05 +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
Oleksii Kliukin 824819bbff Make script compatible with boot2docker on OS X by exporting the correct LC_ variable and running docker with -P, exposing the ports to the underlying OS. 2015-08-25 16:18:59 +02:00
Alexander Kukushkin 420176aa75 Merge branch 'master' of github.com:zalando/patroni into feature/python-etcd 2015-08-25 10:11:29 +02:00
Oleksii Kliukin 9d79be56df Merge pull request #8 from zalando/feature/external_backup
Move the functionality of restoring a replica from backup into an external script
2015-08-24 18:12:38 +02:00
Alexander Kukushkin befd33555d Refactor helpers/etcd.py
Work with etcd cluster via high-level python-etcd module.
Plus change all unit tests accordingly.
2015-08-24 16:58:08 +02:00
Oleksii Kliukin 29434e24ea Allow relative paths to external scripts. 2015-08-24 16:53:57 +02:00
Alexander Kukushkin 72043703f5 Small code cleanup 2015-08-17 16:06:48 +02:00
Alexander Kukushkin 4940665cea Update dcs.py 2015-08-11 12:01:21 +02:00
Feike Steenbergen a07a80806a Update postgresql.py
Make build_connstring truly static
2015-08-11 11:33:40 +02:00
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
Feike Steenbergen e51ea4c1ca Merge pull request #4 from zalando/feature/lost-dcs-data
Run is_healthiest_node against last know healthy configuration of cluster
2015-08-11 11:22:46 +02:00
Feike Steenbergen a11a41796b Merge pull request #6 from zalando/feature/six
use six module to support python 2 and 3 instead of conditional imports
2015-08-11 11:20:30 +02:00
Feike Steenbergen 04dee96fde Merge pull request #9 from zalando/feature/documentation
Write some documentation in a docstring format for AbstractDCS class
2015-08-11 11:18:44 +02:00
Feike Steenbergen b7bedf6b06 Update dcs.py 2015-08-11 11:16:52 +02:00
Alexander Kukushkin ce6d1c69d8 Merge branch 'master' of github.com:zalando/patroni into feature/six 2015-08-11 10:19:35 +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
Alexander Kukushkin d2f956e87f Write some documentation in a dockstring format for AbstractDCS class 2015-08-11 10:17:55 +02:00
Oleksii Kliukin 164b5760a4 remove line too long warnings where possible. 2015-08-07 16:35:00 +02:00
Oleksii Kliukin 5d1d59a42b Add mock-based unit tests for the restore module.
- add unit tests for the restore module
- additional dependencies in requirement
- harden the code that calls restore callbacks
- remove WAL-E related code from postgresql.py
2015-08-07 16:05:17 +02:00
Feike Steenbergen cdb0e43ed7 Dockerfile: Enable (undocumented) cheat mode to troubleshoot 2015-08-05 16:53:05 +02:00
Feike Steenbergen c30d8dbd1a Development: Update Dockerfile and create possibility to run local cluster
To help in developing features, the Dockerfile and its entrypoint have been extended.
The README.md explains stuff in detail, in short:

- you can now run a Patroni cluster with a single command
2015-08-05 14:12:45 +02:00
Feike Steenbergen 7c4efb33e7 Updated Dockerfile
Due to the renaming of Governor to Patroni some old references needed to be updated.
Also some python packages need to be added.

Added entrypoint.sh as a script, to ensure Patroni will have PID = 1 when the container is run.
2015-08-05 09:56:32 +02:00
Oleksii Kliukin 74a1daad09 fix a typo in the named tuple definition. 2015-08-04 17:13:36 +02:00
Oleksii Kliukin 8bed553d30 Use new-style classes. 2015-08-04 16:52:03 +02:00
Oleksii Kliukin e69f015369 switch to using WAL-E by default. 2015-08-04 16:22:46 +02:00
Oleksii Kliukin 67da1b3a78 Make parse_connstring staticmethod less 'selfish' 2015-08-04 15:26:12 +02:00
Oleksii Kliukin f17b651107 Adoprt WAL-E related code for a stand-alone script.
- make sure all parameters are taken from the env variables.
- make sure WAL-E code is not involved if the image is not configured for it
- pick up pg_basebackup as an alternative if WAL-E fails.

The WAL-E support will be switched on in subsequent commits.
2015-08-04 14:10:11 +02:00
Oleksii Kliukin fd884a53a9 Multiple small fixes:
- Do delete trigger file in the patroni itself.
- Fix the typo in the datadir member.
- Add #! at the top of the python script.
2015-08-03 15:51:40 +02:00