Background trees sync creates grpc connection with
`grpc.WithDefaultCallOptions(grpc.WaitForReady(true))` option. When grpc
connection created with this option, client will wait until a connection
becomes available or the RPC's deadline is reached. As background sync
has no timeout in context, so in case of client is in TRANSIENT_FAILURE
RPC call will hang forever.
Change-Id: I17c8c1d2779bb81c541f47dd0e558e0b8ed2e7c1
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
It is not used and not tested properly, so drop it.
Change-Id: I7c90c7391ecb4be17459415d209811ba1a693f7a
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
* The bearer token must always be validated, regardless of whether it has been impersonated;
* Fix unit-tests for tree service which check verification with bearer token.
Close#1721
Change-Id: I5f715c498ae10b2e758244e60b8f21849328a04f
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
* Fix print format for primary and additional subject keys
from frostfsid contract. Since the format corresponds to
`neo-go wallet dump-keys` output format.
Change-Id: I9ae9fd43bfb378970786b97bd3d9d7f739466ae6
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
Ensured correct object status if the object is not found on a node.
Fixed regression introduced in #1450.
Besides an object not being found on any shard, it also important to
remove it anyway in order to populate the metabase indexes because
they are responsible for the correct object status, i.e., the status
will be `object not found` without the indexes, the status will be
`object is already removed` with the indexes.
Change-Id: I6237fbc0f8bb0c4f2a51ada3a68f52950050e660
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
- Use the same storage engine in multiple parallel tests
- Move `Lock`, `Inhume`, `Head` calls to separate functions
Change-Id: I00849c1f068f0ab8d92061719d67d6fe786200db
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
Removed an invalid test case which used exclusive options, added
object status check after removal.
Change-Id: I4551c0e4532fb669ee6c72871dc4bd34707d8469
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
If context has already been canceled, then there is no need to check other shards.
At the same time, it is necessary to avoid handling context cancellation
in each handler. Therefore, the context check has been moved to the shard
iteration method, which now returns an error.
Change-Id: I70030ace36593ce7d2b8376bee39fe82e9dbf88f
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Do not push request to schedule queue, if context is already cancelled.
Change-Id: Ieef837a7d423158e3dbb0c3b4efecaa20744c845
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Allows updating the list of public keys authorized to invoke
'Tree service' operations without restarting the node.
Change-Id: I01b6e05875b7ae3f3218062eb12bf9755e87f2a3
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
See https://go-critic.com/overview#checkers-from-the-diagnostic-group for
list of default enabled checkers.
`ifElseChain` disabled as it generates doubtful issues.
Change-Id: I5937b116d9af8b3cdf8b06451c4904d0b3f67f68
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
See https://go-critic.com/overview#unlambda for details.
Change-Id: Iccb2d293ce31a302fcbb2c3f9c55c9b3fa554db5
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
See https://go-critic.com/overview#assignop for details.
Change-Id: I839446846437c8c74c119d8b5669f5b866c247dc
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
See https://go-critic.com/overview#elseif for details.
Change-Id: I8fd3edfacaeea2b0a83917575d545af7e7ab4d13
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
See https://go-critic.com/overview#unslice for details.
Change-Id: I6d21e8ce1c9bae56099dc203f5080b0e3ea0c1ef
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Return `object is locked` error if object doesn't exists but is
locked, since the locked index may be populated even when the object
itself doesn't exist.
Change-Id: If1a145c6efead9873acd33bb4fd22cf6175cbabd
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
To group all `compression_*` parameters together.
Change-Id: I11ad9600f731903753fef1adfbc0328ef75bbf87
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
`HandleExpiredLocks` gets read lock, then `shard.Close` tries to acquire
write lock, but `HandleExpiredLocks` calls `inhumeUnlockedIfExpired` or
`selectExpired`, that try to acquire read lock again.
Change-Id: Ib2ed015e859328045b5a542a4f569e5e0ff8b05b
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Allowed reading an RPC endpoint from a configuration file when
getting current epoch in the `object lock` and `bearer create`
commands.
Close#1703
Change-Id: Iea8509dff2893a02cb63f695d7f532eecd743ed8
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
To prevent race between GC handlers and close.
Change-Id: I06219230964f000f666a56158d3563c760518c3b
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
`BlockExecution` and `ResumeExecution` were used only by unit test.
So drop them and simplify code.
Change-Id: Ib3de324617e8a27fc1f015542ac5e94df5c60a6e
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Target config created on level above, so limiter is always nil.
Change-Id: I1896baae5b9ddeed339a7d2b022a9a886589d362
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Commit checker is now configured globally for all Gerrit repositories:
TrueCloudLab/jenkins#16
This allows us to execute commit-checker independently from the rest of
CI suite and re-check commit message format without rerunning other
tests.
Change-Id: Ib8f899b856482a5dc5d03861171585415ff6b452
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>