Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate probes to use the Rucio gateway layer instead of core #150

Open
rdimaio opened this issue Sep 12, 2024 · 0 comments
Open

Migrate probes to use the Rucio gateway layer instead of core #150

rdimaio opened this issue Sep 12, 2024 · 0 comments

Comments

@rdimaio
Copy link

rdimaio commented Sep 12, 2024

e.g. this probe:

from rucio.core.rse import list_rses, get_rse_limits, set_rse_usage
# Exit statuses
OK, WARNING, CRITICAL, UNKNOWN = 0, 1, 2, 3
if __name__ == "__main__":
try:
for rse in list_rses():
limits = get_rse_limits(rse=rse['rse'], rse_id=rse['id'])
min_free_space = limits.get('MinFreeSpace')
if min_free_space is not None:
# print rse['rse'], min_free_space
set_rse_usage(rse=rse['rse'], source='min_free_space', used=min_free_space, free=None)
except:
print (traceback.format_exc())
sys.exit(UNKNOWN)
sys.exit(OK)

Should use rucio.gateway methods, rather than rucio.core. See rucio/rucio#6717 (comment) for reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant