Non-split objects are not being protected by lock object #543

Closed
opened 2023-07-26 14:50:21 +00:00 by alexvanin · 0 comments
Owner

Expected Behavior

Lock object restricts delete operation on locked (non-split) objects.

Current Behavior

Delete operation returns successful code on locked (non-split) object.

Steps to Reproduce (for bugs)

  1. Create a container
$ frostfs-cli container create -r s01.frostfs.devenv:8080 -w ../frostfs-dev-env/wallets/wallet.json --policy 'REP 2' --await
Enter password > 
container ID: HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ                      
awaiting...                 
container has been persisted on sidechain
  1. Upload non-split object
$ frostfs-cli object put -r s01.frostfs.devenv:8080 -w ../frostfs-dev-env/wallets/wallet.json --cid HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ --file ./Makefile 
Enter password >
[./Makefile] Object successfully stored
  OID: CQRRycB82hDJe8hcGEypY1MrEBPfe2WFFrZeyRcjsSCK
  CID: HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ
  1. Lock object
$ frostfs-cli object lock -r s01.frostfs.devenv:8080 -w ../frostfs-dev-env/wallets/wallet.json --cid HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ --oid CQRRycB82hDJe8hcGEypY1MrEBPfe2WFFrZeyRcjsSCK --expire-at 100500 
Enter password > 
Lock object ID: DXKsjz81ihhz9tUDuYSD8D9u8pN5tB121w223zckTFuV
Objects successfully locked.
  1. Try to remove upload object
$ frostfs-cli object delete -r s01.frostfs.devenv:8080 -w ../frostfs-dev-env/wallets/wallet.json --cid HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ --oid CQRRycB82hDJe8hcGEypY1MrEBPfe2WFFrZeyRcjsSCK
Enter password > 
Object removed successfully.
  ID: F3mkzhCnGZ6SQHBvo9G4jwfgtBrCCdaGTgRmgE3Z377x
  CID: HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ

Context

Found regression in a S3 test when governance lock is set, but object is removable.

Regression

The test was broken in between 2023-07-12 and 2023-07-18

Your Environment

frostfs-node 5a4054e

## Expected Behavior Lock object restricts delete operation on locked (non-split) objects. ## Current Behavior Delete operation returns successful code on locked (non-split) object. ## Steps to Reproduce (for bugs) 1. Create a container ``` $ frostfs-cli container create -r s01.frostfs.devenv:8080 -w ../frostfs-dev-env/wallets/wallet.json --policy 'REP 2' --await Enter password > container ID: HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ awaiting... container has been persisted on sidechain ``` 2. Upload non-split object ``` $ frostfs-cli object put -r s01.frostfs.devenv:8080 -w ../frostfs-dev-env/wallets/wallet.json --cid HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ --file ./Makefile Enter password > [./Makefile] Object successfully stored OID: CQRRycB82hDJe8hcGEypY1MrEBPfe2WFFrZeyRcjsSCK CID: HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ ``` 3. Lock object ``` $ frostfs-cli object lock -r s01.frostfs.devenv:8080 -w ../frostfs-dev-env/wallets/wallet.json --cid HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ --oid CQRRycB82hDJe8hcGEypY1MrEBPfe2WFFrZeyRcjsSCK --expire-at 100500 Enter password > Lock object ID: DXKsjz81ihhz9tUDuYSD8D9u8pN5tB121w223zckTFuV Objects successfully locked. ``` 4. Try to remove upload object ``` $ frostfs-cli object delete -r s01.frostfs.devenv:8080 -w ../frostfs-dev-env/wallets/wallet.json --cid HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ --oid CQRRycB82hDJe8hcGEypY1MrEBPfe2WFFrZeyRcjsSCK Enter password > Object removed successfully. ID: F3mkzhCnGZ6SQHBvo9G4jwfgtBrCCdaGTgRmgE3Z377x CID: HzuG4y8zsRbasowXfdHY7zvrSqa8Z41dFa3j6QXh3ijQ ``` ## Context Found regression in a S3 test when governance lock is set, but object is removable. ## Regression The test was broken in between 2023-07-12 and 2023-07-18 ## Your Environment frostfs-node 5a4054e
alexvanin added the
bug
triage
labels 2023-07-26 14:50:21 +00:00
fyrchik was assigned by alexvanin 2023-07-26 14:50:21 +00:00
dstepanov-yadro self-assigned this 2023-07-26 15:49:55 +00:00
fyrchik was unassigned by dstepanov-yadro 2023-07-26 15:49:59 +00:00
fyrchik added
frostfs-node
and removed
triage
labels 2023-07-27 17:02:49 +00:00
fyrchik added this to the v0.37.0 milestone 2023-07-27 17:04:39 +00:00
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: TrueCloudLab/frostfs-node#543
No description provided.