fix(agent): make discovery enrollment compatible and idempotent (#53)

* fix(agent): make discovery enrollment compatible and idempotent

* fix(agent): confirm enrollment persistence and document token aliases
This commit is contained in:
ArthurKoba
2026-11-07 16:29:47 +03:00
committed by GitHub
parent 1ca03df0ef
commit 72d67c80f2
30 changed files with 1324 additions and 71 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ import (
"strings"
"time"
"github.com/Rain-kl/Wavelet/internal/apps/agent/localfile"
"github.com/Rain-kl/Wavelet/internal/apps/edge/nodeip"
"github.com/Rain-kl/Wavelet/pkg/util"
)
@@ -406,7 +407,7 @@ func (cfg *Config) Save() error {
if err != nil {
return err
}
return os.WriteFile(cfg.configPath, data, configFilePerm)
return localfile.WriteAtomic(cfg.configPath, data, configFilePerm)
}
func detectHostname() string {