Commit Graph
81 Commits
Author SHA1 Message Date
Oleksii Kliukin becce1dcf0 Merge branch 'master' of https://github.com/zalando/governor into s3_backups 2015-05-20 17:09:39 +02:00
Oleksii Kliukin 363b3c7122 Merge pull request #11 from CyberDem0n/master
some simple tests
2015-05-20 16:55:27 +02:00
Oleksii Kliukin 7dd1e295ca re-add the encoding parameter to initdb. 2015-05-20 16:31:26 +02:00
Oleksii Kliukin 1c1a15908c use governor yaml parameters and not environment variables to configure backups with WAL-E. 2015-05-20 11:47:20 +02:00
Oleksii Kliukin 8a36f17d21 retry with pg_basebackup if one cannot get data from WAL-E. 2015-05-20 11:47:20 +02:00
Oleksii Kliukin 3898610ea3 Put back the S3/pg_basebackup condition after testing. 2015-05-20 11:47:20 +02:00
Oleksii Kliukin 4af752d668 revert the S3/pg_basebackup choice to unconditionally prefer S3 for testing purposes. 2015-05-20 11:47:20 +02:00
Oleksii Kliukin 2efa97334b returned the choice between S3 and pg_basebackup based on diff_in_bytes 2015-05-20 11:47:20 +02:00
Oleksii Kliukin e02eec91bf save/restore both postgresql.conf and pg_hba.conf for WAL-e backup. 2015-05-20 11:47:20 +02:00
Oleksii Kliukin 42dfaaab3f write pg_hba.conf for the replica initialized from WAL-E. Temporarily use WAL-e always as a mean to create replica for testing purposes. 2015-05-20 11:47:20 +02:00
Oleksii Kliukin 8a6a7b4cea fix a typo. 2015-05-20 11:47:20 +02:00
Oleksii Kliukin 75b30d8014 save postgresql.conf not only on initdb, but on any start of the server. 2015-05-20 11:47:19 +02:00
Oleksii Kliukin 7a2be131bd save/restore postgresql.conf for WAL-e backups, since WAL-E excludes postgresql.conf from the backup/restore. 2015-05-20 11:47:19 +02:00
Oleksii Kliukin d4b366a7e2 some arithmetics and type conversion fixes. 2015-05-20 11:46:27 +02:00
Oleksii Kliukin 594efe3b64 fix a typo. 2015-05-20 11:46:26 +02:00
Oleksii Kliukin 19a04a81da split arguments for check_output when checking for the latest backup. 2015-05-20 11:46:26 +02:00
Oleksii Kliukin 9e82c3ebd7 add functionality to fetch base backup from wal-e for the new replica creation and code to decide whether to use wal-e or pg_basebackup. 2015-05-20 11:46:26 +02:00
Alexander Kukushkin 0d5bb48ead Close connection when querying other members of cluster 2015-05-19 14:01:30 +02:00
Feike Steenbergen 24c29aee04 Add hostssl entry to pg_hba 2015-05-19 13:03:14 +02:00
Feike Steenbergen f6fc60800a Close connection when querying other members of cluster. 2015-05-18 16:54:36 +02:00
Alexander Kukushkin f7b6c8df40 Merge branch 'master' of github.com:CyberDem0n/governor
Conflicts:
	helpers/postgresql.py
2015-05-18 15:58:38 +02:00
Alexander Kukushkin e9ffcf9efe Small refactoring of initdb call 2015-05-18 15:57:24 +02:00
Alexander Kukushkin df855bb8de Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring 2015-05-18 14:39:39 +02:00
Alexander Kukushkin 422512880f last_leader_operation is the propery of Cluster object and the value is set in get_cluster method 2015-05-18 13:43:14 +02:00
Alexander Kukushkin 9a1f0d1bd1 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	helpers/postgresql.py
2015-05-18 13:38:46 +02:00
Alexander Kukushkin b24fb0488c last_leader_operation is the propery of Cluster object and the value is set in get_cluster method 2015-05-18 13:33:27 +02:00
Alexander Kukushkin d221d1de1c listen_address can have more then one value separated by comma. We will use the first one to connect 2015-05-18 10:53:27 +02:00
Alexander Kukushkin e997911b8d Merge branch 'master' of github.com:CyberDem0n/governor
Conflicts:
	helpers/postgresql.py
