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

53 Commits

Author SHA1 Message Date
Jarrod Johnson
638a1b3587 Fix confignet for python2 2022-02-03 11:50:34 -05:00
Jarrod Johnson
e94d0a5236 Fix for EL7 compatibility
Some python 3 exclusive assumptions were made.
Unfortunately, EL7 is python2
centric.
2022-02-03 10:09:28 -05:00
Jarrod Johnson
554e25d6cb Assume libcrypt.so.1 if not 2 in more generic way 2022-02-02 11:17:08 -05:00
Jarrod Johnson
f346cae683 Use more widely known paths for libcrypt 2022-02-02 10:53:46 -05:00
Jarrod Johnson
1431f9ce13 Change to python 2/3 agnostic syntax 2022-02-02 08:37:22 -05:00
Jarrod Johnson
456b43eeb7 Correctly align rtattr and nlmsg
When advancing through messages,
must pad to nearest multiple of
4.  This resolves erroneously landing on incorrect offsets.
2022-01-19 13:21:59 -05:00
Jarrod Johnson
abec8c498c Break netlink address fetch on invalid rta_len
It is considered valid for kernel to return a null rta_len
in the midst of data and expect the caller to terminate.
2021-12-20 12:28:35 -05:00
Jarrod Johnson
8df1c5b8e4 Make confignet available as a 'common' script 2021-11-08 16:23:56 -05:00
Jarrod Johnson
4e9020c3a7 Add SUSE support for confignet 2021-11-02 14:04:11 -04:00
Jarrod Johnson
db7cb6450b Temporarily stop firewalld and add pause to try to wait for address assignment 2021-11-02 09:43:42 -04:00
Jarrod Johnson
ea310e472a Improve preservation of existing connections/settings
When teaming up nics, salvage
things like dns settings from members.

When a connection already seems to exist, modify it rather than delete and replace,
for less disruption.

Running repeatedly should now be safer.
2021-11-01 12:34:37 -04:00
Jarrod Johnson
6df8170401 Draft confignet implementation
This will team and set up additional interfaces,
but, for one, no dns.  Need to merge with deploycfg info, since
networkmanager is intent on making dns a
connection oriented thing.
2021-10-29 17:16:16 -04:00
Jarrod Johnson
78163f1d09 Correct issue in parameter rename for apiclient 2021-10-29 07:23:26 -04:00
Jarrod Johnson
8ef70d463f Draft client for net configuration
Common code to struction networks into structure for configuration.

