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
Oleksii Kliukin
e3961ee70b
Simplify the condition when handling postgresql status request failures.
2015-11-23 12:59:01 +01:00
Oleksii Kliukin
e6b6086e31
Avoid excessive log output in the API thread.
...
Set log level for BaseHTTPRequestHandler request logging to debug.
Avoid complains about PostgreSQL being unreachable if we know it
is not running.
2015-11-23 12:44:38 +01:00
Oleksii Kliukin
4814e82055
Fix a typo and an error in calling subprocess.call.
2015-11-20 17:55:51 +01:00
Oleksii Kliukin
d59ccd1d8e
Fix a couple of logical issues.
...
- command is deleted from method_config without checking whether
it was there in the first place.
- write_recovery_conf is called before the recovery file is restored
from the backup location.
2015-11-20 14:22:25 +01:00
Oleksii Kliukin
7bc5ed7e4d
Small fixes and an executable bit for wale script.
2015-11-18 18:03:38 +01:00
Feike Steenbergen
2a37e2c5d7
Bumped version to 0.7
v0.7
2015-11-18 16:45:05 +01:00
Oleksii Kliukin
c003af294a
Merge pull request #82 from zalando/feature/patroni_cli_or_ctl_tbd
...
Feature/patroni cli or ctl tbd
2015-11-18 16:17:02 +01:00
Oleksii Kliukin
0e7adb38fa
Merge pull request #100 from zalando/bugfix/etcd_exceptions
...
Handle unexpected exceptions in etcd.
2015-11-18 15:08:59 +01:00
Feike Steenbergen
897024a297
PatroniCtl: Bugfixes for formatting and timeouts
2015-11-18 15:01:35 +01:00
Feike Steenbergen
f081f9d67e
Bugfix for Patronictl tests
2015-11-18 12:55:11 +01:00
Feike Steenbergen
cae025c3fb
Testing patronictl: Mock configuration and bugfix
2015-11-18 12:50:36 +01:00
Feike Steenbergen
4bb1e060c0
Bugfix for patronictl tests
2015-11-18 12:00:51 +01:00
Feike Steenbergen
ca4d9eaaf9
Patronictl: Expand tests to increase coverage
2015-11-18 11:51:24 +01:00
Oleksii Kliukin
fef7d45208
Handle unexpected exceptions in etcd.
...
Previously, patroni would die after receiving an exception
other than RetryFailedError, etcd.EtcdException from etcd.
We have observed an AttributeError raised by etcd on some
occasions. With this change, we demote ourselves, but not
terminate on such exceptions.
2015-11-17 16:08:58 +01:00
Feike Steenbergen
2d9f5d9e4b
Refactoring and adding a dsn option to patronictl.
...
Some refactoring to reuse some codepaths.
A dsn option is now added, it is useful in scripts like so:
psql -d "$(patronictl dsn alpha)"
Restarting has been extended to allow restarting based on role.
2015-11-17 15:42:43 +01:00
Feike Steenbergen
e920416114
Patronictl: Extend test cases and create own Exception class.
2015-11-16 12:36:15 +01:00
Oleksii Kliukin
87a5646ad0
Merge branch 'restore/movebasebackup' of https://github.com/pgexperts/patroni into pgexperts-restore/movebasebackup
2015-11-16 12:04:32 +01:00
Alexander Kukushkin
57f19fb149
Merge pull request #80 from zalando/feature/nofailover
...
Feature/nofailover
2015-11-16 10:21:56 +01:00
Alexander Kukushkin
96dcb54429
Merge pull request #96 from zalando/bugfix/haproxy_errors
...
Handle haproxy requests. Improve failover status code.
2015-11-16 10:19:19 +01:00
Alexander Kukushkin
490a54f922
Merge pull request #94 from zalando/feature/initdb
...
Make it possible to specify custom options for initdb
2015-11-16 10:17:28 +01:00
Alexander Kukushkin
7d59a757fb
Merge pull request #93 from zalando/bugfix/parameters
...
Do not fail when there is no postgresql/parameters section in a config file
2015-11-16 10:13:52 +01:00
Alexander Kukushkin
5290792dff
Merge pull request #92 from zalando/feature/api
...
Call touch_member right after demote and promote.
2015-11-16 10:13:24 +01:00
Feike Steenbergen
990276c214
Install patronictl as a script
2015-11-13 13:02:40 +01:00
Feike Steenbergen
dcb5113f9d
Refactoring from patronicli to patronictl
2015-11-13 12:55:38 +01:00
Oleksii Kliukin
70cbbb4ef4
Ignore only socket.error at finalization stage of StreamRequestHandler, not other errors.
2015-11-12 17:55:02 +01:00
Oleksii Kliukin
28934350ef
Handle haproxy requests. Improve failover status code.
...
By default, haproxy sens an OPTION request, which we didn't
handle until now. In addition, all haproxy requests that doesn't
examine the request body close the connection as soon as the status
code is obtained. Such behavior breaks BaseHTTPRequestHandler,
namely handle_one_request, which doesn't check for connection reset
by peer and throw this error on a higher level, but since we don't
call this function directly, there is no place in the code to catch
it, therefore, we have to patch this function in the base class.
In addition, patch the StreamRequestHandler finish() function in
order to handle the connection reset error.
Re-read the cluster from DCS right after the failover to supply
the correct new values to the API thread. Fix a typo.
2015-11-12 17:38:22 +01:00
Alexander Kukushkin
092bf8defa
Merge branch 'master' of github.com:zalando/patroni into feature/initdb
2015-11-12 12:22:14 +01:00
Alexander Kukushkin
13cb8e7402
set synchronous_commit to local when creating roles
2015-11-12 12:20:05 +01:00
Oleksii Kliukin
9f0ee544cf
Merge pull request #95 from LappleApple/patch-1
...
Documentation improvements by @LappleApple
2015-11-12 12:18:13 +01:00
Alexander Kukushkin
d39d297d92
blacklist some options for initdb instead of having big whitelist
2015-11-12 12:07:36 +01:00
LappleApple
eb83d556e8
Update README.rst
2015-11-12 11:43:49 +01:00
Alexander Kukushkin
f0a6c86caa
Make it possible to specify custom options for initdb
...
In the initial implementation we were using the only option
--encoding=UTF8. In order to have pg_rewind working with postgresql-9.3
we have to enable data-checksums. The naive approach was to enable it
globaly but taking into account some performance degradation it's better
not to do it but make it possible to configure it.
In addition to that fix all problems with setting up password of default
postgres user: execute CREATE ROLE | ALTER ROLE depending on content of
pg_authid
2015-11-11 15:59:34 +01:00
Alexander Kukushkin
9c16830fc0
Do not fail when there is no postgresql/parameters section in a config file
2015-11-11 10:46:37 +01:00
Oleksii Kliukin
194aa92fd2
Merge pull request #89 from zalando/bugfix/cleanup
...
Remove the useless code line and fix a typo in the error message. Per suggestion by @antban
2015-11-10 18:18:46 +01:00
Oleksii Kliukin
a8312dfefc
Fixed a typo in the error message.
2015-11-10 18:14:18 +01:00
Feike Steenbergen
92b23a2018
Merge branch 'feature/api' of github.com:zalando/patroni into feature/patroni_cli_or_ctl_tbd
2015-11-09 16:33:17 +01:00
Alexander Kukushkin
8a70cc4d7b
Call touch_member right after demote and promote.
...
This is necessary to propagate actual information about node into DCS.
2015-11-09 16:22:51 +01:00
Feike Steenbergen
da23dd12f3
Do not wait for leader key to change after failover.
...
Previously, the leader key was watched for changes after a failover. This resulted in a delay
of up to 10 seconds to report a healthy failover back to the client.
With this patch, we are not relying on the role of a member registered in the dcs anymore.
2015-11-06 15:02:13 +01:00
Oleksii Kliukin
e52a34de1c
Remove the useless codeline.
2015-11-03 16:04:01 +03:00
Josh Berkus
30aa83c5b2
Fixed failing tests, pep8 issues.
2015-11-02 17:51:01 -08:00
Oleksii Kliukin
87ead9ddaf
Fix haproxy configuration to work by default with Patroni.
2015-11-01 15:29:45 +03:00
Josh Berkus
e7a0ce57aa
Fixes, changes per discussion on pull request. Fixed logic path errors in postgresql.py. Cleaned up and shortened wale_restore.py. Reverted bad merge for YML files.
2015-10-28 14:55:42 -07:00
Josh Berkus
06cd94b12d
Commit addressing several issues around this branch. Major changes to wal_e_restore script. Updated postgres0.yml to show example options.
2015-10-27 17:35:44 -07:00
Feike Steenbergen
3938359828
Command Line: Add reinit and restart commands.
2015-10-27 12:13:26 +01:00
Oleksii Kliukin
a1a7c9b4c5
Make sure nofailover tag is set to False by default.
2015-10-27 09:46:03 +01:00