Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
ll4strw opened this issue Jul 3, 2023 · 15 comments
Closed
2 tasks done

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

ll4strw opened this issue Jul 3, 2023 · 15 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ll4strw
Copy link

ll4strw commented Jul 3, 2023

  • main
  • 4-3-stable

Bug Report

  • irods v4.3.0
  • OS Rocky v8
  • icommands v4.3.0
  • irods-rule-engine-plugin-logical-quotas v4.3.0

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 irods/irods#7164.

@trel
Copy link
Member

trel commented Jul 3, 2023

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

@ll4strw
Copy link
Author

ll4strw commented Jul 4, 2023

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
Copy link
Member

trel commented Jul 4, 2023

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
Copy link
Collaborator

I thought that as well.

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

@ll4strw
Copy link
Author

ll4strw commented Jul 5, 2023

@korydraughn What do you see if in your test environment of irods/irods#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
Copy link
Member

trel commented Jul 5, 2023

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
Copy link
Collaborator

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
Copy link
Author

ll4strw commented Jul 5, 2023

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

@korydraughn
Copy link
Collaborator

korydraughn commented Jul 5, 2023

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
Copy link
Collaborator

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

@ll4strw
Copy link
Author

ll4strw commented Jul 5, 2023

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

@korydraughn
Copy link
Collaborator

korydraughn commented Jul 5, 2023

That may be true.

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

@korydraughn
Copy link
Collaborator

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

@korydraughn korydraughn changed the title Single quotation mark in data object name Cannot remove data object with single quotation mark in name Jul 5, 2023
@korydraughn
Copy link
Collaborator

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
Copy link
Collaborator

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.

@korydraughn korydraughn added this to the 4.3.2.0 milestone Apr 25, 2024
korydraughn added a commit to korydraughn/irods_rule_engine_plugin_logical_quotas that referenced this issue Apr 25, 2024
…plicas and/or single quotes in the data name.
korydraughn added a commit that referenced this issue Apr 25, 2024
korydraughn added a commit to korydraughn/irods_rule_engine_plugin_logical_quotas that referenced this issue Apr 25, 2024
…plicas and/or single quotes in the data name.
korydraughn added a commit that referenced this issue Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants