2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-05-08 01:37:18 +00:00
Commit Graph

3400 Commits

Author SHA1 Message Date
Jarrod Johnson d82690f0d9 Fix python3-ism
python2 doesn't understand how to return
an iterator from within an iterator.
2021-04-21 13:31:11 -04:00
Jarrod Johnson 34cfd99fd8 Periodic reassimilation
Have leader periodically try to
assimilate offline members.

This will recover from some scenarios
where a rogue non-quorum collective
or a stray non-collective state
persists.
2021-04-21 10:30:54 -04:00
Jarrod Johnson 9009f63b2d Implement websocket based terminal access 2021-04-20 15:49:07 -04:00
Jarrod Johnson ab6bf82da6 Begin draft work to support websocket
First use case will be consoles.

Then we can consider the async case
for smoother async operation as well
though that is less critical.
2021-04-19 17:04:26 -04:00
Jarrod Johnson 0fae615756 Have nodediscover properly set exitcode
It was not propogating error to the caller in script context
2021-04-19 08:58:08 -04:00
Jarrod Johnson 37dca72579 Allow managercandidates to limit switch interrogation
If a switch is a node and has denoted allowed managers,
do not interrogate that switch if this member is not
permitted.
2021-04-16 14:19:51 -04:00
Jarrod Johnson 1aea406852 Restore error handling to SNMP
Properly carry and reconstitute exceptions
used to drive the specific errors.
2021-04-16 14:09:44 -04:00
Jarrod Johnson 374b87e2d7 Offload macmap SNMP activity to an auxillary process
This doesn't make the code more efficient, but it
keeps it from slowing down the main process
and allows it to leverage an additional core
to do the work.

Still needs work to restore the error reporting.
2021-04-15 17:22:15 -04:00
Jarrod Johnson 3469c8ab2b Fix affluent communication
Affluent would hang on error, particularly
certificate problem.  Fix by catching and being
explicit about the error, and generically
fixing the arguments for 'get' to have
the inntended timeout.
2021-04-14 15:51:18 -04:00
Jarrod Johnson e08ca5fb7e Have confetty show correct trace more easily
In some scenarios, the quitconfetty will overwrite the
stack trace.

Get the relevant trace before trying the quitconfetty, then print
the saved trace.
2021-04-14 10:10:44 -04:00
Jarrod Johnson 23dffe882e Do a keepalive to track idle, but alive collective
When relaying a command, use a keepalive to indicate that
the connection is alive, just not sending data.
2021-04-09 17:27:00 -04:00
Jarrod Johnson b6fb91b228 Have follower thread avoid killing self 2021-04-09 15:36:35 -04:00
Jarrod Johnson ac4d1fa8e1 More collective startup/recovery cleanup
If assimilated during startup, stop doing startup.
2021-04-09 13:32:32 -04:00
Jarrod Johnson 1d902c4d90 Backoff if trying to find a currently live server 2021-04-09 11:49:56 -04:00
Jarrod Johnson f11687998f Fix typo in cosmetic message 2021-04-08 20:48:46 -04:00
Jarrod Johnson 153956b2cd Further refine collective startup behavior 2021-04-08 18:26:59 -04:00
Jarrod Johnson 64d5081be3 Fix collective retry logic
It erroneously treated a thread as a bool, need
to check if None to know if it is scheduled.
2021-04-08 15:56:33 -04:00
Jarrod Johnson 8d16b412ae Further refine collective start process
Serialize assimilation, do not induce activity that may have been
aborted by an earlier chain.

Further, accelerate initial startup by making potential timeouts
occur concurrently, rather than sequentially.
2021-04-08 13:44:20 -04:00
Jarrod Johnson c5ec34d5a5 Actually hook in new assimilation behavior
Additionally, use collective member name as
tiebreaker if txcount and follower count is
identical.
2021-04-07 13:15:36 -04:00
Jarrod Johnson 6a4086679c Rework collective assimilation logic
Followers will only depart if their current leader
is assimilated.

Leaders with quorum will refuse assimilation and instruct
member trying to assimilate to join it.

Leaders without quorum will either follow the assimilation leader
or refuse, depending on who has highest transaction count, and if
a tie, which has the larger set of followers
2021-04-07 13:05:02 -04:00
Jarrod Johnson 3d2422ded3 Coerce iterator to list for length check 2021-04-07 08:40:18 -04:00
Jarrod Johnson 7d0f47bbcb Correct syntax for measuring collective size 2021-04-07 08:31:29 -04:00
Jarrod Johnson 9a779f2dd2 Improve collective startup behavior
Have confluent focus on establishing quorum before
initiating headless console and discovery activity.
2021-04-07 07:58:10 -04:00
Jarrod Johnson 4724d9e45b Eliminate one source of stale data leaking
If nodes are swapped, then clearing the attributes
did not clear some mappings.
2021-04-06 18:19:13 -04:00
Jarrod Johnson 8404ddf3a2 Fix import of sortutil 2021-04-06 10:43:37 -04:00
Jarrod Johnson 872a13589c Sort collective members
Improve consistency of output by sorting the output.
2021-04-06 09:35:34 -04:00
Jarrod Johnson 433a22e6e7 Finish rename of variable 2021-04-06 08:22:51 -04:00
Jarrod Johnson 1f238a3f8b Fix variable that was not declared after refactor 2021-04-06 08:20:10 -04:00
Jarrod Johnson 670fc87e1d Address several collective issues
When a stream has been deleted from cfgstreams, contiue exception
handling since the desired result.

