dcache icon indicating copy to clipboard operation
dcache copied to clipboard

[storage-descriptor] Script should exit with non-zero rc when curl failed

Open XMol opened this issue 5 years ago • 2 comments
trafficstars

Hello dCache.org,

I don't think, this is OK under any circumstances. 🙂

[root@host ~]# dcache-storage-descriptor
curl: (7) Failed connect to localhost:2288; Connection refused
-:1: parser error : Document is empty
unable to parse -
JSON available at /var/spool/dcache/storage-descriptor.json

[root@host ~]# echo $?
0

Yes, we did something wrong here, but still, would you please ensure that the dcache-storage-descriptor script will not return 0, if it (obviously) failed to produce a proper JSON file?

Thanks,
Xavier.

XMol avatar Jul 31 '20 13:07 XMol

This was on dCache version 5.2.21, but the script looks identical in this regard for version 6.2.

XMol avatar Jul 31 '20 13:07 XMol

Script in version 8.2 still looks unchanged.

XMol avatar Aug 29 '23 15:08 XMol