Commit Graph
421 Commits
Author SHA1 Message Date
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 e8b2fb112b It is better to reap childs before running relatively long sleep v0.1 2015-09-03 11:50:58 +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 a7f7a7bf58 Remove spurious print 2015-09-02 13:33:07 +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
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 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