Commit Graph
734 Commits
Author SHA1 Message Date
Oleksii Kliukin 53b5dfe39e Remove an unused function. 2016-02-24 19:24:46 +01:00
Oleksii Kliukin c9b8c2d3a9 Bugfixes, add a function to kill patroni daemon, make the feature description more concise. 2016-02-24 19:22:42 +01:00
Oleksii Kliukin 6f03953268 Merge basic failover and basic replication scenarios in one feature. 2016-02-24 17:12:45 +01:00
Oleksii Kliukin 6ec3523748 Collect test output, add basic failover test. 2016-02-24 16:30:52 +01:00
Oleksii Kliukin f781d0b9fe Address the code review by Alex Shulgin. 2016-02-16 16:50:50 +01:00
Oleksii Kliukin 38bd037d99 Add the 1st lettuce test for the basic replication.
Basically check that the table inserted on the primary
will get its way to the secondary.
2016-02-05 13:30:42 +01:00
Feike Steenbergen 989443b4e3 Merge pull request #123 from zalando/feature/api-context
Provide more context for healthchecks and monitoring.
2016-02-01 12:33:08 +01:00
Feike Steenbergen bce96df177 Add attributes to Mocked classes 2016-01-29 13:29:51 +01:00
Feike Steenbergen 704b29e686 Provide more context for healthchecks and monitoring.
Include version numbers of both PostgreSQL and patroni for the /patroni endpoint.
Scope is also returned.
2016-01-29 12:55:08 +01:00
Oleksii Kliukin abaef49670 Disable auth in order to use patronictl with the default configuration, remove obsolete replication_methods like. 2016-01-29 09:05:52 +01:00
Oleksii Kliukin 70bae1b267 Note multiple PostgreSQL listen addresses. 2016-01-08 16:51:24 +01:00
Alexander Kukushkin b77908ce58 Execute tests against python 3.5 2015-12-24 09:59:01 +01:00
Alexander Kukushkin 1b032ab618 stick to the python-etcd=0.4.2 until issues=152 is not fixed 2015-12-24 09:56:24 +01:00
Alexander Kukushkin 41bf010cc1 stick to the python-etcd=0.4.2 until issues=152 is not fixed 2015-12-24 09:54:13 +01:00
Alexander Kukushkin 91a10bf122 Execute tests against python 3.5 2015-12-24 09:51:42 +01:00
Alexander Kukushkin 42a5cf70e6 mock socket.getaddrinfo for patroni-ctl unit tests 2015-12-24 09:49:58 +01:00
Oleksii Kliukin 146d9a688e Merge pull request #111 from zalando/bugfix/initdb_without_options
Fix for the crash due to a missing initidb section in the configurati…
2015-12-11 10:54:27 +01:00
Oleksii Kliukin b2cd6d9113 Fix for the crash due to a missing initidb section in the configuration file 2015-12-11 10:36:39 +01:00
Oleksii Kliukin 39beb9cbb3 Bump up minor version. v0.76 2015-12-10 09:51:28 +01:00
Oleksii Kliukin 17250a20aa Merge pull request #108 from zalando/pg_rewind_manual_failover
Call a checkpoint on master before pg_rewind.
2015-12-09 14:13:43 +01:00
Oleksii Kliukin d0c84c87ba Fix the formatting, add the missing changes to configuration files. 2015-12-09 13:56:37 +01:00
Oleksii Kliukin c5285bc293 Call a checkpoint on master before pg_rewind.
PostgreSQL does not run a checkpoint during promition.
Since pg_rewind relies on the last checkpoint to get the timeline,
there is a short race condition right after the promotion, when
it can get the timeline wrong and fail. We work around this by
calling the checkpoint manually.

Make sure our test configuration does both archive and recovery.
2015-12-09 13:17:36 +01:00
Feike Steenbergen 735fe0b345 Bumped version to 0.75 v0.75 2015-11-25 16:27:02 +01:00
Feike Steenbergen c28e6a7067 Merge pull request #105 from zalando/patroni/add_wal_restore_to_pip
Enable installing scripts via pip and use patroni_ prefix for them.
2015-11-25 16:25:03 +01:00
Feike Steenbergen 781b1854eb Merge pull request #104 from zalando/feature/patroni_cli_or_ctl_tbd
Bugfixes for Patronictl and the Development Docker environment
2015-11-25 16:23:25 +01:00
Oleksii Kliukin 2e9ac89591 Install patroni scripts alongside patroni, fix Oleksii's name. 2015-11-25 16:09:47 +01:00
Oleksii Kliukin 78f0b7e681 Add main() function inside the scripts/
We need this in order to install those scripts via pip.
2015-11-25 16:07:13 +01:00
Feike Steenbergen 65674dcd38 Bump timeout for patronictl posting to Patroni api. 2015-11-25 15:40:06 +01:00
Feike Steenbergen 1606ab6f5a Bugfixes for Patronictl and the Development Docker environment
For easier development using Docker the $HOSTNAME variable will be used to
name the running Patroni. Bumped some _segments postgresql settings to ensure
WAL files are not removed very quickly.

Increased the timeout for the post request for Patroni, as some operations
(failover) may take considerable time to complete.

The failover to a specific member was broken in patronictl as it used a wrong
key to specify the member to failover to.

