DIRACGrid / DIRAC

DIRAC Grid
http://diracgrid.org
GNU General Public License v3.0
113 stars 176 forks source link

DMS client parsing failure with multiple StorageElementProxy urls #3001

Closed ahaupt closed 8 years ago

ahaupt commented 8 years ago

The DMS client is currently incompatible with multiple StorageElementProxy urls in the CS. In case the CS option:

/Systems/DataManagement/<Setup>/URLs

is a multi-value entry like:

dips://<url1>, dips://<url2>

clients like dirac-dms-add-file fail with error:

ProxyStorage.putFile: Failed to send file to proxy server. DataManagement/StorageElementProxy, dips://ccdcta-server01.in2p3.fr:9150/DataManagement/StorageElementProxy is not up in this server

Same problem also exists in the RMS client (dirac-rms-reqdb-summary.py), btw.

chaen commented 8 years ago

Hi,

I have fixed the RMS couple of weeks ago: https://github.com/DIRACGrid/DIRAC/pull/2941

I just saw in the forum that you already digged inside the code to find the source of it. Would you please consider making a pull request to fix this bug ? I am willing to help you through the different steps if needed

ahaupt commented 8 years ago

Hi,

I'm not really familiar with the Dirac code so not sure how a clean solution would look like. It should probably look like:

https://github.com/DIRACGrid/DIRAC/blob/rel-v6r14/Core/DISET/private/BaseClient.py#L199

but maybe there is already a common method for that, so code does not need to be duplicated for each class.

chaen commented 8 years ago

You are perfectly right, reusing this is much better. In fact, giving a quick look at the code of ProxyStorage, I would say that the url resolution is useless. In principle, doing self.url = 'DataManagement/StorageElementProxy' instead of self.url = PathFinder.getServiceURL( "DataManagement/StorageElementProxy" ) should work, because then this url is passed to RPCClient, which itself uses BaseClient, so should reuse the code you just show. Could you please test it in your environment ?

ahaupt commented 8 years ago

Indeed, that small change fixes the problem for me!

chaen commented 8 years ago

Great :-) Would you please submit a PR against whichever version is suitable for you ? (no later than v6r13 please ;-) )

ahaupt commented 8 years ago

Hope it is ok this way:

https://github.com/DIRACGrid/DIRAC/pull/3003