2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-29 08:41:00 +00:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Jarrod Johnson 95466392f9 Fix typo in confluentdbutil
The restore function would fail
to chown directories due to typo
2021-03-01 10:32:13 -05:00
Jarrod Johnson b3857f8d33 Fix chained discovery of DWC SMMv2
SMMv2 for DWC has more ports. Make the code
not care about which port is which for checking
for matching smm fingerprints.
2021-03-01 10:32:05 -05:00
Jarrod Johnson 7eb06f2722 Improve concurrency of SLP
During a scan, unicast TCP
interrogation of candidates
was done serially. Do this
concurrently so that poorly
behaving targets do not prolong
a scan.
2021-02-26 13:31:07 -05:00
Jarrod Johnson 8cf264602d Update status at end of esxi install 2021-02-05 14:02:28 -05:00
4 changed files with 16 additions and 5 deletions
@@ -4,3 +4,8 @@ install --firstdisk --overwritevmfs
%include /tmp/ksnet
%include /tmp/rootpw
reboot
%post
localcli network firewall unload
STATUP=$(mktemp)
echo '{"status": "complete"}' > $STATUP
/opt/confluent/bin/apiclient /confluent-api/self/updatestatus $STATUP
+1 -1
View File
@@ -74,7 +74,7 @@ if args[0] == 'restore':
for targdir in os.walk('/etc/confluent'):
os.chown(targdir[0], owner, group)
for f in targdir[2]:
os.chown(os.patht.join(targdir[0], f), owner, group)
os.chown(os.path.join(targdir[0], f), owner, group)
except Exception as e:
print(str(e))
sys.exit(1)
+3 -3
View File
@@ -814,10 +814,10 @@ def get_smm_neighbor_fingerprints(smmaddr, cv):
neighs = wc.grab_json_response('/scripts/neighdata.json')
if not neighs:
return
for idx in (4, 5):
if 'sha256' not in neighs[idx]:
for neigh in neighs:
if 'sha256' not in neigh:
continue
yield 'sha256$' + b64tohex(neighs[idx]['sha256'])
yield 'sha256$' + b64tohex(neigh['sha256'])
def get_nodename(cfg, handler, info):
@@ -19,6 +19,7 @@ import confluent.util as util
import confluent.log as log
import os
import random
import eventlet.greenpool
import eventlet.green.select as select
import eventlet.green.socket as socket
import struct
@@ -583,6 +584,8 @@ def scan(srvtypes=_slp_services, addresses=None, localonly=False):
# reduced chance of many responses overwhelming receive buffer.
_grab_rsps((net, net4), rsps, 1, xidmap)
# now to analyze and flesh out the responses
handleids = set([])
gp = eventlet.greenpool.GreenPool(128)
for id in rsps:
for srvurl in rsps[id].get('urls', ()):
if len(srvurl) > 4:
@@ -597,7 +600,10 @@ def scan(srvtypes=_slp_services, addresses=None, localonly=False):
break
else:
continue
_add_attributes(rsps[id])
gp.spawn_n(_add_attributes, rsps[id])
handleids.add(id)
gp.waitall()
for id in handleids:
if 'service:lighttpd' in rsps[id]['services']:
currinf = rsps[id]
curratt = currinf.get('attributes', {})