Pretty printing fix for xlog lag, to prevent false negatives to show up and have
good alignment.
2015-11-25 15:07:55 +01:00
Oleksii Kliukin daf9075b2f Merge branch 'master' of https://github.com/zalando/patroni 2015-11-25 15:05:11 +01:00
Oleksii KliukinandOleksii Kliukin 28f1d51cb6 Merge pull request #103 from zalando/pgexperts-restore/movebasebackup
Replica creation methods are configured via the 'create_replica_method'
parameter in the patroni configuration file. The value should contain a list
of acceptable replica creation method names. Patroni attempts to call them one
by one, until it finds one that returns 0. If there is a configuration section
with the same name as the replica creation method, the values in this section
are converted to the command-line options and appended to the command name.
The command name is constructued either from the 'command' key in the method
name configuration section, or by taking the replica creation method name
verbatim.

The wal_e replica creation method is included with Patroni (wale_restore.py
script), in addition to the 'basebackup', which is a special method: it's taken
by default, if no create_replica_method parameter is specified, or if it is
empty. This merge also reverses the decision to move the basebackup repli
method ouside of the core patroni.

Original pull request by Josh Berkus (@jberkus), with fixes and improvements
from Alexander Kukushkin (CyberDem0n) and Oleksii Kliukin (alexeyklyukin).

Per discussion at https://github.com/zalando/patroni/issues/57
2015-11-25 15:04:23 +01:00
Oleksii Kliukin ce1ff95f4c Merge pull request #103 from zalando/pgexperts-restore/movebasebackup
Replica creation methods are configured via the 'create_replica_method'
parameter in the patroni configuration file. The value should contain a list
of acceptable replica creation method names. Patroni attempts to call them one
by one, until it finds one that returns 0. If there is a configuration section
with the same name as the replica creation method, the values in this section
are converted to the command-line options and appended to the command name.
The command name is constructued either from the 'command' key in the method
name configuration section, or by taking the replica creation method name
verbatim.

The wal_e replica creation method is included with Patroni (wale_restore.py
script), in addition to the 'basebackup', which is a special method: it's taken
by default, if no create_replica_method parameter is specified, or if it is
empty. This merge also reverses the decision to move the basebackup repli
method ouside of the core patroni.

Original pull request by Josh Berkus, with fixes and inprovements
from Alexander Kukushkin and Oleksii Kliukin.

Per discussion at https://github.com/zalando/patroni/issues/57
2015-11-25 15:00:56 +01:00
Oleksii Kliukin d4ab4d1aef Output the method used to initialize the replica. 2015-11-25 14:48:59 +01:00
Oleksii Kliukin 14b8dfa3e8 Make create_replica_method a YAML array.
Make sure the absense of this key or empty value in it is handled
correctly. Update tests and sample configuration files.
2015-11-25 10:29:17 +01:00
Oleksii Kliukin be9e525739 Remove an unused line. 2015-11-24 17:23:38 +01:00
Oleksii Kliukin d8a8fe9a80 Convert build_connstring into a one-liner, per code review by Alex. 2015-11-24 16:40:18 +01:00
Oleksii Kliukin 4b1ff5a4bb Code refactoring, per code review by Alex. 2015-11-24 16:37:40 +01:00
Oleksii Kliukin 6d296b1b34 Make sure params passed to the replica creation method are always defined. Per code review by Alex. 2015-11-24 16:26:08 +01:00
Oleksii Kliukin 1838b633e5 Merge branch 'pgexperts-restore/movebasebackup' of https://github.com/zalando/patroni into pgexperts-restore/movebasebackup 2015-11-24 16:16:05 +01:00
Oleksii Kliukin aee7d32af6 Small code improvement, per comment by Alex. 2015-11-24 16:14:39 +01:00
Feike Steenbergen 875c82e833 Documentation bugfix 2015-11-24 16:02:46 +01:00
Oleksii Kliukin fcbb820949 Remove some cruft from the tests. 2015-11-24 15:43:56 +01:00
Oleksii Kliukin f3d9edb57f also add -p 1 to the restore commands provided with sample yaml files. 2015-11-24 15:32:44 +01:00
Oleksii Kliukin daf2a2686b Merge branch 'pgexperts-restore/movebasebackup' of https://github.com/zalando/patroni into pgexperts-restore/movebasebackup 2015-11-24 15:22:44 +01:00
Oleksii Kliukin 35efd36c5c Improve unittests and make minor bugfixes.
In particular, remove restore.py in favor of
wale_restore.py, fix minor bugs in the latter
and add unit tests.
2015-11-24 15:21:47 +01:00
Oleksii Kliukin 6c769554a3 Add -p 1 to an example restore_command in order to limit WAL-E to only a single thread
With out tests, the multi-threaded WAL fetch didn't work reliably with S3, resulting in stuck WAL-E processes.
2015-11-23 17:42:08 +01:00
Oleksii Kliukin e625c33bef Merge branch 'master' into pgexperts-restore/movebasebackup 2015-11-23 15:42:26 +01:00
Oleksii Kliukin ec1d1c827b Merge pull request #102 from zalando/bugfix/silenceapithread
Avoid excessive log output in the API thread.
2015-11-23 15:41:50 +01:00
Oleksii Kliukin 58d1a8a869 Add missing whitespaces 2015-11-23 15:38:50 +01:00
Oleksii Kliukin 5370b46c65 Make sure WAL-E restore script returns 1 if criterias to use WAL-E were not met. 2015-11-23 15:27:15 +01:00