Oleksii Kliukin
688a09396d
Fix list formatting
2016-05-11 09:55:39 +02:00
Oleksii Kliukin
c1140ed7a8
Change the default options to bootstrap
2016-05-11 09:53:18 +02:00
Oleksii Kliukin
9e6ca617de
Add spec for the dynamic configuration.
2016-05-11 09:48:54 +02:00
Alexander Kukushkin
14527c69d1
Merge pull request #194 from zalando/feature/api-request-handler-finish
...
finish method does not have any arguments
2016-05-10 13:10:32 +02:00
Alexander Kukushkin
5f33cf32f4
Merge pull request #193 from zalando/feature/primary_conninfo-application_name
...
Set application_name to node name in primary_conninfo
2016-05-10 13:10:19 +02:00
Alexander Kukushkin
a615339b48
Merge pull request #192 from zalando/feature/api-sysid-no-errors
...
Reset _sysid and don't call pg_controldata when restore of backup in progress
2016-05-10 13:10:07 +02:00
Alexander Kukushkin
1a0aefeb63
Merge pull request #191 from zalando/feature/api-tests-request-encode
...
Encode request body only once in a MockRequest
2016-05-10 13:09:31 +02:00
Alexander Kukushkin
edf372e8b6
Reset _sysid and don't call pg_controldata when restore of backup in progress
...
Otherwise there were some errors in a log from rest-api healthcheck endpoint
2016-05-09 15:36:49 +02:00
Alexander Kukushkin
73119f96aa
Set application_name to node name in primary_conninfo
...
It will make it simplier to identify node the in pg_stat_replication view
2016-05-09 09:47:32 +02:00
Alexander Kukushkin
defc987328
Encode request body only once in a MockRequest
...
to avoid using bytestrings all over the file
2016-05-09 09:33:54 +02:00
Alexander Kukushkin
2adf593fb8
finish method does not have any arguments
2016-05-09 09:31:29 +02:00
Oleksii Kliukin
f801a08974
Bumped version to 0.90
v0.90
2016-04-27 12:04:52 +02:00
Alexander Kukushkin
eabfd82a5d
Implement Consul support
2016-04-27 10:59:01 +02:00
Alexander Kukushkin
ec7779fed6
Merge pull request #188 from zalando/bugfix/python351
...
urllib3.exceptions.HTTPError fixes for python 3.5.1
2016-04-26 11:55:19 +02:00
Alexander Kukushkin
bcbc080350
urllib3.exceptions.HTTPError fixes for python 3.5.1
...
Somehow when you import only urllib3 it's not possible work with
urllib3.exceptions.HTTPError exception (it looks like it is imported
from some other place. from urllib3.exceptions import HTTPError solves
the problem.
2016-04-24 14:18:34 +02:00
Feike Steenbergen
9a79ba25ef
Fix tests
...
Remove unnecessary patching of functions.
Update mocked response to be inline with introduced config change.
2016-04-22 16:28:00 +02:00
Alexander Kukushkin
0c6d259a0a
Merge pull request #187 from zalando/feature/zookeeper-rename-variable
...
Rename me->member (variable name was too confusing)
2016-04-22 16:10:32 +02:00
Feike Steenbergen
dcdaabc747
Merge pull request #184 from zalando/feature/unify_patronictl_config_with_patroni
...
Unify Patroni and Patronictl configuration
2016-04-22 16:08:36 +02:00
Feike Steenbergen
c7ebe4aa63
Unify Patroni and Patronictl configuration
...
A Patroni configuration should be enough for Patronictl
The previous dcs_api url style is still supported.
To remove duplicate magic variables a DCS_DEFAULTS was introduced.
Some behaviour has changed: If you do not specify a DCS at all
(not in configuration, not on commandline, not in environment), it will
not default to etcd://localhost:4001
More test coverage for patronictl
2016-04-22 16:04:41 +02:00
Feike Steenbergen and Feike Steenbergen
b727626f19
Update README.rst
2016-04-22 16:02:52 +02:00
Feike Steenbergen
5ca43c1a3d
Remove pg_hba injection and filtering
...
Previously we explicitly injected a replication record into pg_hba.conf.
This doesn't allow users to explicitly write their configurations.
This change will just write the lines specified by the user.
2016-04-22 16:02:52 +02:00
Alexander Kukushkin
a18c878a56
Rename me->member (variable name was too confusing)
2016-04-22 15:28:41 +02:00
Alexander Kukushkin
e275a34f6a
Merge pull request #183 from zalando/feature/api-refactoring
...
Refactor api.py
2016-04-22 13:47:14 +02:00
Alexander Kukushkin
84fcc7712b
Refactor api.py
...
All responses to the client sent by single method `_write_response`
encode('utf-8') is done only inside this method. It make easier to
support existing code because eliminates need to put b'' everywhere
2016-04-22 10:38:23 +02:00
Alexander Kukushkin
3e32c226c0
Merge pull request #185 from zalando/feature/noloadbalance
...
Implement noloadbalance support
2016-04-22 10:31:20 +02:00
Alexander Kukushkin
499061918d
Implement noloadbalance support
...
Mostly this tag is necessary to give a hint to load balancer
auto-configuration tool that node should not be included into
LB configuration.
In addition to that Patroni also should not return status_code=200
for a health check if the tag is present and value is not `False`.
2016-04-22 09:46:34 +02:00
Feike Steenbergen
8d129c0209
Bugfix: Network is now a null and void option for replication
2016-04-21 15:55:35 +02:00
Feike Steenbergen
ae700062b6
Merge pull request #180 from zalando/bugfix/environment_leakage
...
Clear environment of PostgreSQL
2016-04-21 15:23:54 +02:00
Feike Steenbergen
07edbd2c42
Merge pull request #182 from zalando/bugfix/patroni_on_dc_fixes
...
Make sure present but empty optional sections don't cause errors.
2016-04-21 15:23:31 +02:00
Feike Steenbergen
a5990de800
Merge pull request #181 from zalando/bugfix/acceptance-tests-connection-string
...
Do not assume that connection user is postgres, but take it from config.yml
2016-04-21 14:54:12 +02:00
Alexander Kukushkin
fd4f12aac8
Do not assume that connection user is postgres, but take it from config.yml
2016-04-21 13:56:09 +02:00
Feike Steenbergen
fbf44d3219
Merge pull request #177 from zalando/feature/remove_pghba_magic
...
Remove pg_hba injection and filtering
2016-04-21 10:24:52 +02:00
Feike Steenbergen
f98f56af41
Clear environment of PostgreSQL
...
Environment variables available to the postmaster can be examined
by non-superusers (e.g. plperl is trusted, yet you can show the environment).
In some environments secrets may be written in environment variables.
Commit 9744019341 introduced the ability to
specify the full Patroni configuration as an environment variable,
PATRONI_CONFIGURATION.
PATRONI_CONFIGURATION will by definition contain secrets, the passwords for superuser,
replcation user etc.
We therefore only retain a small subset of the environment for pg_ctl start, to ensure
no leakage of these values are possible.
2016-04-21 10:16:48 +02:00
Alexander Kukushkin
578bd606cc
Merge pull request #179 from zalando/bugfix/recovery-conf
...
Append values from postgresql.recovery_conf to recovery.conf
2016-04-20 16:45:56 +02:00
Feike Steenbergen
a203690f07
Update README.rst
2016-04-20 16:44:02 +02:00
Alexander Kukushkin
122895e1d6
Append values from postgresql.recovery_conf to recovery.conf
...
Previously these values were appended only when the leader was known and
it was preventing replica from restoring xlogs with `restore_command`.
2016-04-20 15:56:33 +02:00
Alexander Kukushkin
2ba1b5e206
Merge pull request #171 from zalando/feature/pg_rewind_unconditionally
...
Remove restrictions on running pg_rewind.
2016-04-20 11:22:39 +02:00
Feike Steenbergen
28d5de17e1
Remove pg_hba injection and filtering
...
Previously we explicitly injected a replication record into pg_hba.conf.
This doesn't allow users to explicitly write their configurations.
This change will just write the lines specified by the user.
2016-04-20 11:06:36 +02:00
Alexander Kukushkin
56f9366aa5
Merge pull request #176 from zalando/feature/get_dcs
...
Refactor patroni/ctl.py
2016-04-20 10:29:05 +02:00
Feike Steenbergen
d55893aa6d
Merge pull request #175 from zalando/feature/cluster_id
...
Include database system identifier in cluster info
2016-04-20 08:58:39 +02:00
Alexander Kukushkin
e4005ac76c
Join multiline string with \n
2016-04-19 10:30:04 +02:00
Alexander Kukushkin
fee07efabb
Fix python3 bugs
2016-04-18 18:09:36 +02:00
Alexander Kukushkin
cd6537c4d3
Refactor patroni/ctl.py
...
Until now get_dcs method was doing absolutely the same job as method
from Patroni class.
In addition to that I did small refactoring and clean up of unit tests
2016-04-18 17:36:30 +02:00
Feike Steenbergen
f317b9b9a6
Include database system identifier in cluster info
2016-04-18 10:44:35 +02:00
Oleksii Kliukin
a07b015679
Move the recovery.conf based role check to a function.
2016-04-15 17:32:29 +02:00
Oleksii Kliukin
c15c13876a
HA tests assume the default role as replica.
2016-04-15 10:08:31 +02:00
Alexander Kukushkin
bd27669bec
Merge pull request #173 from zalando/feature/travis-build-matrix
...
Disable sudo, reshuffle travis tasks and introduce caching
2016-04-15 09:35:04 +02:00
Oleksii Kliukin
0de3a6ece4
Try to guess the postgres role before it is started by examinging the recovery.conf.
2016-04-15 09:34:34 +02:00
Alexander Kukushkin
6dc4aacf05
Add some comments to .travis.yml
2016-04-14 13:06:42 +02:00
Alexander Kukushkin
7006a4ee14
Sometimes replica can't attach to the master after pg_rewind
...
The reason for that is: it takes up to 10 seconds to create replication
slot + up to 5 seconds to start straming and recover.
2016-04-13 14:28:00 +02:00