This organizes and autodetects
overlap, in prep for auto-teaming.
2021-10-28 17:09:09 -04:00
Jarrod Johnson
aff0c82b0b Fix apiclient with explicit host 2021-10-28 16:15:21 -04:00
Jarrod Johnson
925ea3e95a Refactor apiclient and allow specific host
For getnetcfg, will need to select
spsecific interfaces.  While
tocuhing that anyway, simplify the
v4/v6 paths to be more agnostic.
2021-10-28 15:48:58 -04:00
Jarrod Johnson
6f967a3afa Bind apiclient search to make for viable firewall rule 2021-10-28 12:55:42 -04:00
Jarrod Johnson
6550d584a2 Give scan callers a context for tracking local interface
When trying to leverage autodetect strategy for net config,
will need to keep track of receiving interface.  For now
only use ipv6 for this capability, as getting the incoming nic
for ipv4 would be more work.
2021-10-20 14:10:59 -04:00
Jarrod Johnson
8a01a0bbdc Use the scan_confluent for getting apikey, if relevant 2021-10-20 14:03:03 -04:00
Jarrod Johnson
484a3f8c64 Have apiclient priotize based on responsiveness 2021-10-19 17:09:52 -04:00
Jarrod Johnson
decee2ed93 Add fallback to apiclient
When apiclient fails using deploycfg, add
a multicast scan looking for replacements.
2021-10-19 15:39:47 -04:00
Jarrod Johnson
6e7b6188dd Fix api client attempts and speed up checking connections 2021-10-18 16:31:59 -04:00
Jarrod Johnson
ae7e69d73d Fix mistake in the apiclient 2021-10-18 15:52:22 -04:00
Jarrod Johnson
0f80b4a019 Change apiclient to embed apikey request
No longer require the clorthto utility
to request a token if we are already in
python.
2021-10-18 12:28:59 -04:00
Jarrod Johnson
d254cb08ac Default to None for second arg to get_apikey
In some context, we don't need to check both, we have a confirmed manager. Just take
one argument for that scenario.
2021-09-13 11:48:36 -04:00
Jarrod Johnson
66ddcfc194 Separate connection check from connection
Messing with connect corrupted
the http client too much,
have a separate helper function to evaluate
the candidate deployers,
then pass only the winner on.
2021-09-13 11:21:38 -04:00
Jarrod Johnson
7ba10e559e Correct ipv4/v6 handling in get_apikey 2021-09-13 10:03:32 -04:00
Jarrod Johnson
66d378a007 Simplify the ipv6 support and fix invocation before deploycfg 2021-09-10 09:16:08 -04:00
Jarrod Johnson
35b74764bf Amend apiclient to support v4/v6 2021-09-09 17:15:29 -04:00
Jarrod Johnson
8eb242cba0 Add ipv6 support to genesis 2021-09-09 16:27:59 -04:00
Jarrod Johnson
54fde4af21 Fix pessimistic error on apikey
Actually make sure that the apikey retrieval failed before erroring.
2021-08-03 16:44:03 -04:00
Jarrod Johnson
42f8056d56 Fix apiclient with TPM managed token
The retry mechanism is amended
to clear out the useless key
and start trying to get a network grant again.
2021-06-24 14:53:54 -04:00
Jarrod Johnson
2ef695324a Migrate genesis to new TPM strategy
Have addons for genesis
implement the same TPM usage
model as the suse/redhat stateless.
2021-06-24 14:35:21 -04:00
Jarrod Johnson
d69eb6ef12 Change apiclient to append if outputting to existing file 2021-05-05 17:45:04 -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
Jarrod Johnson
ca0c592044 Commence work on syncfileclient
This will be used to wait for deployer
to finish, then execute handlers
for 'MERGE' entries.
2021-03-25 16:55:56 -04:00
Jarrod Johnson
66efa1da5c Implement remote config for EL8 2021-03-18 14:12:19 -04:00
Jarrod Johnson
aeb1b704b3 Add mechanism to supply data from argv
Some POST calls may want body from CLI, make this
easier by no longer requiring a file to do so.
2021-03-16 11:18:46 -04:00
Jarrod Johnson
d19b5e4376 Have apiclient preserve server response verbatim
Do not add extra \n to output that server would
have already terminated.
2020-12-09 16:37:12 -05:00
Jarrod Johnson
7a9276300a Have apiclient reach out to deploycfg server
If we already have deploycfg, use that to indicate the
target server rather than copernicus data.
2020-12-09 16:20:02 -05:00
Jarrod Johnson
edaaa2393d Hook up apiclient to TPM2 persistence, when available 2020-11-06 16:38:05 -05:00
Jarrod Johnson
584f6dc458 Handle no-argument invocation
apiclient is used to process confluent.info
2020-08-17 13:40:00 -04:00
Jarrod Johnson
997b43045a Make preparations for a configbmc for inband config 2020-08-14 15:29:55 -04:00
Jarrod Johnson
4cd7714099 Modify apiclient to rewrite ifidx if stale 2020-08-11 15:41:44 -04:00
Jarrod Johnson
95f9854630 Fix missing data for apiclient 2020-08-11 13:40:55 -04:00
Jarrod Johnson
004e609635 Fix apikey strip for python2
Strip after any conversions, whether it is bytes or str.
2020-07-01 11:29:31 -04:00
Jarrod Johnson
b372a15c33 Strip newline after decode
strip on bytes in python3 does not remove newlines.
Call after decode to have strip handle the newline.
2020-07-01 10:32:11 -04:00
Jarrod Johnson
dfa636ac4c Coerce binary to text
In subprocess, since we get binary, need to
coerce to text.
2020-07-01 10:15:35 -04:00
Jarrod Johnson
e863edfe3f Correct a number of mistakes 2020-07-01 09:52:17 -04:00