controller: F7 atomic volume dumps + F6 no-single-copy + F5 stale-primary sweep (WIP, pre-build)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017CDMFpFx84pfviCTVuGGhf
This commit is contained in:
@@ -47,8 +47,10 @@ func defaultOffboxRunner(ctx context.Context, env []string, args ...string) ([]b
|
||||
}
|
||||
|
||||
// SetOffboxRunner overrides the restic exec (tests). SetOffboxNotify wires the failure→operator alert.
|
||||
func (m *Manager) SetOffboxRunner(r offboxRunner) { m.offboxRunner = r }
|
||||
func (m *Manager) SetOffboxNotify(fn func(dur time.Duration, snapshots int, err error)) { m.offboxNotify = fn }
|
||||
func (m *Manager) SetOffboxRunner(r offboxRunner) { m.offboxRunner = r }
|
||||
func (m *Manager) SetOffboxNotify(fn func(dur time.Duration, snapshots int, err error)) {
|
||||
m.offboxNotify = fn
|
||||
}
|
||||
|
||||
func (m *Manager) runner() offboxRunner {
|
||||
if m.offboxRunner != nil {
|
||||
@@ -57,10 +59,10 @@ func (m *Manager) runner() offboxRunner {
|
||||
return defaultOffboxRunner
|
||||
}
|
||||
|
||||
func (m *Manager) offboxDir() string { return filepath.Join(m.cfg.Paths.DataDir, "offbox") }
|
||||
func (m *Manager) offboxKeyPath() string { return filepath.Join(m.offboxDir(), "ssh_key") }
|
||||
func (m *Manager) offboxPwPath() string { return filepath.Join(m.offboxDir(), "repo_password") }
|
||||
func (m *Manager) offboxKnownHosts() string { return filepath.Join(m.offboxDir(), "known_hosts") }
|
||||
func (m *Manager) offboxDir() string { return filepath.Join(m.cfg.Paths.DataDir, "offbox") }
|
||||
func (m *Manager) offboxKeyPath() string { return filepath.Join(m.offboxDir(), "ssh_key") }
|
||||
func (m *Manager) offboxPwPath() string { return filepath.Join(m.offboxDir(), "repo_password") }
|
||||
func (m *Manager) offboxKnownHosts() string { return filepath.Join(m.offboxDir(), "known_hosts") }
|
||||
|
||||
// WriteOffboxSecrets persists the SSH private key + (auto-generated if empty) repo password + the pinned
|
||||
// known-host line as 0600/0644 files in the data dir. The key is provided out-of-band by the operator
|
||||
|
||||
Reference in New Issue
Block a user