Comments (7)
I'm thinking we should add rows for pg_hba.conf
to the postgresX.yml
files. As part of the initialization process, Governor should create the proper pg_hba.conf
records. That would allow people to customize the cluster based on their needs.
postgres:
pg_hba:
- type: local
database: all
user: all
method: trust
- type: host
database: all
user: all
address: 127.0.0.1/32
method: trust
- type: host
database: all
user: all
address: "::1/128"
method: trust
- type: hostssl
database: all
user: all
address: 0.0.0.0/0
type: md5
The replication user should automatically be added when creating the pg_hba.conf
.
from governor.
@Winslett yes that would be a nice start.
from governor.
I think we need to (re)write the postgresql.conf as well for this to work:
Note: Remote TCP/IP connections will not be possible unless the server is started with an appropriate value for the
listen_addresses
configuration parameter, since the default behavior is to listen for TCP/IP connections only on the local loopback address localhost.
from governor.
Thank for interesting HA solution!
I tried to implement Postgres HA solution with governor not on localhost and that is not implement, there are many errors, fault's and etc (
I think bug need to prioritize.
from governor.
It is not really a bug. I have it working now on non-localhost ip addresses. I had to change the helpers/postgresql.py
file so it will write the correct listen_addresses
to postgresql.conf and had to move the write_pg_hba() en the extra write_postgresql_conf() function before the pg_ctl start
function together with the changes in the first post to get postgres to start correctly.
def initialize(self):
if os.system("initdb -D %s" % self.data_dir) == 0:
# start Postgres without options to setup replication user indepedent of other system settings
self.write_postgresql_conf()
self.write_pg_hba()
os.system("pg_ctl start -w -D %s" % self.data_dir)
the postgresql_conf function itself:
def write_postgresql_conf(self):
f = open("%s/postgresql.conf" % self.data_dir, "a")
f.write("listen_addresses = '%s'" % self.host )
f.close()
from governor.
@tvb, do you have the non-localhost code available somewhere, like a fork or a branch? I'd love to take a look at it ;-)
from governor.
@wkielas sorry. I do not :(
from governor.
Related Issues (20)
- database system identifier differs between the primary and standby? HOT 2
- etcd returns 500 internal server error on ubuntu which causes postgres to crash. HOT 1
- 404 error causing the postgres to go down
- Use python-etcd client library HOT 1
- Fatal: requested timeline 8 is not a child of this server's history HOT 3
- Fencing and Quorum Support HOT 3
- Local Docker cluster with Governor on board HOT 1
- Make governor a module
- PostgreSQL + haproxy with multiple IP HOT 3
- not catching ssl timeout exception HOT 1
- rewind ex-leader before joining again HOT 2
- [Errno 32] Broken pipe HOT 1
- non atomic has_lock() and update_lock()
- cannot easily "go build" golang-custom-raft; maybe we should have a new project? HOT 1
- golang-custom-raft: add abilty to execute post-election script HOT 14
- New GB build tool based off of golang-custom-raft branch with a new name - hapg HOT 2
- golang-custom-raft: If a PG process is unhealthy - it can kill governor
- golang-custom-raft: maximum_lag_on_failover doesn't work as it should
- help:the connect info in the recover.conf are "None"
- replication slots failing when names contain dashes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from governor.