2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 19:40:12 +00:00
Commit Graph

1514 Commits

Author SHA1 Message Date
Jarrod Johnson
ce1a58bf58 Provide a more specific error when file doesn't exist
nodemedia does check locally, but server should also check it, in
case of remote *and* service nodes.
2018-07-11 13:17:37 -04:00
Jarrod Johnson
8e9bcbb44f Clear txcount on enroll
The transaction count on 'join' was being honored as high, when
it never should be.
2018-07-11 09:40:22 -04:00
Jarrod Johnson
704aaeecf9 Tolerate newline in myname
vim is quite insistent on adding a newline, tolerate that.
2018-07-11 09:36:51 -04:00
Jarrod Johnson
11968faffc Numerous fixes to collective
If client has higher transaction count, do not close the connection
before extracting peer address.

If our connect session is rudely terminated, abort rather than trying
to continue.

On assimilate failure, ignore a failed assimilate with no data.

Fix problem where a follower getting double deleted was causing an error.
2018-07-10 14:55:57 -04:00
Jarrod Johnson
8769c438c0 Relax cryptodomex requirement
We don't *need* the higher version, it just accelerates password auth
if possible.  Fix conflict with RH provided package.
2018-07-10 10:10:04 -04:00
Jarrod Johnson
f1489bf527 Add all to SYNOPSIS of nodeattrib 2018-07-09 16:52:07 -04:00
Jarrod Johnson
c03781c022 Add 'all' to usage message of nodeattrib 2018-07-09 16:49:45 -04:00
Jarrod Johnson
298e11f60f Allow invite from non-leader role
A non-leader transaction is modified such that the enroll node
can be connected to the leader and have validation.
2018-07-09 16:40:43 -04:00
Jarrod Johnson
67d6e9a6c7 Add collective show
Provide a harmless way to look at collective state
2018-07-09 15:07:24 -04:00
Jarrod Johnson
a4edf9afb8 Rename confluentutil to collective
Also adjust output to be a bit more automation friendly.
2018-07-09 13:33:56 -04:00
Jarrod Johnson
2342fe717e Remove superfluous call to sync to file
load_from_json already makes the call, remove the extra call that is
redundant.
2018-07-09 12:59:37 -04:00
Jarrod Johnson
08cf698609 Only conditionally require ffi
Only collective mode requires ffi, do not incur requirement for
non-collective mode.
2018-07-09 09:41:10 -04:00
Jarrod Johnson
a905ae4865 Only zap cfgleader if not set
stale relay_slaved_requests was trouncing following status, correct
by avoiding zapping that state
2018-07-03 14:43:23 -04:00
Jarrod Johnson
1eaf5357ca Resolve race conditions on simultaneous collective outage
Implement random backoff strategy for serializing connect out and
connect in.
2018-07-03 14:09:09 -04:00
Jarrod Johnson
39378170b1 Add an error if cfgstreams loses a follower 2018-07-03 11:13:23 -04:00
Jarrod Johnson
2156e99ae4 Use alternative name for pycryptodomex 2018-07-03 10:43:05 -04:00
Jarrod Johnson
bba12ed9e7 Update requirements to pull in cryptodomex 2018-07-03 10:32:33 -04:00
Jarrod Johnson
282043ed97 Switch to cryptodome
Cryptodome is a modern, but compatible replacement for pycrypto.

We may move to cryptography eventually, but start with this for now
for some nice speedups in some cases.
2018-07-03 10:31:13 -04:00
Jarrod Johnson
0b26d12837 Fix memory leaks
For one, configmanager was left with stale callback references, clean
those up.

