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

report of quota used by crab_input is wrong #8736

Open
belforte opened this issue Oct 10, 2024 · 2 comments · May be fixed by #8741
Open

report of quota used by crab_input is wrong #8736

belforte opened this issue Oct 10, 2024 · 2 comments · May be fixed by #8741
Assignees

Comments

@belforte
Copy link
Member

this code can not work for crab_input account. I am not sure if it is currently used to populate grafana panel or not. If yes I am very surprised that it give a sensible 21PB. I expect that most rules for crab_input are OK, not REPLICATING/SUSPENDED/STUCK

def getTapeRecallUsage(rucioClient=None, account=None):
""" size of ongoing tape recalls for this account (if provided) or by activity """
activity = 'Analysis TapeRecall'
filters = {'activity': activity}
if account is not None:
filters['account'] = account
rules = rucioClient.list_replication_rules(filters=filters)
usage = sum(getRuleQuota(rucioClient, rule['id']) for rule in rules\
if rule['state'] in ['REPLICATING', 'STUCK', 'SUSPENDED']) # in Bytes
return usage

@belforte
Copy link
Member Author

@aspiringmind-code I lost track a bit of what you are working atm so am not sure where to put this in your priority list.
In a way, we may not need this anymore since we have Panos' dashboard. In another way, it is good for you to learn about Rucio.

I start to fear that you are working on too many things at same time

@aspiringmind-code
Copy link
Contributor

This is a small fix, so no worries about priority. I've added all the states the rucio rule can be in the list.

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

Successfully merging a pull request may close this issue.

2 participants