From dcac3ad47b416ac6a57dcb20d91f766b41676d48 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 15 Jul 2022 05:08:00 +0000 Subject: [PATCH] remove report_mirror --- merlin/README.md | 1 - merlin/config/config.go | 3 --- merlin/merlin-config.ini | 2 -- merlin/sync/interface.go | 1 - merlin/sync/process.go | 12 ------------ 5 files changed, 19 deletions(-) diff --git a/merlin/README.md b/merlin/README.md index 67c68f0..f711390 100644 --- a/merlin/README.md +++ b/merlin/README.md @@ -18,7 +18,6 @@ Then configure `merlin-config.ini` and run using `./merlin` - sort `arthur status` by last time synced - last sync runtime, time until next sync - when sync fails, then make a copy of the rsync logs -- create `csc-sync-fedora` rather than using the `report_mirror` setting ### Completed - [x] add bwlimit option for each rsync process diff --git a/merlin/config/config.go b/merlin/config/config.go index 6bc1fff..4b7931a 100644 --- a/merlin/config/config.go +++ b/merlin/config/config.go @@ -132,8 +132,6 @@ type Repo struct { RsyncLogFile string `ini:"-"` // full file path for file logging this repo's zfssync ZfssyncLogFile string `ini:"-"` - // determines if report_mirror should be run after the sync (default: false) - ReportMirror bool `ini:"report_mirror"` // add the "-vv" flag to rsync commands and enable the Debug log (default: false) Verbose bool `ini:"verbose"` // the repo will write its name and status in a Result struct to DoneChan @@ -234,7 +232,6 @@ func LoadConfig(configPath string, doneChan chan SyncResult, stopChan chan struc RepoLogFile: filepath.Join(newConf.RepoLogDir, repoName) + ".log", RsyncLogFile: filepath.Join(newConf.RsyncLogDir, repoName) + "-rsync.log", ZfssyncLogFile: filepath.Join(newConf.ZfssyncLogDir, repoName) + "-zfssync.log", - ReportMirror: false, Verbose: false, DoneChan: doneChan, StopChan: stopChan, diff --git a/merlin/merlin-config.ini b/merlin/merlin-config.ini index 0d2b090..49cd190 100644 --- a/merlin/merlin-config.ini +++ b/merlin/merlin-config.ini @@ -57,7 +57,6 @@ frequency = bi-hourly local_dir = fedora/epel rsync_host = mirrors.kernel.org rsync_dir = fedora-epel -report_mirror = true [cygwin] sync_type = csc-sync-standard @@ -211,7 +210,6 @@ frequency = bi-hourly local_dir = fedora/linux rsync_host = mirrors.kernel.org rsync_dir = fedora-enchilada/linux/ -report_mirror = true [ubuntu-ports-releases] sync_type = csc-sync-standard diff --git a/merlin/sync/interface.go b/merlin/sync/interface.go index c404523..3a88357 100644 --- a/merlin/sync/interface.go +++ b/merlin/sync/interface.go @@ -50,6 +50,5 @@ func SyncCompleted(repo *config.Repo, exit int) { if exit == config.SUCCESS { go zfsSync(repo) - go reportMirror(repo) } } diff --git a/merlin/sync/process.go b/merlin/sync/process.go index f26b71e..11d280a 100644 --- a/merlin/sync/process.go +++ b/merlin/sync/process.go @@ -146,15 +146,3 @@ func zfsSync(repo *config.Repo) { } } } - -func reportMirror(repo *config.Repo) { - if !repo.ReportMirror { - return - } - - repo.Logger.Debug("Running report_mirror") - err := exec.Command("/bin/sh", "/home/mirror/bin/report_mirror").Run() - if err != nil { - repo.Logger.Error(fmt.Errorf("Error running report_mirror: %w", err)) - } -}