Skip to content

Executing logical_quotas_get_collection_status with irods_rule_engine_plugin-logical_quotas-instance prints nothing #413

Open
@mstfdkmn

Description

@mstfdkmn

I am not sure enough whether this is a limitation or an issue and also if this is an issue, then should this be here or in the logical quota plugin? But it looks like a client related instead of the plugin itself. That is why created here.

We would like to write some tools that will facilitate using the logical quota plugin. Therefore part of this I would like to know the status of collections. But it seems I cannot get/see the collection status by executing logical_quotas_get_collection_status with irods_rule_engine_plugin-logical_quotas-instance whereas I can by irule. Nothing appears in the terminal where the script runs. And no error or any other result in logs, by the way. Is there a way to get the result of this operation if is being successfully invoked?

Also, the same operation is tried with the irods rule language instance and encountered the same issue here irods/irods_rule_engine_plugin_logical_quotas#81.

script:

import os, os.path
from irods.session import iRODSSession
from irods.rule import Rule
from irods.exception import (FAIL_ACTION_ENCOUNTERED_ERR, RULE_ENGINE_ERROR, UnknowniRODSError)


env_file = os.getenv('IRODS_ENVIRONMENT_FILE', os.path.expanduser('~/.irods/irods_environment.json'))
with iRODSSession(irods_env_file=env_file) as session:
    collection_path = '/icts_icts/home/u0137480'
    
    # Logical quota
    try:
        Rule( session, body = '{"operation": "logical_quotas_get_collection_status", "collection":"/icts_icts/home/u0137480"}', \
              instance_name = 'irods_rule_engine_plugin-logical_quotas-instance' ).execute()
    except Exception as err:
        print(err)
        exit(1)

collection status by irule:

(base) u0137480@CRD-L-07856:~/projects/irods-acl-management$ irule -r irods_rule_engine_plugin-logical_quotas-instance '{"operation": "logical_quotas_get_collection_status", "collection": "/icts_icts/home/u0137480"}' null ruleExecOut
{"irods::logical_quotas::total_number_of_data_objects":"18","irods::logical_quotas::total_size_in_bytes":"192710031"}(base)

Query result of metadata attached:

✔ [Nov/28 22:45] vsc33586@login1 ~ $ imeta ls -C /icts_icts/home/u0137480
AVUs defined for collection /icts_icts/home/u0137480:
attribute: atr
value: val
units:
----
attribute: irods::logical_quotas::total_number_of_data_objects
value: 18
units:
----
attribute: irods::logical_quotas::total_size_in_bytes
value: 192710031
units:

However I can execute and see the effects of other operations such as monitoring start/stop etc., by calling the rule engine via PRC.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions