mirror of
https://github.com/zrepl/zrepl.git
synced 2025-06-20 09:47:50 +02:00
autosnap: do not treat zero fs filter results as fatal
This commit is contained in:
parent
bfaf6fdfbb
commit
8e34843eb1
@ -19,7 +19,7 @@ func (a *IntervalAutosnap) filterFilesystems() (fss []*zfs.DatasetPath, stop boo
|
|||||||
a.task.Enter("filter_filesystems")
|
a.task.Enter("filter_filesystems")
|
||||||
defer a.task.Finish()
|
defer a.task.Finish()
|
||||||
fss, err := zfs.ZFSListMapping(a.DatasetFilter)
|
fss, err := zfs.ZFSListMapping(a.DatasetFilter)
|
||||||
stop = err != nil || len(fss) == 0
|
stop = err != nil
|
||||||
if err != nil {
|
if err != nil {
|
||||||
a.task.Log().WithError(err).Error("cannot list datasets")
|
a.task.Log().WithError(err).Error("cannot list datasets")
|
||||||
}
|
}
|
||||||
@ -37,6 +37,10 @@ func (a *IntervalAutosnap) findSyncPoint(fss []*zfs.DatasetPath) (syncPoint time
|
|||||||
time time.Time
|
time time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(fss) == 0 {
|
||||||
|
return time.Now(), nil
|
||||||
|
}
|
||||||
|
|
||||||
snaptimes := make([]snapTime, 0, len(fss))
|
snaptimes := make([]snapTime, 0, len(fss))
|
||||||
|
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
@ -132,6 +136,7 @@ func (a *IntervalAutosnap) syncUpRun(ctx context.Context, didSnaps chan struct{}
|
|||||||
func (a *IntervalAutosnap) Run(ctx context.Context, didSnaps chan struct{}) {
|
func (a *IntervalAutosnap) Run(ctx context.Context, didSnaps chan struct{}) {
|
||||||
|
|
||||||
if a.syncUpRun(ctx, didSnaps) {
|
if a.syncUpRun(ctx, didSnaps) {
|
||||||
|
a.task.Log().Error("stoppping autosnap after error in sync up")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user