Update resource free space after removing files (irm)

109 views
Skip to first unread message

Ahmed Abdelmonem

unread,
Dec 28, 2016, 8:23:33 AM12/28/16
to iRODS-Chat
Hi all,

I used the below rules to update the free space of a resource after each iput

acPostProcForParallelTransferReceived(*leaf_resource) {
    msi_update_unixfilesystem_resource_free_space(*leaf_resource);
}
acPostProcForDataCopyReceived(*leaf_resource) {
    msi_update_unixfilesystem_resource_free_space(*leaf_resource);
}

i need to calculate the free space after each irm also but i can't find a rule that takes *leaf_resource runs after delete file from this resource.

Thanks,

Felipe Gutierrez

unread,
Sep 20, 2017, 9:38:31 AM9/20/17
to iRODS-Chat
Hi,

I am wondering how to update the free space so when I type
 ilsresc -l demoResc

I can see the parameter free space filled out. I used the same approach that you did. But it is never triggered. First because I am not using parallel upload and second because I am not replicating any file between resources.

The behaviour that I would like to see is even if I upload one file I want to check "ilsresc -l demoResc" and see a change at the free space parameter. I am using the pep "acPostProcForPut" but it does not have the parameter *leaf_resource.

How would you implement this?

Best Regards,
Felipe

Terrell Russell

unread,
Sep 20, 2017, 9:57:54 PM9/20/17
to irod...@googlegroups.com
Hi Felipe,

You could hard code your specific resource name - no need for *leaf_resource.


before...

$ ilsresc -l demoResc | grep space:
free space: 


update acPostProcForPut contents in core.re (or preferably your additional rule file)...

acPostProcForPut {
  msi_update_unixfilesystem_resource_free_space('yourRescName')
}


then...

$ iput smallfile
$ ilsresc -l demoResc | grep space:
free space: 122065645568



And to answer Ahmed's question from late last year, you could use the pep_resource_unlink_post() PEP to do the same thing when a replica is deleted.

It's just a microservice call, firing at a certain point in the Agent's handling of a request.

Terrell





--
--
"iRODS: the Integrated Rule-Oriented Data-management System; A community driven, open source, data grid software solution" https://www.irods.org
 
iROD-Chat: http://groups.google.com/group/iROD-Chat

---
You received this message because you are subscribed to the Google Groups "iRODS-Chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Felipe Gutierrez

unread,
Sep 22, 2017, 6:11:07 AM9/22/17
to iRODS-Chat
the strange thing is that my irods is using SSL and I can ils/iput/iget/irm files. When I included the microservice it says "post connection certificate check failed". I am using iRODS 4.1.10.

For this I test inside a delay block. Outside of the delay block works fine. Is it like this that the "msi_update_unixfilesystem_resource_free_space" microservice is meant to work?

If so. Thanks for your help Terrel

Sep 22 05:59:38 pid:32474 ERROR: [-] iRODS/lib/core/src/sockComm.cpp:912:connectToRhost :  status [SSL_CERT_ERROR]  errno [] -- message []
[-] iRODS/lib/core/src/sockComm.cpp:67:sockClientStart :  status [SSL_CERT_ERROR]  errno [] -- message [failed to call 'client start']
[-] libssl.cpp:706:ssl_client_start :  status [SSL_CERT_ERROR]  errno [] -- message [post connection certificate check failed]

Sep 22 05:59:38 pid:32474 ERROR: _rcConnect: connectToRhost error, server on 13-009112-v1.amc.nl:1247 is probably down status = -2105000 SSL_CERT_ERROR
Sep 22 05:59:38 pid:32474 ERROR: msi_update_unixfilesystem_resource_free_space: rcConnect failure [SSL_CERT_ERROR] [] [-2105000] [_rcConnect: connectToRhost failed
]
Sep 22 05:59:38 pid:32474 ERROR: executeRuleAction Failed for msi_update_unixfilesystem_resource_free_space status = -2105000 SSL_CERT_ERROR
Sep 22 05:59:38 pid:32474 NOTICE: executeRuleBody: Microservice or Action msi_update_unixfilesystem_resource_free_space Failed with status -2105000
Sep 22 05:59:38 pid:32474 DEBUG: execMicroService3: error when executing microservice
line 10, col 5
msi_update_unixfilesystem_resource_free_space('demoResc');
^
To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+...@googlegroups.com.

Terrell Russell

unread,
Sep 22, 2017, 9:04:05 AM9/22/17
to irod...@googlegroups.com
The 'post connection certificate check failed' error suggests that the cert that is being used does not have the proper hostname information encoded in the cert.

There is a server-to-server connection being made that is not passing the cert check.  "connectToRhost error, server on 13-009112-v1.amc.nl:1247"


The 'does not work within a delay block' suggests that when run from the icat server (where the delay queue is stored and fired by default), the cert on that machine is different or not working the same as the one on the original server (where it is running outside a delay block).

Do you have a wildcard cert that matches all the hostnames involved?  Or do you have a different cert for each machine?


The combination of cert error and delay makes this a new case I haven't seen before.  I am interested to hear how this gets worked out. 

Terrell







To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages