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

1753 Commits

Author SHA1 Message Date
Jarrod Johnson
93d4847763 Conditionally apply agent to sshutil
Older OSes (RHEL7/SLES12) cannot
do ssh-keygen with an agent.

Degrade to classic confluent behavior when that happens.
2021-05-18 12:28:42 -04:00
Jarrod Johnson
1f320af8e5 Add error message for long profile names
If a profile name pushes the filename field of dhcp
beyond what it can support, log an event and
do not offer a corrupted
dhcp offer packet.
2021-05-18 09:44:27 -04:00
Jarrod Johnson
aa7701ea3c More usefully indicate unfound interfaces
Rather than no data, provide
not found error when requesting a currently unsupported name.
2021-05-11 08:02:19 -04:00
Jarrod Johnson
8543129fb9 Invalidate sealed token on new token
If a new token grant occurs, do not
retain stale token sealed, as it can be misleading.
2021-05-05 09:17:42 -04:00
Jarrod Johnson
a94a341582 Fix ansible path compatibility. 2021-05-03 14:31:28 -04:00
Jarrod Johnson
d17b1d060c Prepend confluent_ to vars and switch to explicitly requesting directory
The 'profile' variable notably induces dracut to be excruciatingly slow,
mitigate chance by putting confluent before apikey, mgr, and profile.

Further, it has been requested to have the scripts use same name on
server for directory moving forward. Implement this request while
allowing existing OS profiles to keep working.
2021-05-03 12:48:08 -04:00
Jarrod Johnson
121e0727cf Add Rocky linux recognition 2021-05-03 08:36:57 -04:00
Jarrod Johnson
def534e73f Fixes for boot by DHCP and by MAC 2021-04-28 16:43:11 -04:00
Jarrod Johnson
2cb641e734 Fix PXE based on mac
We normally use UUID, on a broken platform with bad UUID,
user may need to use hwaddr.  This was supposed to work, but
didn't. Fix it to work correctly.
2021-04-28 15:36:12 -04:00
Jarrod Johnson
d3fa08d78b Amend syncfiles to handle directory targets better
Rather than using symlinks for directories, recursively recreate tree
and symlink only the non-directory
entries.

This improves mixing and matching
files and directories to target a directory.
2021-04-27 12:48:27 -04:00
Jarrod Johnson
38eb88249e Permit wildcard in syncfiles
This was a supported and used feature in xCAT
syncfiles, carry it into confluent syncfiles.
2021-04-27 09:12:11 -04:00
Jarrod Johnson
c333c3eb9c Fix missing data on XCC discovery
The XCC scan now calls the
imm scan to fill out the lost data.
2021-04-26 08:57:52 -04:00
Jarrod Johnson
f32a9a2f08 Rework inline command handling
Previously, if hotkey entry
had text data come in, it
would corrupt the state of
the client.

Minimize the corruption and request the server to pause.
2021-04-23 14:22:24 -04:00
Jarrod Johnson
f584b9bc11 Protect against binary sealed data
It was detected that binary sealed data
could happen. Ensure that it is str
before passing to configuration.
2021-04-23 14:17:54 -04:00
Jarrod Johnson
45cc4b7788 Add documentation syncfiles examples
Also, check to make sure a syncfiles has actual
work to do before triggering a greenthread and
the client to start polling.
2021-04-23 11:09:35 -04:00
Jarrod Johnson
1f9c440525 Handle non-utf8 console data
Sometimes console uses non-utf8.

Fallback to cp437 when utf8 fails us.
2021-04-22 15:14:52 -04:00
Jarrod Johnson
8397c5defc Only close datfile if datfile is a file
If going by filename alone, there will be
no file handle to close. Correct by not
attempting a close in such a case.
2021-04-22 13:55:10 -04:00
Jarrod Johnson
b7af6b5c27 Add model name to discovery info
Sometimes the model name is
useful criteria for evaluating systems,
and the model number isn't
quite that handy.

For XCC, we can provide this data too. Provide it in xcc scan
method and then offer it up to clients.
2021-04-22 13:38:51 -04:00
Jarrod Johnson
bf00c75f43 Specify supported protocols to be confluent.console
Eventlet will return no supported protocols if
none are specified. Firefox doesn't care, but
chrome rejects such a reply.
2021-04-22 07:44:18 -04:00
Jarrod Johnson
479ddd582e Induce python2 to unicode
eventlet will treat str as binary,
correct by forcing unicode.

For python3, it is a no-op, but
python2 needs it to pass the 'text_type' check in eventlet.
2021-04-21 15:33:27 -04:00
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
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
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
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
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
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
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
b482410072 Have server pull in vtbufferd 2021-04-01 17:31:52 -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