| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-2.14:
Fix creating missing repository
Fix project deletion logs
Use logger built-in formatter
Fix project creation logs
Change-Id: Idacfd3fa54d7ff5e974bc8dae41979d1f0d9b6b5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When replicating to a destination where the repository does not exist,
updating the HEAD reference failed because the passed reference name was
not absolute. When this happened, an unchecked exception was triggered
but never showed in the logs. In fact, the replication logs were showing
only the message announcing the replication started, but no additional
information about the success or failure of the operation was displayed.
Avoid this by resolving symbolic references and checking the reference
is absolute before trying to update the HEAD in the new repository.
Change-Id: I18295a37a04413ba64bf7e9ee31640ee23c4c1e0
|
| |
| |
| |
| |
| |
| | |
Log was showing project was deleted successfully even if it failed.
Change-Id: I7be19991619ce1f205884a8b6658d9a7ed4109c7
|
| |
| |
| |
| | |
Change-Id: I6b46309f07ca4c402ae7a51cfb462c1be6bec333
|
| |
| |
| |
| |
| |
| | |
Log was showing project was created successfully even if it failed.
Change-Id: Ie37e6f2f58e1c8b4e33f61bf2d81ee43698b8aa3
|
| |
| |
| |
| | |
Change-Id: Ie7fef1b311f6f7fe14aa79c6023b897d91127087
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The issue fixed by this commit was fixed in a different way on the
stable-2.14 branch. Reverting this on stable-2.15 will make the merge
from stable-2.14 easier.
This reverts commit e145010de7911623c98e6111537ffa4997d1a82e.
Change-Id: I7e44f62f119b7ed26c8d96bfe9ef8442ff687b29
|
|\|
| |
| |
| |
| |
| |
| | |
* stable-2.14:
Document how to exclude projects from replication
Change-Id: I2189f3aabcdc5ee3ca8204886a6c7686af626c04
|
| |
| |
| |
| | |
Change-Id: I8a12011e28be44d600a3ed63eebe596560d73e5f
|
| |
| |
| |
| |
| |
| | |
Change-Id: I2c9dc06927cd8e9e541eb032829029bdfac8db6e
Signed-off-by: Edwin Kempin <ekempin@google.com>
(cherry picked from commit 93ab1609a4ba32e9466ff0649317b84a211285ad)
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-2.14:
Fix minor nits in documentation of replication.maxRetries
Fix replication retries when maxRetries is set to 0
Set max retries to avoid queue congestion
Change-Id: I303d3b471bc98eaead33cfa49d614b176cf34f58
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-2.13:
Fix minor nits in documentation of replication.maxRetries
Fix replication retries when maxRetries is set to 0
Set max retries to avoid queue congestion
Change-Id: Icf972f3df7d3d59925db670bc1f033028306d0c1
|
| | |
| | |
| | |
| | | |
Change-Id: I80e46269e12b9e7a429634dd90ce52e90cc6ad79
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
maxRetries defaults to 0 which means retry indefinitely but it was not
retrying.
Change-Id: I6c8d8d6b1511d67b647f25193dcfe860687eea76
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When servers have *a lot* of remote slaves, some of them
unstable and potentially offline, a maximum retry policy is
needed to prevent push events to stay in the replication queue
and getting rescheduled forever.
Keep backward-compatible configuration by setting maxRetry
by default to zero, which means disabled.
Change-Id: I060cc7bc3a4d1089b0815db02d2e1430f83a2015
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Wrong name of HEAD reference was used when repository was created after
RepositoryNotFoundException. This results in HEAD pointing to HEAD.
Change-Id: I647618fc6d35a5e2ff6bcfeda5084584e591ddda
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
|
|\ \ \ |
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* stable-2.14:
Fix minor nits in documentation of replication.maxRetries
Use rescheduleDelay instead of replicationDelay when rescheduling
Fix race condition when scheduling a replication
Change-Id: I45c6f5a266709e2ce85d2140f13e4ece7da69341
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I80e46269e12b9e7a429634dd90ce52e90cc6ad79
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The replicationDelay was used for two purposes:
a) initial delay to schedule a replication
b) delay when rescheduling the replication due to an in-flight push
The replicationDelay could be set to zero, which make sense for the case a) but
doesn't make sense for the case b). Actually, when replicationDelay is set to
zero, the case b) will cause an excessive number of retries (over 1K/second) and
will also fire a replication failed event for each retry. The latter is yet
another issue and will be addressed in another change.
Introduce a new config parameter rescheduleDelay and use it for the
case b). Make sure it cannot bet set to a value lower than 3 seconds to
avoid the same issue.
In order to keep backwards compabitility with using the replicationDelay
as rescheduleDelay, a plugin init step is added. For each remote section
which doesn't already define rescheduleDelay, it will set rescheduleDelay
to the current value of the replicationDelay, unless replicationDelay is
set to zero. In the latter case it will assume the default value for
the rescheduleDelay.
Change-Id: Ia78f46460b531b04ee36ec2d5ab4228dba5c0c50
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The state of PushOne object was modified after the operation was scheduled.
Depending on the delay parameter the PushOne.run() could be called before (when
the delay is zero or close to zero) or after (longer delay) the current thread
calls e.addState(ref, state). Thus, the thread executing PushOne.run() may or
may not see the update of its stateMap. Further, the stateMap is a
LinkedListMultimap which is not thread safe and the PushOne doesn't synchronize
access to it.
Change-Id: Ib26a5933a7993a6d2f0501e5daaf06a7892e597f
|
|/ / /
| | |
| | |
| | | |
Change-Id: Ie7dc1b22f087ebb8f7aeb17def43a476745686c6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit refactors callers to use PermissionBackend instead of
RefControl#isVisible and adds handling for PermissionBackendException on
EventDispatcher#postEvent.
Change-Id: Ic6378b0fd88cc770b061c551d0511d352a9f3d61
|
| | |
| | |
| | |
| | | |
Change-Id: I740e70aa799b5cc5e74ed86054876d1baa753373
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I5a8440372e10fcb7d0232aa3ede64f6eae43563b
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| | |
| | |
| | |
| | | |
Change-Id: Iebed5fb06f45760ce73e47cc203e4bcd8634db8e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Core server has stopped including the CapabilityControl.Factory on
every CurrentUser instance. It is no longer necessary to receive this
in the constructor for the base class.
Change-Id: Icd78338d484f57805ec59ea0f3e0770a1e948e4b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The core server is now creating VisibleRefFilter with an assisted
injection factory, reducing the arguments provided by callers.
Change-Id: I5f230604b37c675b4751984c7af26d4701d6f8c4
|
| | |
| | |
| | |
| | | |
Change-Id: I98f1ef7d4622bd0394437355e5f6d896d035d0a8
|
| | |
| | |
| | |
| | | |
Change-Id: Ic4b4003a78205f4e34d656f5462a529e536f0b5a
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I7832acee3d901457330d240200212bef04da32ac
|
|/ / /
| | |
| | |
| | | |
Change-Id: Idfe060d260eb0343d0766f4c6d6cea6cfbf733bb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently when replicating to another Gerrit instance replication plugin
requires also system SSH access in order to create, delete and update
HEAD reference of replicated project. For those three operations plugin
will execute system commands over SSH.
When other site of replication is also a Gerrit server we can use its
SSH API to perform operations mentioned above. Then we drop dependency
on system SSH access.
In order to set up a SSH connection between two Gerrit instances, one
must generate ssh-key-pair with empty passphrase. Then this key-pair can
be set to be used for connecting to explicitly configured destination
host.
TEST PLAN:
To test this patch it is recommended to generate new ssh-key-pair and
configure the ssh client like follows:
* ssh-keygen -f ~/.ssh/empty-passphrase
* echo "Host localhost\n\tPort 29419\n\tIdentityFile ~/.ssh/empty-passphrase" >> ~/.ssh/config
Then set up a second Gerrit instance (set up sshd to listen on port
29419) which will be the replication destination and create
replication user with public ssh-key from ~/.ssh/empty-passphrase.pub.
On the replication master server etc/replication.config needs to be
adjusted as well:
[remote "other-gerrit"]
url = ssh://$replication_user@localhost:29419/${name}.git
adminUrl = gerrit+ssh://$replication_user@localhost:29419/
After starting both instances creating a project in the master will
result in the same project created on the replication destination.
Of course Gerrit access rights still apply, therefore $replication_user
should have create project capability and push rights.
Change-Id: I677f7bd1164be259916c8cebdd4ddeee469402a3
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move ssh related code out from ReplicationQueue into separate class
SshHelper. Later on the same code could be used to interact with other
git server that does not support shell access, but allow to execute
build in commands (like eg. Gerrit does).
Change-Id: I07c142a58571f71bf8765d956c6050b36d2e44fc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We send replication started notification for each attempt to push.
If the push fails with a reason TRANSPORT_ERROR or REPOSITORY_MISSING,
it will be retried until it succeed (endless loop in case
TRANSPORT_ERROR that occurs forever).
For each new re-try we will send another replication started
notification for that branch, but we will miss the notification
about failed attempt completed. This patch adds the missing
notification.
This fixes notification on push to replica that is down.
Change-Id: I6d5d06fbc081df2d9a32973af73f6a2136d51731
Signed-off-by: Eryk Szymanski <eryksz@gmail.com>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-2.14:
Fix replication retries when maxRetries is set to 0
Change-Id: I3d2986f1707bf1b60675ea28fe3dbcc8dfb04681
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
maxRetries defaults to 0 which means retry indefinitely but it was not
retrying.
Change-Id: I6c8d8d6b1511d67b647f25193dcfe860687eea76
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Gerrit core is hiding methods on ProjectControl to transition to
PermissionBackend. Replace use of isReadable and allRefsAreVisible,
checking ACCESS and READ permission instead.
Change-Id: Ib426d14d6a535cbe2ebcfba456bc2cc094311ed7
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When starting replication from the command line, each replication task
is scheduled with the per remote replicationDelay. This delay is
considered a batching mechanism for user driven events. However,
scripts may desire to trigger replication without caring about batching.
In particular, a script may want to replicate a bunch of updates to many
projects serially for throttling reasons using the --wait option.
However, with a long list of projects to replicate the per project
replication delay can quickly add up to a lot of wasted time (too much
throttling). By adding a --now option which starts replicating without
delay, it is possible for a script to control (generally along with the
--wait option) replication throttling very accurately.
Change-Id: I35b4386f53112ffa7c886ad345e5fabb97273aa9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a push operation is not retried anymore, remove it from
the pending queue as well and log the error on replication.log.
Failing to do so, it would result in the destination to refrain from
retrying again at then next Gerrit event.
Change-Id: I1f3dd4011e2822a2e0b52037fcb130e820af156f
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When servers have *a lot* of remote slaves, some of them
unstable and potentially offline, a maximum retry policy is
needed to prevent push events to stay in the replication queue
and getting rescheduled forever.
Keep backward-compatible configuration by setting maxRetry
by default to zero, which means disabled.
Change-Id: I060cc7bc3a4d1089b0815db02d2e1430f83a2015
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I7884ab98ed1d2baa1776b2bb032ce338e8f88bc9
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| | |
* stable-2.13:
ReplicationMetrics: Make members private final
Change-Id: Icf7dd3f5c9dd518c8984546aba9708525a428f79
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These members should only be accessed through the public methods:
- start(...), to create/start a new timer context
- record(...), to record the retry/delay values
Mark the members as private final to prevent unintended access.
Change-Id: I69a7e3b13ba4c344f3176528306163ebef07653c
|
| |
| |
| |
| | |
Change-Id: I8d083b35dd00a27644c0415655ae87a24325e376
|
| |
| |
| |
| | |
Change-Id: I071208a8106205402f63f8998ce1a02858067447
|
| |
| |
| |
| | |
Change-Id: Idf31346cdba78e897ff8d6427a2b929eb890c7fe
|
| |
| |
| |
| |
| |
| |
| | |
We previously used 'test' to prefix tests but have decided to stop this.
This change removes the prefix from all test code.
Change-Id: I42e6191ece7872f4647e425e3ca0acf8c6452412
|