85 Commits

Author SHA1 Message Date
WANG Ziqin
30259da0f0 fix nil pointer dereference: check err first 2019-08-02 02:15:22 +08:00
WANG Ziqin
4854d9b981 Fix test: initialize dockerHook with embedded provider 2019-07-31 17:29:28 +08:00
WANG Ziqin
06fce98c00 Eliminate duplicate mirrorProvider in Hooks 2019-07-31 16:11:56 +08:00
z4yx
a6fc97889d [bug fix] stalled scheduler if post-sync hook runs for a time which is longer than the sync interval 2019-07-05 16:29:00 +08:00
zyx
9f91d90fc5 check Retry configuration in providers 2019-04-13 11:01:56 +08:00
zyx
1aa4ae9cc1 Merge remote-tracking branch 'kinosang/master' into wip-test-pr 2019-04-13 02:07:41 +08:00
zyx
d0deeb19a9 extract mirror size from rsync provider automatically 2019-04-13 01:27:35 +08:00
zyx
a283328dc4 increase test converage of worker 2019-04-12 09:43:57 +08:00
zyx
1890bbed3c add tests for last commit 2019-04-11 12:36:43 +08:00
zyx
ddc9efd155 report next scheduled sync time 2019-04-11 12:36:18 +08:00
zyx
7eb119b892 singleton of worker is not used, so remove it 2019-04-11 10:07:42 +08:00
zyx
90d419ca66 add tests for last commit 2019-03-31 12:16:45 +08:00
zyx
96cb975412 Let user create ZFS dataset manually due to security considerations 2019-03-31 12:09:42 +08:00
王邈
ff3e690497
Revert "change owner of folder to current user after creating zfs dataset (close #89)"
This reverts commit a58e6d37ae8469ba651ab4b86b8cb4306d180738 and
re-opens #89.

Signed-off-by: 王邈 <shankerwangmiao@gmail.com>
2019-03-26 00:30:06 +08:00
zyx
a58e6d37ae change owner of folder to current user after creating zfs dataset (close #89) 2019-03-25 23:40:04 +08:00
z4yx
c750aa1871 new feature: run "tunasynctl start" with "-f" to override concurrent job limit 2018-05-30 18:59:24 +08:00
Yuxiang Zhang
6cbe91b4f1 new command: jobForceStart 2018-05-30 16:07:07 +08:00
Yuxiang Zhang
89a792986d increase test coverage rate of job & provider 2018-05-30 14:00:10 +08:00
Yuxiang Zhang
0fdb07d061 bug fix: log over-written in twoStageRsyncProvider
solve more DATA RACE problem
2018-05-30 12:28:09 +08:00
Yuxiang Zhang
c5bb172f99 increase test coverage rate of job.go 2018-05-30 11:45:05 +08:00
Yuxiang Zhang
79e6167028 fix race condition on logFile of baseProvider 2018-05-30 01:46:16 +08:00
bigeagle
a475b044c6 feat(worker): add 'use_ipv4' option for rsync provider 2017-09-08 00:15:48 +08:00
bigeagle
a50a360a91 Revert "feat(worker): add '-4' option to rsync when 'use_ipv6' is false"
This reverts commit d536aca2ac42e74a0902546d28b7de0e7f639195.
2017-09-08 00:12:40 +08:00
bigeagle
d536aca2ac feat(worker): add '-4' option to rsync when 'use_ipv6' is false 2017-09-06 23:22:55 +08:00
7IN0SAN9
563860d424
fix #63 2017-03-27 13:09:56 +08:00
bigeagle
939abaef9b
feat(worker): TUNASYNC_LOG_DIR environment variable 2016-12-18 20:41:26 +08:00
bigeagle
d5a438462f
feat(worker): map current uid and gid to docker 2016-12-18 14:28:48 +08:00
bigeagle
d4e07a7b29
fix(worker): keep the same working dir inside and outside of docker 2016-12-18 14:28:32 +08:00
bigeagle
fd277388d5
fix(worker): fixed multi-manager configuration
the worker must be registerred on the manager

`extra_status_manager` option is replaced by `api_base_list`, which overrides the `api_base` option
2016-12-12 23:17:50 +08:00
bigeagle
7601e5793f
fix(worker): improved cgroup creation 2016-12-10 04:14:39 +08:00
bigeagle
9645fd44ec ci(travis): Enabled docker on travis 2016-12-10 03:48:03 +08:00
bigeagle
ebd462be36
feat(worker): Implemented docker executor, close #55
if docker is enabled in configure file and `docker_image` is set on mirror config, the command would

be executed via `docker run ...`
2016-12-10 02:44:45 +08:00
bigeagle
21c832c8fb fix(worker): disabled memory limit
rsync memory is nolonger limited
2016-12-09 23:07:05 +08:00
bigeagle
a0b8ef08ab feat(worker): implemented extra_status_manager option to enable a worker reporting status to multi 2016-12-06 23:59:15 +08:00
bigeagle
86153c59e3
feat(worker): ZFS support: isolate mirrors in zfs datasets 2016-12-05 00:44:55 +08:00
bigeagle
96f9db8bb8
fix(worker): extended rsync memory limit to 512MB 2016-12-04 22:56:48 +08:00
bigeagle
add7b936e3 refactor(cmd): pinning cli.v1 2016-11-20 00:01:47 +08:00
bigeagle
2b83ea4b45 feat(worker): added global exec_on_success and exec_on_failure options
if `exec_on_success` is set on mirror-level config, it overrides the global option; if on mirror

level, extra hook cmd is needed, use `exec_on_success_extra` option
2016-10-21 01:20:31 +08:00
bigeagle
437acd3f01
fix(worker): cgroup hook now ensure child progresses are killed 2016-08-02 21:55:41 +08:00
bigeagle
c8af09f129
fix(worker): fix log file leakage of two-stage-sync provider. closing #36 2016-08-02 21:39:16 +08:00
bigeagle
d292f9b0e3
feat(tunasync): add tunasynctl reload subcommand 2016-06-15 14:01:10 +08:00
bigeagle
613d46e4e3
fix(worker): fix resource leakage caused by time.Tick(), closing #33 2016-06-15 00:31:53 +08:00
bigeagle
ebeee6bc34
feat(worker): added username option for rsync providers 2016-06-14 21:37:03 +08:00
bigeagle
f6d53c16d6 fix(worker): do not init cgroup if it's not enabled 2016-05-19 11:42:22 +08:00
bigeagle
28c8145137
feature(worker): limit rsync memory using cgroup 2016-05-08 17:24:41 +08:00
bigeagle
ccc31d9289
refactor(worker): added Type() method to provider 2016-05-08 16:26:58 +08:00
bigeagle
5c8d90608c
feature(worker): implemented multi-file configrations. closing #23 2016-05-03 16:52:38 +08:00
bigeagle
5b5f020075
style(worker): put exported methods together 2016-05-02 22:19:02 +08:00
bigeagle
76ad3d40d6
feature(worker): when SIGINT/SIGTERM received, stop all the jobs and update their status before quit. Close #19. 2016-05-02 22:16:49 +08:00
bigeagle
65984053eb
fix(worker): fixed scheduling bugs 2016-05-02 18:56:45 +08:00