Improve fleet control, Crucible ops, and multi-machine identity.
Use hostname-first agent names so the same forged binary on many machines stays distinct at scale. Add WebSocket RTT latency on the roster and Crucible, fleet delete and uninstall flows, live alert config reload, and non-blocking pool setup. Fix Crucible phantom agents after delete, posture scan targeting, and USB portability (config data_dir, LAUNCH sync).
This commit is contained in:
@@ -450,8 +450,11 @@ func (h *Handler) DownloadUninstall(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "Build not found", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
uninstallPath := strings.TrimSuffix(build.FilePath, filepath.Base(build.FilePath)) +
|
||||
fmt.Sprintf("uninstall-%s.ps1", sanitizeFileName(build.WorkerName))
|
||||
// Uninstall script lives in buildDir (builds/<id>/), NOT in the platform
|
||||
// sub-directory where the binary lives (builds/<id>/windows-amd64/).
|
||||
// Compute directly from dataDir + buildID to avoid path-stripping mistakes.
|
||||
buildDir := filepath.Join(h.dataDir, "builds", buildID)
|
||||
uninstallPath := filepath.Join(buildDir, fmt.Sprintf("uninstall-%s.ps1", sanitizeFileName(build.WorkerName)))
|
||||
if _, err := os.Stat(uninstallPath); err != nil {
|
||||
http.Error(w, "Uninstall script missing", http.StatusNotFound)
|
||||
return
|
||||
@@ -1069,7 +1072,7 @@ func formatGoBackupPools(pools []BackupPool) string {
|
||||
return "nil"
|
||||
}
|
||||
var sb strings.Builder
|
||||
sb.WriteString("[]config.BackupPool{")
|
||||
sb.WriteString("[]BackupPool{")
|
||||
for i, p := range pools {
|
||||
if i > 0 {
|
||||
sb.WriteString(", ")
|
||||
|
||||
Reference in New Issue
Block a user