Hello.
I was trying out some operations for the logical quotas. I noticed that with logical quotas, when I would upload a file or folder, the irods::logical_quotas::total_number_of_data_objects would increase by 1 when actually 2 objects have been created (2 replicas). If I perform the same operation as irods user, everything gets nicely updated.
In the logs I have the following error messages:
Nov 11 15:24:53 pid:943 NOTICE: writeLine: inString = Submitting rule to checksum replica 1 of /rugZone/home/user/test.txt
Nov 11 15:24:53 pid:943 remote addresses: 10.3.17.11, 10.3.17.20 ERROR: [logical_quotas] error => [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: 'r'
Nov 11 15:24:53 pid:943 remote addresses: 10.3.17.11, 10.3.17.20 ERROR: Rule Engine Plugin returned [-349000].
Nov 11 15:24:53 pid:943 remote addresses: 10.3.17.11, 10.3.17.20 ERROR: Rule Engine Plugin returned [-13000].
Nov 11 15:24:53 pid:943 NOTICE: writeLine: inString = Submitting rule to checksum replica 0 of /rugZone/home/user/test.txt
Nov 11 15:24:53 pid:943 remote addresses: 10.3.17.11, 10.3.17.20 ERROR: [logical_quotas] error => [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: 'r'
Nov 11 15:24:53 pid:943 remote addresses: 10.3.17.11, 10.3.17.20 ERROR: Rule Engine Plugin returned [-349000].
Nov 11 15:24:53 pid:943 remote addresses: 10.3.17.11, 10.3.17.20 ERROR: Rule Engine Plugin returned [-13000].
Nov 11 15:24:53 pid:943 remote addresses: 10.3.17.11, 10.3.17.20 ERROR: Logical Quotas Policy: Insufficient privileges
Nov 11 15:24:53 pid:943 remote addresses: 10.3.17.11, 10.3.17.20 ERROR: iRODS Exception:
file: /irods_rule_engine_plugin_logical_quotas/src/handler.cpp
function: auto irods::handler::pep_api_data_obj_close::post(const std::string &, const irods::instance_configuration_map &, std::list<boost::any> &, MsParamArray *, irods::callback &)::(anonymous class)::operator()(type-parameter-0-0 &, const type-parameter-0-1 &) const
line: 1333
code: -1205000 (RE_RUNTIME_ERROR)
message:
[-] /irods_rule_engine_plugin_logical_quotas/src/handler.cpp:614:irods::error irods::handler::logical_quotas_count_total_number_of_data_objects(const std::string &, const irods::instance_configuration_map &, std::list<boost::any> &, MsParamArray *, irods::callback &) : status [RE_RUNTIME_ERROR] errno [] -- message [Logical Quotas Policy: Insufficient privileges]
The logical quota policy is:
$ irule -r irods_rule_engine_plugin-logical_quotas-instance '{"operation": "logical_quotas_start_monitoring_collection", "collection": "/rugZone/home/user"}' null ruleExecOut
$ irule -r irods_rule_engine_plugin-logical_quotas-instance '{"operation": "logical_quotas_set_maximum_number_of_data_objects", "collection": "/rugZone/home/user", "value": "15"}' null ruleExecOut
The metadata guard plugin is installed and active. Metadata guard policy is :
$ imeta ls -C /rugZone
AVUs defined for collection /rugZone:
attribute: irods::metadata_guard
value: {"prefixes": ["irods::"], "admin_only": true}
units:
I would expect the update of the object count to work automatically for such a simple scenario, even if a normal user uploads a file. I know I can always recalculate the quotas, but I do expect them to be almost correct.
Best regards,
Simona
--
Dr. Simona Stoica