feat: Tier2 backup pauses when destination drive is inactive (Inaktív)
Deactivated drives (Schedulable=false) now treated like disconnected for Tier2 backups. New IsStoragePathSchedulable() checks active+connected+not decommissioned. UI shows yellow "Cél meghajtó inaktív" badge, scheduler skips silently with WARN log. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -707,6 +707,20 @@ func (s *Settings) IsStoragePathKnown(path string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsStoragePathSchedulable returns whether a path belongs to a registered,
|
||||
// schedulable (active) storage path. Returns false if the path is unknown,
|
||||
// disconnected, decommissioned, or inactive.
|
||||
func (s *Settings) IsStoragePathSchedulable(path string) bool {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
for _, sp := range s.StoragePaths {
|
||||
if path == sp.Path || strings.HasPrefix(path, sp.Path+"/") {
|
||||
return sp.Schedulable && !sp.Disconnected && !sp.Decommissioned
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// GetStoppedStacks returns the list of stacks that were auto-stopped for a storage path.
|
||||
func (s *Settings) GetStoppedStacks(path string) []string {
|
||||
s.mu.RLock()
|
||||
|
||||
Reference in New Issue
Block a user