noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

Account should get deleted with uid:gid combination instead of accesskey

Open ramya-c3 opened this issue 1 year ago • 10 comments

Environment info

NooBaa Version: 5.15 Platform: Linux

Account should get deleted with uid:gid combination instead of accesskey

Actual Behaviour:

Command :

node src/cmd/manage_nsfs account delete --config_root /ibm/fs1/ces/s3-config --access_key a-abcdefghijklmn123456 Oct-25 22:35:57.649 [/2815112] [LOG] CONSOLE:: Resource deleted : a-abcdefghijklmn123456 [root@ramya-sc-worker noobaa-core]# node src/cmd/manage_nsfs account list --config_root /ibm/fs1/ces/s3-config Oct-25 22:36:00.737 [/2815218] [LOG] CONSOLE:: []

Expected Behaviour: uid:gid should be used for deletion

Command :

node src/cmd/manage_nsfs account delete —uid:gid 1092:1093 Oct-25 22:35:57.649 [/2815112] [LOG] CONSOLE:: Resource deleted : a-abcdefghijklmn123456 [root@ramya-sc-worker noobaa-core]# node src/cmd/manage_nsfs account list --config_root /ibm/fs1/ces/s3-config Oct-25 22:36:00.737 [/2815218] [LOG] CONSOLE:: []

ramya-c3 avatar Nov 13 '23 06:11 ramya-c3

@ramya-c3 why do we want to delete an account with a specific UID:GID? and if we will actually do that, how will it behave? will it delete all the accounts that have this UID:GID set?

liranmauda avatar Nov 13 '23 07:11 liranmauda

@liranmauda Ramya said in the last HPO meeting that they want all the accounts having this uid and gid pair to get deleted. They asked it because it was a requirement also on HPO.

romayalon avatar Nov 28 '23 21:11 romayalon

Thanks @romayalon for clearing this out. I never saw such a requirement, and I am not convinced that we should add it to the CLI. I will take it with @nimrod-becker @ramya-c3 can you describe the use case?

liranmauda avatar Nov 29 '23 07:11 liranmauda

In case if user want to delete list of accounts based on uid:gid then this use case helps. instead of deleting each one this will be quicker solution

ramya-c3 avatar Nov 29 '23 07:11 ramya-c3

@liranmauda @ramya-c3 As we discussed in today's meeting, delete by uid:gid will be replaced by list by uid:gid pair.

romayalon avatar Dec 20 '23 13:12 romayalon

#7673 was created to support this by list accounts

guymguym avatar Dec 21 '23 13:12 guymguym

@ramya-c3 Re opening for validation

liranmauda avatar Jan 02 '24 09:01 liranmauda

[root@r-12 noobaa-core]# node src/cmd/manage_nsfs account delete --uid 23 --gid 23 2>/dev/null { "error": { "code": "InvalidArgument", "message": "Invalid argument", "detail": "uid, gid invalid options for account delete, please use only: name, access_key, config_root" } }

ramya-c3 avatar Feb 14 '24 05:02 ramya-c3

@ramya-c3 see my comment, on the HPO meeting we decided that we will support list by uid:gid instead of delete by uid:gid

As we discussed in today's meeting, delete by uid:gid will be replaced by list by uid:gid pair.

romayalon avatar Feb 14 '24 06:02 romayalon

@ramya-c3 did you see my last comment?

romayalon avatar Feb 26 '24 09:02 romayalon

There is a workaround that can be used for this handling - list with uid:gid then delete with retrieved accesskey.

madhuthorat avatar May 02 '24 15:05 madhuthorat