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
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
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
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
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
Oleksii Kliukin
a1a7c9b4c5
Make sure nofailover tag is set to False by default.
2015-10-27 09:46:03 +01:00
Oleksii Kliukin
8d68130aac
Fix the test to account for an extra parameter returned by fetch_node_statuses.
2015-10-27 09:32:09 +01:00
Feike Steenbergen
7784f7db3d
Bumped version to 0.6
2015-10-27 09:20:24 +01:00
Oleksii Kliukin
da74aee2cd
Make sure that nofailover presents the node even from initializing the cluster.
2015-10-26 18:57:28 +01:00
Oleksii Kliukin
685363c5a8
Fix an invocation fo fetch_node_statuses in the API code to account for the tags
2015-10-26 18:57:05 +01:00
Oleksii Kliukin
1f9d8c039c
Add tests for nofailover.
2015-10-26 17:19:35 +01:00
Oleksii Kliukin
ed5e3e53e2
Use a shortcut to call patroni nofailover attribute.
2015-10-26 17:18:45 +01:00
Oleksii Kliukin
2044d4db96
Move nofailover checks on the upper level.
...
Instead of checking that nofailover node should not
be marked as healthiest in one of the _failover
functions, do make it unhealthy in the is_healthiest_node.
2015-10-26 14:52:34 +01:00
Alexander Kukushkin
2d709a48e6
fix test_create_replica unit test
2015-10-26 11:30:04 +01:00
Alexander Kukushkin
ab64ae7fe7
execute delete_trigger_file() after successfull call of create_replica()
2015-10-26 11:29:32 +01:00
Oleksii Kliukin
84db64e0d5
Merge branch 'master' of https://github.com/zalando/patroni into feature/nofailover
2015-10-26 10:41:51 +01:00
Oleksii Kliukin
a2736cd2b7
Add nofailover property to Patroni and Cluster.
...
Add checks for nofailover tag in is_failover_possible
in order to save on API calls for the nodes with this tag set.
2015-10-26 10:40:34 +01:00
Alexander Kukushkin
acd21eae4c
Fix obvious bugs and pep8 formatting
2015-10-25 18:11:45 +01:00
Alexander Kukushkin
364d9b5a8a
Revert "Small changes added for testing, and failed merge from master."
...
This reverts commit fc68acd0ab .
2015-10-24 13:13:23 +02:00
Josh Berkus
8a8b1c4b2b
Merge branch 'master' into restore/movebasebackup
2015-10-23 09:39:08 -07:00
Josh Berkus
fc68acd0ab
Small changes added for testing, and failed merge from master.
2015-10-23 09:37:17 -07:00
Alexander Kukushkin
2e5efc6cc9
Merge pull request #75 from zalando/feature/custom-namespace
...
Make it possible to override default namespace (/service/) from a config file
2015-10-23 16:21:19 +02:00
Alexander Kukushkin
553129a981
Revert "Fix unit-test for Postgresql.controldata()"
...
This reverts commit deaaf8ad1a .
2015-10-23 15:59:20 +02:00
Alexander Kukushkin
ad719297c2
Merge branch 'master' of github.com:zalando/patroni into feature/custom-namespace
2015-10-23 15:58:42 +02:00
Oleksii Kliukin
5f9276f5dc
Merge pull request #77 from zalando/bugfix/remove_initialize_key
...
Fix removal of keys on failed initialization. Fixes the recent problem reported at #17
2015-10-23 15:42:48 +02:00
Oleksii Kliukin
0c5a21e57d
Fix removal of keys on failed initialization.
...
The initialize key was checked against the value
of the node name before removal, but it was changed
recently to contain either an empty string, or cluster
sysid. To fix this, the check for the previous value
was simply removed: we can guarantee that the code path
that removes the key is the one that created it.
2015-10-23 10:46:55 +02:00
Oleksii Kliukin
b7b47ffd79
Add support for the nofailover tag.
2015-10-23 10:11:38 +02:00
Alexander Kukushkin
8e41d14283
Merge branch 'master' of github.com:zalando/patroni into feature/custom-namespace
2015-10-23 09:13:52 +02:00
Josh Berkus
98ea3fa74e
Merge branch 'master' of github.com:zalando/patroni into restore/movebasebackup
...
Conflicts:
patroni/postgresql.py
2015-10-22 18:06:41 -07:00
Josh Berkus
fa7d36da9b
Merged basebackup into postgresql.py; changed things to provide alternative, configurable basebackup methods.
2015-10-22 17:21:39 -07:00