mirror/merlin/README.md

1.7 KiB

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

In Progress

  • implement all sync types (csc-sync-debian, csc-sync-apache, etc.)
  • use separate log file for each child process (currently sharing stdout/stderr with parent)
  • listen on Unix socket in merlin
  • implement arthur.go (commands: sync and status)
  • implement zfssync in merlin (just invoke the existing Python script)

TODO

  • allow dynamic reloading in merlin (*)
  • detect if an rsync process is stuck (**)
  • place each rsync process in a separate cgroup (***)

TODO FOR SYNC SCRIPTS

  • apache
  • archlinux
  • badperms
  • cdimage
  • ceph
  • chmod
  • debian
  • debian-cd
  • gentoo
  • s3
  • ssh
  • standard
  • standard-ipv6
  • wget

* This is optional because the current version of merlin doesn't support it. If it turns out to be complicated, then don't worry about it. If you decide to implement it, use SIGHUP as the reload signal.

** This is optional. If you decide to implement it, you may want to watch the stdout/stderr of the rsync process.

*** I need to do more research into this - don't worry about it for now.

Completed

  • 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

* there are some parts that I don't understand (trace_host, csc-sync-ceph, csc-sync-saltstack, etc)