2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-05-12 17:34:17 +00:00
Commit Graph

641 Commits

Author SHA1 Message Date
Jarrod Johnson 8807fcfd22 Fix missing portname in lldp data
Root cause was pysnmp returning extraneous leftover data causing
calling code to overrite good data.
2018-05-22 09:37:01 -04:00
Jarrod Johnson 33fe0a3db4 Fix wrong port name for G8332
Was using the incorrect half of the return, which broke on G8332.
2018-05-22 09:36:55 -04:00
Jarrod Johnson 5fe2d2a31c Fix unprintable characters in some chassisid
Some switches send raw octets back, some printable.  Try to normalize
when unprintable chassis id are detected.  This is not 100%, if the hex
would be all between 20 and 80 throughout the string, then this will
fail to do the right thing.

Hopefully, the amount of times when lldp partners disagree on how to
implement LLDP-MIB will be limited.  Currently it is known than Lenovo
and Juniper switches disagree, and both of those have what would
be unprintable values in the mfg portion of the chassis id.
2018-05-21 15:53:42 -04:00
Jarrod Johnson 41298a8e01 Extend collective data functions to more functions
Add to users and groups.  Refactor reusable code.
Code that remains still looks awfully repetitive though...
2018-05-21 15:46:51 -04:00
Jarrod Johnson fde2c7a8e0 Fix the encuuid reference
encuuid is a list, not the value, so get the first value
rather than try to concatenate the string.
2018-05-18 11:49:06 -04:00
Jarrod Johnson 1db781852c Fix typo in discovery core 2018-05-18 10:20:31 -04:00
Jarrod Johnson 675dc966c7 Clean up errors on bad ipv4 addresses
confluent errors are better now
2018-05-17 16:24:06 -04:00
Jarrod Johnson 39e9bf0be5 Cleaner handling of invalid names in restore attempt
Detect problems ahead af time and more cleanly print a message.
2018-05-17 14:40:19 -04:00
Jarrod Johnson f21db46cdd Fix discovery of old SMM firmware
Older SMM firmware will not have neighbor data, ignore and move on
in such a case.
2018-05-17 14:20:59 -04:00
Jarrod Johnson dcb1c2b32b Fix load of txcount
Mistake caused txcount not to restore from disk.
2018-05-16 11:27:46 -04:00
Jarrod Johnson d705d6320a Start setting the stage for leader change on restart
Have connect() have a way to recover if leader is dead.

