From 0a2dea05a952c6856934f6fec72f06df995c3377 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sat, 12 Sep 2020 12:16:30 +0200 Subject: [PATCH] [#385] status + replication: warning if replication succeeeded without any filesystem being replicated refs #385 refs #384 --- client/status.go | 5 +++++ replication/driver/replication_driver.go | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/status.go b/client/status.go index e2baa2e..ea37547 100644 --- a/client/status.go +++ b/client/status.go @@ -480,6 +480,11 @@ func (t *tui) renderReplicationReport(rep *report.Report, history *bytesProgress t.newline() } + if len(latest.Filesystems) == 0 { + t.write("NOTE: no filesystems were considered for replication!") + t.newline() + } + var maxFSLen int for _, fs := range latest.Filesystems { if len(fs.Info.Name) > maxFSLen { diff --git a/replication/driver/replication_driver.go b/replication/driver/replication_driver.go index d678c27..34f92a0 100644 --- a/replication/driver/replication_driver.go +++ b/replication/driver/replication_driver.go @@ -230,7 +230,10 @@ func Do(ctx context.Context, planner Planner) (ReportFunc, WaitFunc) { errRep := cur.errorReport() if rep.State == report.AttemptDone { - log.Debug("attempt completed successfully") + if len(rep.Filesystems) == 0 { + log.Warn("no filesystems were considered for replication") + } + log.Debug("attempt completed") break }