Репликация геррита висит бесконечно - PullRequest
1 голос
/ 24 марта 2020

У меня проблемы с Gerrit плагином репликации. Я пытаюсь скопировать репозиторий в Gitlab поверх HTTPS . Наиболее важная конфигурация:

etc / replication.config

[gerrit]
        replicateOnStartup = true

[remote "gitlab-mirror"]
        url = https://<name.surname>:<password>@gitlab.domain/<Name.Surname>/${name}.git
        push = +refs/heads/*:refs/heads/*
        push = +refs/tags/*:refs/tags/*
        mirror = true
        projects = hello-world
        rescheduleDelay = 15

Репозиторий на стороне Gitlab существует в: https://gitlab.domain/<Name.Surname>/hello-world

Я даже клонировал репозиторий от Gerrit, добавьте еще один пульт в gitlab, называемый mirror, и отправьте на него без хлопот:

git clone ssh://admin@gerrit.domain:29418/hello-world
git remote add mirror https://<name.surname>:<password>@gitlab.domain/<Name.Surname>/hello-world.git
git push -u mirror --all

Я планирую репликацию следующим образом:

ssh -p 29418 gerrit.domain replication start

, которые выдают следующий журнал:

gerrit      | [2020-03-23 22:01:40,019 +0000] 6c533415 [sshd-SshDaemon[33060020](port=22)-nio2-thread-1] admin a/1000000 LOGIN FROM 172.64.1.1
gerrit      | [2020-03-23 22:01:40,071 +0000] 6c533415 [SSH replication start  (admin)] admin a/1000000 replication.start 7ms 1ms 0
gerrit      | [2020-03-23 22:01:40,102 +0000] 6c533415 [sshd-SshDaemon[33060020](port=22)-nio2-thread-2] admin a/1000000 LOGOUT

Но потом, когда процесс начался, я получил следующую трассировку стека:

gerrit      | [2020-03-23 22:02:04,660] [ReplicateTo-gitlab-mirror-1] ERROR com.googlesource.gerrit.plugins.replication.ReplicationTasksStorage : Error while deleting task d44f53430eda0b204ca13da6aab17c2173531c94
gerrit      | java.nio.file.NoSuchFileException: /srv/gerrit/data/replication/ref-updates/running/d44f53430eda0b204ca13da6aab17c2173531c94
gerrit      |   at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
gerrit      |   at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
gerrit      |   at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
gerrit      |   at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
gerrit      |   at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
gerrit      |   at java.nio.file.Files.delete(Files.java:1126)
gerrit      |   at com.googlesource.gerrit.plugins.replication.ReplicationTasksStorage$Task.finish(ReplicationTasksStorage.java:232)
gerrit      |   at com.googlesource.gerrit.plugins.replication.ReplicationTasksStorage.finish(ReplicationTasksStorage.java:130)
gerrit      |   at com.googlesource.gerrit.plugins.replication.Destination.notifyFinished(Destination.java:574)
gerrit      |   at com.googlesource.gerrit.plugins.replication.PushOne.runPushOperation(PushOne.java:413)
gerrit      |   at com.googlesource.gerrit.plugins.replication.PushOne.lambda$run$0(PushOne.java:300)
gerrit      |   at com.google.gerrit.server.util.RequestScopePropagator.lambda$cleanup$1(RequestScopePropagator.java:182)
gerrit      |   at com.google.gerrit.server.util.RequestScopePropagator.lambda$context$0(RequestScopePropagator.java:170)
gerrit      |   at com.google.gerrit.server.git.PerThreadRequestScope$Propagator.lambda$scope$0(PerThreadRequestScope.java:70)
gerrit      |   at com.googlesource.gerrit.plugins.replication.PushOne.run(PushOne.java:303)
gerrit      |   at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:87)
gerrit      |   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
gerrit      |   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
gerrit      |   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
gerrit      |   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
gerrit      |   at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:610)
gerrit      |   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
gerrit      |   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
gerrit      |   at java.lang.Thread.run(Thread.java:748)

Вот так выглядит каталог данных для репликации (я думаю, что все время):

gerrit:/srv/gerrit$ find data/replication/
data/replication/
data/replication/ref-updates
data/replication/ref-updates/running
data/replication/ref-updates/building
data/replication/ref-updates/waiting
data/replication/ref-updates/waiting/50d5b9f61203cdd9223f21c21de7174f58a89bd3
data/replication/ref-updates/waiting/d44f53430eda0b204ca13da6aab17c2173531c94

Да, Геррит пытается удалить задачу из запуска (я понятия не имею, почему?), Но задача находится в ожидании. Gitlab репозиторий не получает изменений, что является самой большой проблемой.

Я также пробовал событие репликации очереди следующим образом, но это блокирует на неопределенный срок, пока CTRL + C:

ssh -p 29418 gerrit.domain replication start --wait

Любая идея, что я мне не хватает или что еще я могу искать?

...