Commit Graph
816 Commits
Author SHA1 Message Date
Alexander Kukushkin 9c12eb671d Fix unit tests 2016-02-24 12:10:58 +01:00
Oleksandr Shulgin 16b321e0a5 Add dummy cluster name to test_ctl / zookeeper 2016-02-23 17:33:15 +01:00
Oleksandr Shulgin 524cfafbbe Don't mock get_dcs() for ZK, we are trying to test it 2016-02-23 17:18:16 +01:00
Oleksandr Shulgin c630b60ca9 Merge remote-tracking branch 'origin/master' into bugfix/zookeeper-support-for-ctl 2016-02-23 17:12:41 +01:00
Oleksandr Shulgin a1417875a2 Add dummy patronictl tests with ZooKeeper 2016-02-23 17:04:16 +01:00
Oleksandr Shulgin 2f84e9f4ec Add support for ZooKeeper/Exhibitor DCS URI in patronictl ... -d 2016-02-23 16:44:09 +01:00
Alexander Kukushkin 70742e6aba Merge pull request #139 from zalando/codequality
remove unused code
2016-02-23 13:24:53 +01:00
Oleksii Kliukin 6ebfbd241a Merge pull request #141 from jankeirse/master
sample systemd service file
2016-02-23 12:35:37 +01:00
Alexander Kukushkin ec85e2eb49 make quantifiedcode happier 2016-02-23 12:05:02 +01:00
Alexander Kukushkin 756158a735 make codacy and quantifiedcode happier 2016-02-23 11:59:02 +01:00
Alexander Kukushkin 6b3c4697fc Remove unused code 2016-02-23 11:49:22 +01:00
Alexander Kukushkin ce33090c0d Mock dcs.watch directly instead of using wraper 2016-02-23 11:48:52 +01:00
Alexander Kukushkin dd20fc7e71 Refactor follow method 2016-02-23 11:47:47 +01:00
Alexander Kukushkin 641cc4013e Mock a few of methods in Postgresql class instead of the whole class 2016-02-23 11:46:49 +01:00
Alexander Kukushkin dbb3e8308b Merge branch 'master' of github.com:zalando/patroni into codequality 2016-02-22 19:20:23 +01:00
Oleksii Kliukin cde61187c2 Merge pull request #134 from zalando/feature/scheduled_failover_squashed
Feature/scheduled failover squashed
2016-02-22 16:40:17 +01:00
Oleksii Kliukin 287c0b3125 Fix the call to the function that was forgotten to be renamed. 2016-02-22 14:31:29 +01:00
Oleksii Kliukin 26e1586288 Make the patronictl test provide an input for the schedule, even if it's empty. 2016-02-22 12:20:20 +01:00
Jan Keirse 753ba835f1 wrong comment about restart 2016-02-18 11:08:18 +01:00
Jan Keirse e68e253d16 Add patroni.service file documentation. 2016-02-18 11:06:40 +01:00
Jan Keirse eb1e678820 sample systemd service file 2016-02-18 11:04:41 +01:00
Alexander Kukushkin 4038d94c5a Fix more codacy issues 2016-02-17 14:59:17 +01:00
Alexander Kukushkin a210cfd1ab Fix more codacy issues 2016-02-17 14:51:59 +01:00
Alexander Kukushkin f7d60c61b6 remove unused code 2016-02-17 14:09:00 +01:00
Alexander Kukushkin 61feb47da8 Merge pull request #137 from LappleApple/patch-2
Rename LICENCE to LICENSE
2016-02-17 13:33:05 +01:00
Lauri at Zalando 602b21ac7d Rename LICENCE to LICENSE
spelling error
2016-02-17 13:15:41 +01:00
Alexander Kukushkin f079a9f308 remove unused code 2016-02-17 12:34:22 +01:00
Alexander Kukushkin 1b9e77fe83 pep8 formatting 2016-02-17 12:34:04 +01:00
Alexander Kukushkin 1b14229da4 Catch TypeError within ha loop not in the unit test
In addition to that use sleep function from patroni.utils instead of
time.sleep which is interruptable
2016-02-17 12:18:50 +01:00
Alexander Kukushkin a875e93f2e Merge branch 'master' of github.com:zalando/patroni into feature/scheduled_failover_squashed 2016-02-17 12:14:10 +01:00
Alexander Kukushkin f131961d8b Merge pull request #136 from zalando/codequality
Improve quality of code by resolving issues found by quantifiedcode and codacy
2016-02-17 09:26:21 +01:00
Alexander Kukushkin 0710bdfead directory could disappear after successfull call of isdir 2016-02-15 16:01:11 +01:00
Alexander Kukushkin 1bc22727d5 patroni/postgresql.py
directory could disappear after successfull call of isdir
2016-02-15 14:50:59 +01:00
Alexander Kukushkin 3d4fdea8d5 remove unused import 2016-02-15 13:46:53 +01:00
Alexander Kukushkin 31bad6df49 revert some changes which changed functionality of original code 2016-02-15 13:41:50 +01:00
Alexander Kukushkin 58508c3404 remove uneeded code 2016-02-12 16:57:56 +01:00
Alexander Kukushkin b973ed7e4f improve test coverage 2016-02-12 16:52:26 +01:00
Alexander Kukushkin 544ecdc1be make quantifiedcode and codacy happier 2016-02-12 15:53:24 +01:00
Alexander Kukushkin ab0ef91f24 Improve quality of code by resolving issues found by quantifiedcode and codacy 2016-02-12 14:52:23 +01:00
Alexander Kukushkin 36aef07738 Merge branch 'master' of github.com:zalando/patroni into codequality 2016-02-12 12:33:02 +01:00
Alexander Kukushkin df9b8fed2e Improve quality of code by resolving issues found by quantifiedcode and codacy 2016-02-12 12:23:49 +01:00
Feike Steenbergen 0c2efeb7a7 Change default http status code to 500.
Instead of returning 503 (Service Unavailable) we no default to returning 500 (Internal Server Error).
2016-02-11 09:01:44 +01:00
Feike Steenbergen d6c9eb0791 Merge pull request #135 from zalando/feature/setsid
Create new session and set the process group ID for the postmaster
2016-02-10 16:59:59 +01:00
Feike Steenbergen d530133f62 Fixes #133 2016-02-10 16:33:47 +01:00
Alexander Kukushkin 7b524bc557 Create new session and set the process group ID for the postmaster
Otherwice it was receiving signal when you pressed Ctrl+C in the
terminal where patroni is running.
2016-02-10 14:51:20 +01:00
Feike Steenbergen 854ad293c5 Scheduled failover: Add requirements 2016-02-10 14:26:25 +01:00
Feike Steenbergen 1e2fdac891 Scheduled Failover tests
Add tests for the scheduled failover feature, also add more and better tests for patronictl.
2016-02-10 14:19:41 +01:00
Alexander Kukushkin 50512fef45 Merge pull request #132 from zalando/bugfix/superuser_username
Create superuser with the name specified in config file
2016-02-10 14:10:28 +01:00
Feike Steenbergen 37315903fa Implement scheduled failover.
Scheduled failover allows scheduling of a failover in the future. It does this by writing
a failover key in the DCS which contains the scheduled failover time.
The reason to allow a scheduled failover, is that it does not require one to use a
scheduler (e.g. cron) to schedule such a failover. One of the issues with using
a scheduler is that it may need to authenticate itself. With scheduled failover the authentication
takes place during the scheduling, not during the actual failover.

To allow the time of failover to be expressed, the failover key has changed its format; the old format however
can still be used. The new format expects the failover key to be a json-document with relevant
keys set. We need the timestamp specified to be time zone aware and to be expressed unambigiously, e.g. ISO 8601.
2016-02-10 14:04:14 +01:00
Alexander Kukushkin b4af126bc3 Apply superuser name and password when doing checkpoint 2016-02-10 13:50:05 +01:00