Comments (6)
@tvb, Good catch! This will probably be a catalyst for a test suite, which I've been pondering on.
from governor.
Actually, I reverted that change because it wasn't a typo, it was just confusing code.
The call to last_operation
at https://github.com/compose/governor/blob/master/helpers/etcd.py#L85 is calling the last_operation
method on the state_handler(), which retrieves an xlog location from Postgres.
The last_leader_operation
method at https://github.com/compose/governor/blob/master/helpers/etcd.py#L90 is a call to etcd, which retrieves the last recorded xlog location stored in etcd.
The method names should be refactored to avoid confusion.
from governor.
Hmmm then I have another issue:
Traceback (most recent call last):
File "./governor.py", line 61, in <module>
logging.info(ha.run_cycle())
File "/var/lib/postgresql/governor/helpers/ha.py", line 70, in run_cycle
self.update_lock()
File "/var/lib/postgresql/governor/helpers/ha.py", line 25, in update_lock
return self.etcd.update_leader(self.state_handler)
File "/var/lib/postgresql/governor/helpers/etcd.py", line 85, in update_leader
self.put_client_path("/optime/leader", {"value": state_handler.last_operation()})
AttributeError: Postgresql instance has no attribute 'last_operation'
LOG: received fast shutdown request
waiting for server to shut down....LOG: aborting any active transactions
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
done
server stopped
Changed that line and now I get:
Traceback (most recent call last):
File "./governor.py", line 57, in <module>
postgresql.follow_no_leader()
AttributeError: Postgresql instance has no attribute 'follow_no_leader'
pg_ctl: PID file "data/postgres/postmaster.pid" does not exist
Is server running?
from governor.
Create a new master branch, and see if the problem persists.
git fetch origin && git checkout origin/master -b new_master
I force pushed to erase the change. I'll quit doing that.
from governor.
I have not pulled the latest changes you made today.
from governor.
That method has existed since 3 days ago: https://github.com/compose/governor/blob/master/helpers/postgresql.py#L210
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.