2015-05-15 16:21:59 +02:00
Alexander Kukushkin 348100752b Open connection to self via listen address 2015-05-15 16:18:31 +02:00
Feike Steenbergen 0b669e0d20 Cleanup
Removed aws reference from Dockerfile, remove unnecessary steps.
Connect using libpq parameters, therefore providing nice application name for Governor.
2015-05-15 13:52:20 +02:00
Alexander Kukushkin 5ab99c6589 Get rid from all AWS references here.
connect_address give possibility to specify listen address and connect
address separetely, so there is no need to determine your external
address by doing requests to amazon api.
2015-05-15 12:39:05 +02:00
Alexander Kukushkin af9ebfa3b9 Use connect_address instead of listen when building connection_string 2015-05-15 12:20:24 +02:00
Alexander Kukushkin 75ff91d017 rename connection_address to connect_address 2015-05-15 12:13:05 +02:00
Alexander Kukushkin 08865512f8 Differentiate between connection address and listen address
For example you can listen on 0.0.0.0 but provide service on some
didicated ip. This should cover all possible use-cases when you are
running behind firewall, load balancer or inside for example docker.
2015-05-15 12:06:04 +02:00
Alexander Kukushkin 2fd81a5135 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring 2015-05-15 11:39:25 +02:00
Alexander Kukushkin 274bc14bfb Do not check maximum_lag_on_failover if it is not defined in config file 2015-05-15 11:38:50 +02:00
Alexander Kukushkin 8e5beb5883 Small optimization 2015-05-15 11:25:26 +02:00
Alexander Kukushkin 0c040b8ce2 Merge branch 'master' of github.com:compose/governor
Conflicts:
	governor.py
	helpers/etcd.py
	helpers/ha.py
	helpers/postgresql.py
2015-05-13 18:01:01 +02:00
Alexander Kukushkin 3fa0476d8c Merge branch 'master' of github.com:zalando/governor into features/refactoring 2015-05-13 14:58:54 +02:00
Alexander Kukushkin b1f43c1461 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	helpers/postgresql.py
2015-05-13 14:57:57 +02:00
Alexander Kukushkin d25ad17c32 Add support of python3 2015-05-13 14:53:23 +02:00
Christopher Winslett 2c69074652 move stale protection from is_healthy to is_healthiest to allow stale secondaries to rejoin cluster 2015-05-12 18:29:54 -07:00
Christopher Winslett 557bad37cd ensure a stale Postgres does not become leader 2015-05-12 18:11:12 -07:00
Feike Steenbergen ed30684d85 Merge branch 'features/refactoring' of github.com:zalando/governor into feature/status_page
Conflicts:
	helpers/postgresql.py
2015-05-12 14:39:51 +02:00
Feike Steenbergen a56b346295 Hardened the health checks and implemented a real status page.
For the postgresql helper, hardened the code to get "the" cursor of the postgresql instance.
For the statuspage, a small status json is returned.
To find out what status a PostgreSQL cluster is in we use the cursor (instead of the provided query() function), as the query function does some retrying etc. For the healthcheck we want to simple provide an answer to a simple query, if we have to reconnect, we are not *that* healthy anyway.

Dropped catching exceptions in the do_GET block, as the HTTPServer will do that nicely for us anyway.
2015-05-12 11:58:47 +02:00
Alexander Kukushkin 41942ee722 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring 2015-05-12 09:09:49 +02:00
Alexander Kukushkin be7677a1b8 Bugfix, hostname and address are not keys of dict but properties of Member object 2015-05-12 09:08:45 +02:00
Alexander Kukushkin 1370923e84 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring 2015-05-11 16:58:26 +02:00
Alexander Kukushkin eb1721f65f Minimize amount of requests to etcd 2015-05-11 15:15:08 +02:00
Alexander Kukushkin 42d9c08c37 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring 2015-05-11 10:06:29 +02:00