Skip to content

Commit

Permalink
Merge pull request #2669 from cserf/patch-2402-Conveyor_breaks_if_no_…
Browse files Browse the repository at this point in the history
…scheme_is_specified

Conveyor breaks if no scheme is specified : Closes #2402
  • Loading branch information
bari12 committed Jun 20, 2019
2 parents 10fb070 + f8bc8be commit 1a1eee6
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 26 deletions.
4 changes: 3 additions & 1 deletion lib/rucio/common/constants.py
Expand Up @@ -6,7 +6,7 @@
#
# Authors:
# - Vincent Garonne, <vincent.garonne@cern.ch>, 2013
# - Cedric Serfon, <cedric.serfon@cern.ch>, 2015-2018
# - Cedric Serfon, <cedric.serfon@cern.ch>, 2015-2019
# - Mario Lassnig, <mario.lassnig@cern.ch>, 2018
#
# PY3K COMPATIBLE
Expand All @@ -31,3 +31,5 @@
'davs': ['https', 'davs', 's3'],
'root': ['root'],
's3': ['https', 'davs', 's3']}

SUPPORTED_PROTOCOLS = ['gsiftp', 'srm', 'root', 'davs', 'http', 'https', 'file', 's3', 's3+rucio', 's3+https', 'storm']
5 changes: 4 additions & 1 deletion lib/rucio/core/transfer.py
Expand Up @@ -32,6 +32,7 @@
from rucio.common.exception import RucioException, UnsupportedOperation, InvalidRSEExpression, RSEProtocolNotSupported, RequestNotFound
from rucio.common.rse_attributes import get_rse_attributes
from rucio.common.utils import construct_surl
from rucio.common.constants import SUPPORTED_PROTOCOLS
from rucio.core import did, message as message_core, request as request_core
from rucio.core.monitor import record_counter, record_timer
from rucio.core.rse import get_rse_name, list_rses
Expand Down Expand Up @@ -433,7 +434,9 @@ def get_transfer_requests_and_source_replicas(total_workers=0, worker_number=0,
if rses and dest_rse_id not in rses:
continue

current_schemes = schemes
current_schemes = SUPPORTED_PROTOCOLS
if schemes:
current_schemes = schemes
if previous_attempt_id and failover_schemes:
current_schemes = failover_schemes

Expand Down
34 changes: 21 additions & 13 deletions lib/rucio/rse/__init__.py
@@ -1,16 +1,24 @@
'''
Copyright European Organization for Nuclear Research (CERN)
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Authors:
- Ralph Vigne, <ralph.vigne@cern.ch>, 2013 - 2014
- Vincent Garonne, <vincent.garonne@cern.ch>, 2013-2017
- Cedric Serfon, <cedric.serfon@cern.ch>, 2017
- James Perry, <j.perry@epcc.ed.ac.uk>, 2019
'''
# Copyright 2013-2019 CERN for the benefit of the ATLAS collaboration.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Authors:
# - Ralph Vigne, <ralph.vigne@cern.ch>, 2013 - 2014
# - Vincent Garonne, <vincent.garonne@cern.ch>, 2013-2017
# - Cedric Serfon, <cedric.serfon@cern.ch>, 2017-2019
# - James Perry, <j.perry@epcc.ed.ac.uk>, 2019
#
# PY3K COMPATIBLE

from dogpile.cache import make_region

Expand Down
21 changes: 13 additions & 8 deletions lib/rucio/rse/protocols/__init__.py
@@ -1,10 +1,15 @@
# Copyright European Organization for Nuclear Research (CERN)
# Copyright 2013-2019 CERN for the benefit of the ATLAS collaboration.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

# These are all protocols which are considered in good health
# based on generally available support libraries, native dependencies,
# and implementations in Rucio
supported_protocols = ['gsiftp', 'srm', 'root', 'davs', 'http', 'https', 'file', 's3', 's3+rucio', 's3+https', 'storm']
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# PY3K COMPATIBLE
6 changes: 3 additions & 3 deletions lib/rucio/web/rest/webpy/v1/replica.py
Expand Up @@ -56,7 +56,7 @@
from rucio.common.replica_sorter import sort_random, sort_geoip, sort_closeness, sort_dynamic, sort_ranking
from rucio.common.schema import SCOPE_NAME_REGEXP
from rucio.common.utils import generate_http_error, parse_response, APIEncoder, render_json_list
from rucio.rse.protocols import supported_protocols
from rucio.common.constants import SUPPORTED_PROTOCOLS
from rucio.web.rest.common import rucio_loadhook, rucio_unloadhook, RucioController, check_accept_header_wrapper

URLS = ('/list/?$', 'ListReplicas',
Expand Down Expand Up @@ -111,7 +111,7 @@ def GET(self, scope, name):

# Resolve all reasonable protocols when doing metalink for maximum access possibilities
if metalink and schemes is None:
schemes = supported_protocols
schemes = SUPPORTED_PROTOCOLS

try:

Expand Down Expand Up @@ -368,7 +368,7 @@ def POST(self):

# Resolve all reasonable protocols when doing metalink for maximum access possibilities
if metalink and schemes is None:
schemes = supported_protocols
schemes = SUPPORTED_PROTOCOLS

try:

Expand Down

0 comments on commit 1a1eee6

Please sign in to comment.