irods / irods_rule_engine_plugin_logical_quotas

BSD 3-Clause "New" or "Revised" License
1 stars 9 forks source link

Cannot remove data object with single quotation mark in name #94

Closed ll4strw closed 3 weeks ago

ll4strw commented 10 months ago

Bug Report

Start monitoring a collection using the quota REP, for instance

imeta ls -C .
AVUs defined for collection /zone/home/testuser:

----
attribute: irods::logical_quotas::maximum_size_in_bytes
value: 21474836480
units: 
----
attribute: irods::logical_quotas::total_number_of_data_objects
value: 6
units: 
----
attribute: irods::logical_quotas::total_size_in_bytes
value: 99079
units: 

then try adding to the monitored collection a data object whose name contains a single quotation mark.

iput test1 "just testin'" completes without errors and the file test1 is successfully transferred on the server. However, irm -f "just testin'" returns

remote addresses: x.x.x.x ERROR: rmUtil: rm error for /zone/home/testuser/just testin', status = -1205000 status = -1205000 RE_RUNTIME_ERROR
Level 0: no good replica found: Unknown error -166000

Originally reported at https://github.com/irods/irods/issues/7164.

trel commented 10 months ago

ils of the data object after iput shows no permissions on the data object.

ll4strw commented 10 months ago

ils of the data object after iput shows no permissions on the data object.

Indeed and this happens independently of this REP. This means that there is also an issue with how iRODS handles objects names?

trel commented 10 months ago

This means that there is also an issue with how iRODS handles objects names?

I ... don't think so? Or at least I haven't seen that yet.

I thought the missing permissions were only happening when this REP was present... (without the Logical Quotas being installed/activated... there was no issue).

korydraughn commented 10 months ago

I thought that as well.

I never saw this issue on a fresh install of 4.3.0.

ll4strw commented 10 months ago

@korydraughn What do you see if in your test environment of https://github.com/irods/irods/issues/7164 you do ils -A "just testin'"? I see no ACLs even if the plugin is not monitoring the collection. If I type ils -lA, nota bene without an input file name, the resulting list shows the right ACLs including for the just testin' object.

trel commented 10 months ago

If I type ils -lA, nota bene without an input file name, the resulting list shows the right ACLs including for the just testin' object.

oh! that is curious/new.

korydraughn commented 10 months ago

Everything worked for me on a fresh install. This was run on Ub20 with Postgres 10.

root@cc9948e56928:/# su - irods                                            
irods@cc9948e56928:~$ ils                                                  
/tempZone/home/rods:                                                       
irods@cc9948e56928:~$ cat version.json                                     
{                                                                          
    "catalog_schema_version": 9,                                           
    "commit_id": "f6eb6c72786288878706e2562a370b91b7d0802e",               
    "installation_time": "2023-07-05T11:43:52.776433",                     
    "irods_version": "4.3.0",                                              
    "schema_name": "version",                                              
    "schema_version": "v4"                                                 
}irods@cc9948e56928:~$ iput version.json "just testin'"                    
irods@cc9948e56928:~$ ils -l                                               
/tempZone/home/rods:                                                       
  rods              0 demoResc          239 2023-07-05.11:46 & just testin'
irods@cc9948e56928:~$ ils -A                                               
/tempZone/home/rods:                                                       
        ACL - rods#tempZone:own                                            
        Inheritance - Disabled                                             
  just testin'                                                             
        ACL - rods#tempZone:own                                            
irods@cc9948e56928:~$ ils -lA                                              
/tempZone/home/rods:                                                       
        ACL - rods#tempZone:own                                            
        Inheritance - Disabled                                             
  rods              0 demoResc          239 2023-07-05.11:46 & just testin'
        ACL - rods#tempZone:own                                            
irods@cc9948e56928:~$ ils -lA "just testin'"                               
  rods              0 demoResc          239 2023-07-05.11:46 & just testin'
        ACL - rods#tempZone:own                                            
ll4strw commented 10 months ago

But what is the output of ils -A "just testin'" (without l option)?

korydraughn commented 10 months ago

Oh no! Reproduced it!

irods@cc9948e56928:~$ ils -A "just testin'"
  /tempZone/home/rods/just testin'         
        ACL -                              

It's an actual bug in the server.

korydraughn commented 10 months ago

Given that we've reproduced the issue on a fresh install, I'll close this issue and reopen the original.

ll4strw commented 10 months ago

I think though the UNLINK problem lies with this REP..

korydraughn commented 10 months ago

That may be true.

I'll verify and depending on what happens, we can repurpose the original issue for the missing permissions case.

korydraughn commented 10 months ago

I've confirmed that the unlink issue is indeed due to the REP.

korydraughn commented 3 weeks ago

I've looked at this for the upcoming 4.3.2 release and here's what I've found.

PR #110 resolves the removal/unlink issue by allowing the operation to continue if the filesystem library throws SYS_NO_GOOD_REPLICAS

Given there's a way to workaround the quota update issue, we'll handle that after 4.3.2 is released. I'll open an issue pointing to this comment so we don't forget about it.

korydraughn commented 3 weeks ago

Given there's a way to workaround the quota update issue, we'll handle that after 4.3.2 is released. I'll open an issue pointing to this comment so we don't forget about it.

Created #113.