From b95307562e10bfaea97f2d7a0f4ff23134f2c8ba Mon Sep 17 00:00:00 2001 From: Martin Barisits Date: Tue, 3 Dec 2019 14:50:33 +0100 Subject: [PATCH] Core: Fix backwards compatibility for account usage and limits; Fix #3165 --- lib/rucio/daemons/conveyor/finisher.py | 4 ++-- lib/rucio/web/rest/webpy/v1/account.py | 2 +- lib/rucio/web/rest/webpy/v1/account_limit.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/rucio/daemons/conveyor/finisher.py b/lib/rucio/daemons/conveyor/finisher.py index 0a69bcde74..c8fdce9fce 100644 --- a/lib/rucio/daemons/conveyor/finisher.py +++ b/lib/rucio/daemons/conveyor/finisher.py @@ -408,7 +408,7 @@ def __update_bulk_replicas(replicas, session=None): :returns commit_or_rollback: Boolean. """ try: - replica_core.update_replicas_states(replicas, nowait=True, add_tombstone=True, session=session) + replica_core.update_replicas_states(replicas, nowait=True, add_tombstone=False, session=session) # TODO: add_tombstone needs to be changed to True once set_tombstone is fixed except ReplicaNotFound as error: logging.warn('Failed to bulk update replicas, will do it one by one: %s', str(error)) raise ReplicaNotFound(error) @@ -432,7 +432,7 @@ def __update_replica(replica, session=None): """ try: - replica_core.update_replicas_states([replica], nowait=True, add_tombstone=True, session=session) + replica_core.update_replicas_states([replica], nowait=True, add_tombstone=False, session=session) # TODO: add_tombstone needs to be changed to True once set_tombstone is fixed if not replica['archived']: request_core.archive_request(replica['request_id'], session=session) logging.info("HANDLED REQUEST %s DID %s:%s AT RSE %s STATE %s", replica['request_id'], replica['scope'], replica['name'], replica['rse_id'], str(replica['state'])) diff --git a/lib/rucio/web/rest/webpy/v1/account.py b/lib/rucio/web/rest/webpy/v1/account.py index 5f41f27789..d307176dfb 100755 --- a/lib/rucio/web/rest/webpy/v1/account.py +++ b/lib/rucio/web/rest/webpy/v1/account.py @@ -69,7 +69,7 @@ '/(.+)/usage/local/(.+)', 'LocalUsage', '/(.+)/usage/global', 'GlobalUsage', '/(.+)/usage/global/(.+)', 'GlobalUsage', - '/(.+)/usage', 'LocalUsage', + '/(.+)/usage/', 'LocalUsage', '/(.+)/usage/(.+)', 'LocalUsage', '/(.+)', 'AccountParameter', '/?$', 'Account', diff --git a/lib/rucio/web/rest/webpy/v1/account_limit.py b/lib/rucio/web/rest/webpy/v1/account_limit.py index 45c2b8a6dc..e61384eeb9 100755 --- a/lib/rucio/web/rest/webpy/v1/account_limit.py +++ b/lib/rucio/web/rest/webpy/v1/account_limit.py @@ -14,7 +14,7 @@ # limitations under the License. # # Authors: -# - Martin Barisits , 2014 +# - Martin Barisits , 2014-2019 # - Vincent Garonne , 2017 # - Mario Lassnig , 2018 # - Hannes Hansen , 2018-2019 @@ -41,6 +41,7 @@ URLS = ( '/local/(.+)/(.+)', 'LocalAccountLimit', '/global/(.+)/(.+)', 'GlobalAccountLimit', + '/(.+)/(.+)', 'LocalAccountLimit', )