dCache / dcache

dCache - a system for storing and retrieving huge amounts of data, distributed among a large number of heterogenous server nodes, under a single virtual filesystem tree with a variety of standard access methods
https://dcache.org
291 stars 136 forks source link

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

Open XMol opened 4 years ago

XMol commented 4 years ago

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 commented 4 years ago

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

XMol commented 1 year ago

Script in version 8.2 still looks unchanged.