Open observingClouds opened 1 year ago
On the login nodes we allow
slk retrieve
to retrieve one file with one call ofslk retrieve
. There is a StrongLink config file in/etc/stronglink.conf
which is JSON and contains an attribute"retrieve_file_limit":1
(on login nodes) or"retrieve_file_limit":500
(on other nodes). This file could be imported somewhere to find out how many files are allowed to be retrieved. Maybe, this number is changed in future if needed.
_Originally posted by @neumannd in https://github.com/observingClouds/slkspec/pull/3#discussion_r1035203280
I think in the case of a retrieve for more than 500 files (or maybe rather 10/... tapes) we should assume the user to have done a mistake, cancel the whole thing and throw an error. Otherwise we run into the problem that users might accidentally trigger loading half the HSM into the cache...
I see that 500 files can be a massive request and a mistake. I would argue that this limitation should however be done at the lowest level, like slk
or at least pyslk
. This would ensure that the behaviour is the same across all access methods and that slkspec
remains more general and could also be used for a tape archive at a different institution who may have different resources. Instead of using a number of files as limit, one could also think of restricting a retrieval by size.
yeah, just saying that we should not try to bypass such limitations, b/c they are there for a reason.
I see where you are coming from. Retrievals are now for the most part combined into a single slk retrieve
call. If slk
has limitations in place, these will affect also slkspec
retrievals.
yeah, just saying that we should not try to bypass such limitations, b/c they are there for a reason.
Yes. We feared slk retrieve -R /arch .
;-)
It would be the savest to read out the retrieve_file_limit
from this /etc/stronglink.conf
.
@observingClouds It would be reasonable to read /etc/stronglink.conf
(example content):
{"host":"archive.dkrz.de","domain":"ldap","logSize":"10MB","retrieve_file_limit":500}
Then extract the value of retrieve_file_limit
. Currently, it is 1
on levante login nodes and 500
on levante compute/interactive/shared nodes. This limit might be changed in future or on individual nodes (e.g. a "mass-data-retrieval-node" where it is set to 5000).
slk_conf_global="/etc/stronglink.conf"
# `-1` == no limit
retrieve_file_limit = -1
if os.path.exists(slk_conf_global):
with open(slk_conf_global, 'r') as f:
data = json.load(f)
retrieve_file_limit = data.get("retrieve_file_limit", -1)
_Originally posted by @neumannd in https://github.com/observingClouds/slkspec/pull/3#discussion_r1035193456_