You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mirror/merlin
Andrew Wang 9f2cce23c8 csc-sync-debian quickfix 8 months ago
..
arthur modify arthur status message 9 months ago
cmd/arthur modify arthur status message 9 months ago
config fix up csc-sync-debian 8 months ago
logger Bump version, add verbosity and dry run options 9 months ago
sync csc-sync-debian quickfix 8 months ago
test fix gitignore 2 years ago
.gitignore write merlin.go 2 years ago
Handoff.md fix up csc-sync-debian 8 months ago
README.md fix up csc-sync-debian 8 months ago
go.mod Bump version, add verbosity and dry run options 9 months ago
go.sum Bump version, add verbosity and dry run options 9 months ago
merlin-config-all.ini fix up csc-sync-debian 8 months ago
merlin-config-test.ini fix up csc-sync-debian 8 months ago
merlin-config.ini fix up csc-sync-debian 8 months ago
merlin-go.service finalize move and add report_mirror 8 months ago
merlin.go Move more repos to merlin-go 9 months ago

README.md

Merlin

Build Status

This folder contains the code for merlin (which does the actual syncing) and arthur (which sends commands to merlin).

Check out the the mirror env for a testing environment

Usage

go build merlin.go

Then configure merlin-config.ini and run using ./merlin

Nice Features To Add

  • detect if an rsync process is stuck (watch the stdout/stderr of the rsync processes)
  • get the config or the rsync command that a repo will sync with using a cli tool
  • improve conversion from exit status enum to string
  • 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
  • implementation of trace is ad hoc and can be improved

Completed

  • add bwlimit option for each rsync process
  • write process manager
  • save state (last attempted time, last attempted status) for each repo, and restore state on startup (e.g. use JSON/INI file for each repo)
  • calculate difference between the scheduled time of a job and the time at which it actually ran; log this
  • add all repos to merlin-config.ini (*)
  • handle termination signals in merlin (SIGINT, SIGTERM); close stopChan for this
  • listen on Unix socket in merlin
  • implement arthur.go (commands: sync and status)
  • allow dynamic reloading in merlin
  • use separate log file for each child process (currently sharing stdout/stderr with parent)
  • implement zfssync in merlin (just invoke the existing Python script)