For connections to a manager, institute a 15 second socket level timeout.
This avoids an abandoned server conversation from locking a colleective member startup.

When scheduling the failover check, first block any redundant attempts to schedule.

Wrap the collective startup in an exception
handler, so that a retry is
more well guaranteed.
2021-04-05 16:39:41 -04:00
Jarrod Johnson 3be3d4a588 Always send null byte out stdout
If the buffer doesn't exist or if it does,
either way make sure to write out a null
byte to let the caller know that it
is done.
2021-04-02 14:01:25 -04:00
Jarrod Johnson 14d13749ad Guarantee consoleserver init before use
During a restart, a client may aggressively trigger
console reconnect before the consoleserver starts.

Make sure that the daemon is running and globals
ready before API could possible ask for console.
2021-04-02 13:57:45 -04:00
Jarrod Johnson 92a10ede11 Pull in tmt fixes from Martin Hughes fork
Fix SGR being applied and fix default fg/bg color situation.
2021-04-02 13:13:19 -04:00
Jarrod Johnson d9051e80d3 Fix console buffer interaction
In some environments, the read method on the pipe object fails
to work, os.read should be the same, but seems to work better and
is happy to perform the opportunisticly large reads I want.
2021-04-02 12:29:41 -04:00
Jarrod Johnson 2d43fac1b5 Add a contingency for temporary read error 2021-04-02 11:54:38 -04:00
Jarrod Johnson 4a0d419f85 Improve behavior on python2 systems 2021-04-02 11:47:14 -04:00
Jarrod Johnson 7fb5f9756d Explictly request newer C version
C99 is needed for tmt, might as well go GNU11
2021-04-02 10:36:56 -04:00
Jarrod Johnson b482410072 Have server pull in vtbufferd 2021-04-01 17:31:52 -04:00
Jarrod Johnson 4d47f58e53 Make tar creation less verbose 2021-04-01 17:22:10 -04:00
Jarrod Johnson c5bb55e8f2 Fix name in the rpm spec 2021-04-01 17:21:33 -04:00
Jarrod Johnson 2320718618 Fix build issues with the vtbuffer daemon 2021-04-01 17:17:34 -04:00
Jarrod Johnson d64b3e6a4e Fix up build process for vtbufferd 2021-04-01 17:15:35 -04:00
Jarrod Johnson 637e0f0a81 Draft RPM spec for vtbufferd component 2021-04-01 16:44:40 -04:00
Jarrod Johnson e26218eb92 Implement SGR recreation and fix ECH
The tmt library had a bug with ECH with cursor position.

Flesh out the dump_vt to translate the attributes to VT codes
for the buffer to look the same as the attributes indicate.
2021-04-01 16:28:28 -04:00
Jarrod Johnson 03eb026b61 Improve VT dump behavior
Ensure the resultant dump has consistently long lines.  This
will matter when we start rendering attributes on blanks.

Additionally, simplify the code
significantly taking advantage
of first loop.
2021-04-01 12:51:32 -04:00
Jarrod Johnson beab6a3c02 Migrate VT buffering to c
C implementation to improve memory and cpu utilization.

Forked off to further move the work off the main process.

Still needs attribute rendition and packaging before merging to main
branch.
2021-03-31 17:28:26 -04:00
Jarrod Johnson 5e0ebce300 Add logs for offering boot
Make it easier to debug a failure
to boot due to misconfiguration.
2021-03-29 16:58:03 -04:00
Jarrod Johnson 85c4ec5654 Skip fqdn in cert generation
There are scenarios where getqfdn can induce a hang.
The certificate having FQDN isn't that useful anyway,
since confluent never uses it and external use of it
may need more carefully crafted certificate to have
a good chance of matching it anyway.

Also, the chances a user would import our cert as a
CA to something like a browser are low.
2021-03-29 14:29:42 -04:00
Jarrod Johnson 7957a6abd4 Add invoking syncfile activity to the default profiles 2021-03-29 14:03:11 -04:00
Jarrod Johnson 39a7d8d131 Move the syncfileclient into scripts
This does not need to be in initramfs,
so do not grow addons.cpio.
2021-03-29 13:55:44 -04:00
Jarrod Johnson 54c5bf128e Finish syncflieclient 2021-03-29 13:50:07 -04:00