For another, the callback pattern was creating a circular reference that
python memory management couldn't overcome.  Break the reference
explicity when an item is disposed of.
2018-07-03 08:58:11 -04:00
Jarrod Johnson
956faee052 Correct typo in variable name 2018-06-28 14:12:56 -04:00
Jarrod Johnson
8e77466875 Carry txcount through connect replica
The txcount was not up to date when offline updates occurred.
2018-06-28 13:54:31 -04:00
Jarrod Johnson
f01c7e19f7 Fix HA healing problems
If we are superior to leader, become leader
When abandoned by a leader, forget the leader.
2018-06-28 13:51:52 -04:00
Jarrod Johnson
5d894912ac Clean up more potential for CLOSE_WAIT
Explicitly close sockets in a few more places.
2018-06-28 10:50:03 -04:00
Jarrod Johnson
93e78d1f03 Fix try_assimilate
Also get rid of CLOSE_WAIT in some situations.
2018-06-28 09:53:34 -04:00
Jarrod Johnson
97f932b946 Fix the attempt to assimilate
In the wake of leader loss, the assimilate attempt was causing one
of a couple of bad behaviors, a trace if broken and if it should
work, the format of the data payload was incorrect.
2018-06-26 15:29:51 -04:00
Jarrod Johnson
61f24f4d8a Fix mismatched braces in previous commit 2018-06-26 15:09:17 -04:00
Jarrod Johnson
68a79695fc Add check for quorum to invite generation process
If a would-be collective member has no quorum, provide a clear
message indicating this as an issue.
2018-06-26 14:55:42 -04:00
Jarrod Johnson
401352998c Correctly show the error on non-leader
When non-leader tries to invite, print the error rather than unhelpful
exception with no helpful data.
2018-06-26 14:35:23 -04:00
Jarrod Johnson
9eeede651e Error when inviting from non leader 2018-06-26 14:24:52 -04:00
Jarrod Johnson
fb98dd5636 Fix packaging issues 2018-06-26 14:12:53 -04:00
Jarrod Johnson
0843b991ea Isolate following to dedicated greenthread and put fallback to assert leadership 2018-06-26 14:06:01 -04:00
Jarrod Johnson
11e6145a46 Add quorum check to non-config requests 2018-06-26 13:52:20 -04:00
Jarrod Johnson
7433dd3e38 Wrap cfg init on follow in lock
Use a lock to provide more atomic behavior for connecting should
something go wrong in calling connect_to_leader incorrectly.
2018-06-26 10:13:27 -04:00
Jarrod Johnson
4de1fea7aa Implement attempt to assimilate 2018-06-25 17:30:29 -04:00
Jarrod Johnson
f6342dd31f Allow connect_to_leader to cycle in the parent for loop
Startup was foiled when one entry was bad.  Also add comments
on invite/join needing to be done from current leader, and the need
for better error messages.
2018-06-25 14:51:39 -04:00
Jarrod Johnson
0499a14fe8 Try to reestablish collective on leader loss 2018-06-25 10:40:29 -04:00
Jarrod Johnson
f301cd272f Have follower notice lost leader
This will mitigate period during which requests
hang instead of error.
2018-06-24 11:08:15 -04:00
Jarrod Johnson
bf4f5ad5ae Recognize loss of follower as step toward loss of quorum
Properly reap the loss of a follower.
2018-06-22 16:17:48 -04:00
Jarrod Johnson
5a5f0169a7 Fix logic on null messages 2018-06-22 15:46:41 -04:00
Jarrod Johnson
03adec089d Also clear cfgleader when actually becoming leader 2018-06-22 15:26:08 -04:00
Jarrod Johnson
f065fafd61 Clear the quorum block on initial xfer
The initial transfer needs to have the configmanager working locally.
2018-06-22 15:23:20 -04:00
Jarrod Johnson
b315042850 Error if starting without quorum
If collective mode is present, but no candidates worked, still error
out.
2018-06-22 15:12:42 -04:00
Jarrod Johnson
5588712320 Clear transaction count on config clear
A clear configuration should have 0 transactions.
2018-06-22 14:46:52 -04:00
Jarrod Johnson
c6a0aeca3b Fix dispatch of commands with InputData
Inputdata needed to be serialized for the network.  Further, had
to have a JSON-safe payload for indicating name for certificate look
up, to avoid doing pickle load on client input prior to client
validation.
2018-06-22 14:41:41 -04:00
Jarrod Johnson
f45228c067 Auto-migrate open console session on loss of management
This will keep consoles connected across a manager change.  Note
that as it stands, a console session enduring multiple changes will
become increasingly convoluted as the redirect chain will increase
every time, rather than shorting back to the entry point.
2018-06-21 15:14:56 -04:00
Jarrod Johnson
d34e65f9b7 Fix tlvdata handling of unicode input
Unicode input is normalized to bytes.  Also have to handle python3
not having 'unicode', do a quick change to support that in both.
2018-06-21 14:29:54 -04:00
Jarrod Johnson
baef8c2c42 Connect and fix the proxyconsole
This works full duplex for sockapi and read for web consoles.
2018-06-21 13:46:51 -04:00
Jarrod Johnson
1543e145b7 Draft for proxyconsole object for remote use of consoles
This would be the stub stand in for the console object to
connect to remote console object rather than local.
2018-06-20 16:36:59 -04:00
Jarrod Johnson
2d403f7d68 Defer import of confluent log
confluent.util pulls in log more cleanly, for now rearrange for
easier time running slp test mode.
2018-06-20 14:56:07 -04:00
Jarrod Johnson
78117a1b1a Draft proxyconsole support for sockapi
Foundation for consoleserver to be able to do backend to backend
connections
2018-06-19 16:50:49 -04:00