Open korydraughn opened 1 month ago
Possibly related to https://github.com/irods/irods/issues/7816
Reading the Google Group conversation again, https://github.com/irods/irods/issues/7816 may be unrelated. Looks like there could be an issue if multiple users or groups are included, where "multiple" is the operative word. Then again, I might be misunderstanding again, so I'll just stop typing now.
Issue seems not the be limitted to groups, even adding multiple users causes the same issue on tiering. With more then 1 user defined on data in irods these kinds of errors are thrown.
After removing users and only have 1 user (rods) the tiering resumes.
Error sample:
{"log_category":"legacy","log_level":"error","log_message":"data movement scheduling failed - [-818000]::[iRODS Exception:\n file: /irods_plugin_source/storage_tiering.cpp\n function: void irods::storage_tiering::set_migration_metadata_flag_for_object(rcComm_t , const std::string &, const std::string &, const std::string &)\n line: 972\n code: -818000 (CAT_NO_ACCESS_PERMISSION)\n message:\n failed to set migration scheduled flag for [/nki/home/bioimaging/2024/test2/test.tif]\nstack trace:\n--------------\n 0# irods::stacktrace::dump() const in /lib/libirods_common.so.4.3.1\n 1# irods::exception::assemble_full_display_what() const in /lib/libirods_common.so.4.3.1\n 2# irods::exception::what() const in /lib/libirods_common.so.4.3.1\n 3# irods::query_processor
I take it that rods
is a rodsadmin, correct?
Do the additional users have enough permissions to read/write the data objects being tiered?
I think I found a workaround:
I replaced the default query with a specific query and added that to the resource with imeta set -R fast_resc irods::storage_tiering::query archive_query specific.
First tried this query: SELECT DISTINCT R_DATA_MAIN.data_name, R_COLL_MAIN.coll_name, R_USER_MAIN.user_name, R_USER_MAIN.zone_name, R_DATA_MAIN.data_repl_num FROM R_DATA_MAIN INNER JOIN R_COLL_MAIN ON R_DATA_MAIN.coll_id = R_COLL_MAIN.coll_id INNER JOIN R_OBJT_ACCESS r_data_access ON R_DATA_MAIN.data_id = r_data_access.object_id INNER JOIN R_OBJT_METAMAP r_data_metamap ON R_DATA_MAIN.data_id = r_data_metamap.object_id INNER JOIN R_META_MAIN r_data_meta_main ON r_data_metamap.meta_id = r_data_meta_main.meta_id INNER JOIN R_USER_MAIN ON r_data_access.user_id = R_USER_MAIN.user_id WHERE r_data_meta_main.meta_attr_name = 'irods::data_type' AND r_data_meta_main.meta_attr_value = 'raw' AND R_DATA_MAIN.resc_id IN ('35069') ORDER BY R_COLL_MAIN.coll_name, R_DATA_MAIN.data_name, R_DATA_MAIN.data_repl_num
With result output: data_name coll_name user_name zone_name data_repl_num _metadata.json /nki/home/bioimaging/2024/A public nki 0 _metadata.json /nki/home/bioimaging/2024/A rods nki 0 test.tif /nki/home/bioimaging/2024/A public nki 0 test.tif /nki/home/bioimaging/2024/A rods nki 0
Notice the row per user/group with access (rods has owner, public has read)
WIth this result the tiering plugin did not work and produced the errors.
After that changed the query to: SELECT DISTINCT R_DATA_MAIN.data_name, R_COLL_MAIN.coll_name, R_USER_MAIN.user_name, R_USER_MAIN.zone_name, R_DATA_MAIN.data_repl_num FROM R_DATA_MAIN INNER JOIN R_COLL_MAIN ON R_DATA_MAIN.coll_id = R_COLL_MAIN.coll_id INNER JOIN R_OBJT_ACCESS r_data_access ON R_DATA_MAIN.data_id = r_data_access.object_id INNER JOIN R_OBJT_METAMAP r_data_metamap ON R_DATA_MAIN.data_id = r_data_metamap.object_id INNER JOIN R_META_MAIN r_data_meta_main ON r_data_metamap.meta_id = r_data_meta_main.meta_id INNER JOIN R_USER_MAIN ON r_data_access.user_id = R_USER_MAIN.user_id WHERE r_data_meta_main.meta_attr_name = 'irods::data_type' AND r_data_meta_main.meta_attr_value = 'raw' AND R_DATA_MAIN.resc_id IN ('35069') AND R_USER_MAIN.user_name = 'rods' ORDER BY R_COLL_MAIN.coll_name, R_DATA_MAIN.data_name, R_DATA_MAIN.data_repl_num
note the added wher username=rods to filter the results back to 1 row per data item.
Output: data_name coll_name user_name zone_name data_repl_num _metadata.json /nki/home/bioimaging/2024/A rods nki 0 test.tif /nki/home/bioimaging/2024/A rods nki 0
With this output the query plugin functions.
So the multiple rows per data item when more then 1 user/group has access to the item might have something to do with it? In any case it solves the problem for me.
[ ] 4-3-stable
Bug Report
Let's assume an iRODS zone is configured to only allow group permissions on data objects and collections (i.e. no direct user permissions on things).
Please investigate whether the storage tiering plugin handles group permissions?
_Originally reported at https://groups.google.com/d/msgid/irod-chat/fe929223-1d8e-44e5-b669-3da9bd95ee99n%40googlegroups.com?utm_medium=email&utm_source=footer_