Lock errors #245

Closed
opened 2025-12-28 17:36:42 +00:00 by sami · 4 comments
Owner

Originally created by @KirillovDenis on GitHub (Jun 6, 2022).

Originally assigned to: @KirillovDenis on GitHub.

Node version nspcc-dev/neofs-node@4a50bdfa00

The problem seems to be similar to https://github.com/nspcc-dev/neofs-node/pull/1472/commits

  • s3tests_boto3.functional.test_s3:test_object_lock_get_obj_retention
  • s3tests_boto3.functional.test_s3:test_object_lock_get_obj_retention_iso8601
  • s3tests_boto3.functional.test_s3:test_object_lock_get_obj_metadata
  • s3tests_boto3.functional.test_s3:test_object_lock_uploading_obj

Test tries to remove locked object using bypass (in NeoFS the lock cannot be deleted):

  • s3tests_boto3.functional.test_s3:test_object_lock_put_obj_retention_versionid

Test tries to short the until date (in NeoFS the lock cannot be deleted):

  • s3tests_boto3.functional.test_s3:test_object_lock_put_obj_retention_shorten_period_bypass

related to #501

Originally created by @KirillovDenis on GitHub (Jun 6, 2022). Originally assigned to: @KirillovDenis on GitHub. Node version https://github.com/nspcc-dev/neofs-node/commit/4a50bdfa008fefe139eabdf2bebf6899c1f53de1 The problem seems to be similar to https://github.com/nspcc-dev/neofs-node/pull/1472/commits * s3tests_boto3.functional.test_s3:test_object_lock_get_obj_retention * s3tests_boto3.functional.test_s3:test_object_lock_get_obj_retention_iso8601 * s3tests_boto3.functional.test_s3:test_object_lock_get_obj_metadata * s3tests_boto3.functional.test_s3:test_object_lock_uploading_obj Test tries to remove locked object using bypass (in NeoFS the lock cannot be deleted): * s3tests_boto3.functional.test_s3:test_object_lock_put_obj_retention_versionid Test tries to short the until date (in NeoFS the lock cannot be deleted): * s3tests_boto3.functional.test_s3:test_object_lock_put_obj_retention_shorten_period_bypass related to #501
sami 2025-12-28 17:36:42 +00:00
Author
Owner

@KirillovDenis commented on GitHub (Jun 8, 2022):

The following tests will fail anyway because they try to delete object (that is locked) but NeoFS doesn't allow this.

  • s3tests_boto3.functional.test_s3:test_object_lock_get_obj_retention
  • s3tests_boto3.functional.test_s3:test_object_lock_get_obj_retention_iso8601
  • s3tests_boto3.functional.test_s3:test_object_lock_get_obj_metadata
  • s3tests_boto3.functional.test_s3:test_object_lock_uploading_obj

But there is another problem: missed retention lock info if both lock types are provided.
We need use if instead of else if
nspcc-dev/neofs-s3-gw@8f23f4fbc4/internal/neofs/tree.go (L910)

@KirillovDenis commented on GitHub (Jun 8, 2022): The following tests will fail anyway because they try to delete object (that is locked) but NeoFS doesn't allow this. * s3tests_boto3.functional.test_s3:test_object_lock_get_obj_retention * s3tests_boto3.functional.test_s3:test_object_lock_get_obj_retention_iso8601 * s3tests_boto3.functional.test_s3:test_object_lock_get_obj_metadata * s3tests_boto3.functional.test_s3:test_object_lock_uploading_obj But there is another problem: missed retention lock info if both lock types are provided. We need use `if` instead of `else if` https://github.com/nspcc-dev/neofs-s3-gw/blob/8f23f4fbc41ec2a42523a2883bd81ff9d4152807/internal/neofs/tree.go#L910
Author
Owner

@KirillovDenis commented on GitHub (Jun 8, 2022):

I suppose we can close this issue by marking tests as failed (in compatibility table). Or we can postpone this if the lock removal policy will be changed

@KirillovDenis commented on GitHub (Jun 8, 2022): I suppose we can close this issue by marking tests as failed (in compatibility table). Or we can postpone this if the lock removal policy will be changed
Author
Owner

@alexvanin commented on GitHub (Jun 9, 2022):

Try these tests on master branch. Just wonder if they gonna fail too.
Branch with LOCK fix in neofs-node.

@alexvanin commented on GitHub (Jun 9, 2022): Try these tests on master branch. Just wonder if they gonna fail too. Branch with LOCK fix in neofs-node.
Author
Owner

@KirillovDenis commented on GitHub (Jun 9, 2022):

Some of this tests pass on master branch because of nspcc-dev/neofs-s3-gw@0e27fea8f2/api/handler/delete.go (L89-L92) IsErrObjectLocked doesn't work as expected.
nspcc-dev/neofs-s3-gw@0e27fea8f2/api/handler/delete.go (L143-L151)

In tree-service branch this was fixed
nspcc-dev/neofs-s3-gw@575947e035/api/handler/delete.go (L144-L152)

@KirillovDenis commented on GitHub (Jun 9, 2022): Some of this tests pass on `master` branch because of https://github.com/nspcc-dev/neofs-s3-gw/blob/0e27fea8f21c0f104f8fbf1d6bfda244e6b8b344/api/handler/delete.go#L89-L92 `IsErrObjectLocked` doesn't work as expected. https://github.com/nspcc-dev/neofs-s3-gw/blob/0e27fea8f21c0f104f8fbf1d6bfda244e6b8b344/api/handler/delete.go#L143-L151 In `tree-service` branch this was fixed https://github.com/nspcc-dev/neofs-s3-gw/blob/575947e03567506d1713328430c038fc6763b077/api/handler/delete.go#L144-L152
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-s3-gw#245
No description provided.