Also these will be involved in configmanager detected loss of leader
2018-05-16 11:27:46 -04:00
Jarrod Johnson 52e2038fdf Fix transaction count in collective
Slave members were not persisting the value to disk
2018-05-16 11:27:46 -04:00
Jarrod Johnson 9d58a2d382 Correct scope of currentleader 2018-05-16 11:27:46 -04:00
Jarrod Johnson a2187087f7 Fix not having currentleader set
A slave node now recognizes itself as such.
2018-05-16 11:27:46 -04:00
Jarrod Johnson c5b5178f39 Block some early startup problems in collective 2018-05-16 11:27:46 -04:00
Jarrod Johnson 1c2c9931a8 Persist the transactioncount
Needed for eventually ascertaining the viability in selecting leader.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 778a153170 Correct spelling error 2018-05-16 11:27:46 -04:00
Jarrod Johnson 34c510e30a Try to persist name as myname
hostname may not agree with the name chosen by user, in such a case
persist the name and use that, falling back to gethostname()
as needed.
2018-05-16 11:27:46 -04:00
Jarrod Johnson d4babbffa4 Check and try to start collective on startup
Not yet good enough for a leader to rejoin, but enough for a follower
to rejoin automatically.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 1c930eba9d Have attrib set wait on all collective members
This will mean that it is reliable that a nodeattrib ; <command>
in delegation scenarios is guaranteed to execute in order.
2018-05-16 11:27:46 -04:00
Jarrod Johnson c4b564123f Allow slave collective drones to set
It works (once), but needs xid fix.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 6d728df4dc Fix reuse of channel for receiving changes 2018-05-16 11:27:46 -04:00
Jarrod Johnson f1e29393df Succeed in pushing config to followers from leader
Still more work to be done for multiple transactions.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 81bb16476c Apply changes from leader subscription 2018-05-16 11:27:46 -04:00
Jarrod Johnson 035f10e7d7 Rough draft for ongoing syncronization
Putting thoughts down on how xmit will work, will add recv and relay,
do some testing, and then decide how much can be done to apply it neatly
to the various points.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 830e6bb4e4 Clear configuration prior to sync 2018-05-16 11:27:46 -04:00
Jarrod Johnson 1eb542f6a8 Actually execute replicate-on-connect
This creates a duplicate of the leader.
2018-05-16 11:27:46 -04:00
Jarrod Johnson b733049a0c Add self to collective database
Database would omit initial leader otherwise.
2018-05-16 11:27:46 -04:00
Jarrod Johnson a4d80e4e3a Fixes to the connect draft
Needed to track it's own name, skip the banner and auth message...
2018-05-16 11:27:46 -04:00
Jarrod Johnson a69b5fbb50 For enroll, track the remote cert special
For reconnect, we will have collective objects.  However at
enroll time, we need to be special.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 789dfe94d0 Fix missing import of eventlet
Unable to spawn the connect thread due to missing import.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 73a376fd74 Fix backup of globals
Globals failed to open the backup file as writable, causing failure if
a global had been set.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 57f390fd0a Draft for starting the databse replication
Does not actually heed the data, or implement ongoing relay of data back and forth.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 641bc7344a Add hooks for collective mode and refactor
In support of config replication, need configmanager to do a few things
2018-05-16 11:27:46 -04:00
Jarrod Johnson af940c972f Add function to check address equivalence
As we start needing to compare addresses, provide a central function
to handle the various oddities associated with that.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 468f00cd1c Rename 'joinchallenge' to 'enroll'
Seems like a better word to use.
2018-05-16 11:27:46 -04:00
Jarrod Johnson ce635068aa Begin the 'connect' collective operation
First check if we are current leader, reject if not, then if cert
is invalid, reject, then comes the TODO.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 348c6a7c38 Add collective info to DB backup
Now persisted to disk *and* accessible to backup.
2018-05-16 11:27:46 -04:00
Jarrod Johnson a41a42ffd0 Persint collective info to disk
Additionally, simplify the concluding steps of the join conversation.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 3a354a6300 Ensure the invitation works out to even multiple of 3 bytes
It's cosmetic, but a nice way to avoid '=' in the tokens.
2018-05-16 11:27:46 -04:00
Jarrod Johnson fb9925bb84 Fix encoding of the response proof
The response was not decoded, causing it to always fail.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 78bf1d5acd Provide more feedback and fix some flow issues 2018-05-16 11:27:46 -04:00
Jarrod Johnson 8165b645d9 Fix invite process and unicode
Unicode strings do not fit with our world view, make them bytes.
2018-05-16 11:27:46 -04:00
Jarrod Johnson c2783b6734 Rename swarm to collective in setup.py.tmpl 2018-05-16 11:27:46 -04:00
Jarrod Johnson 033d59b04a Afetr some feedback, rename it 'collective' 2018-05-16 11:27:46 -04:00
Jarrod Johnson 4155954d1c Add swarm to setup.py
Make sure the swarm content is actually installed.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 1b912c4365 Further advance the swarm concept
This marks the start of attempting to connect the invitation
to sockets and using the invitation to measure the certificates as
well as proving client knowledge of an invitation token.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 5f9ee3d3c5 Migrate 'multimanager' to 'swarm'
It's easier to say 'swarm' and conveys the sense without confusion
of 'cluster' mode.
2018-05-16 11:27:46 -04:00
Jarrod Johnson cc9becea3b Add ability to get client certificates
Unfortunately, to pull off the target user experience, we
must register a custom client certificate validation to allow
us to not require a CA.
2018-05-16 11:27:46 -04:00
Jarrod Johnson 1e0cf7e9fb Create invitation management module
This facilitates the generation of invitations and logistics of proving
knowledge of the invitation and the integrity of the certificates.
peercert is to be gotten through getpeercert(binary_form=True) and
local cert through the util function to load from file, since we don't
have another way of getting local certificate.
2018-05-16 11:26:36 -04:00