From 40f87acc328734a7988864c7da159de3a0e1d13e Mon Sep 17 00:00:00 2001 From: Radu Carpa Date: Tue, 16 Jan 2024 15:28:40 +0100 Subject: [PATCH] a --- etc/docker/dev/docker-compose.ports.yml | 3 +++ etc/docker/dev/docker-compose.yml | 17 ++++++++++++++++ tests/test_conveyor.py | 4 ++-- tools/docker_activate_rses.sh | 26 ++++++++++++++----------- 4 files changed, 37 insertions(+), 13 deletions(-) diff --git a/etc/docker/dev/docker-compose.ports.yml b/etc/docker/dev/docker-compose.ports.yml index 7a3997bd556..e563bceea52 100644 --- a/etc/docker/dev/docker-compose.ports.yml +++ b/etc/docker/dev/docker-compose.ports.yml @@ -43,6 +43,9 @@ services: xrd4: ports: - "127.0.0.1:1097:1097" + xrd5: + ports: + - "127.0.0.1:1098:1098" minio: ports: - "127.0.0.1:9000:9000" diff --git a/etc/docker/dev/docker-compose.yml b/etc/docker/dev/docker-compose.yml index d5d450ac049..a2bab0732e7 100644 --- a/etc/docker/dev/docker-compose.yml +++ b/etc/docker/dev/docker-compose.yml @@ -216,6 +216,23 @@ services: nofile: soft: 10240 hard: 10240 + xrd5: + image: rucio/xrootd + profiles: + - storage + environment: + - XRDHOST=xrd5 + - XRDPORT=1098 + volumes: + - ./xrd/entrypoint.sh:/docker-entrypoint.sh:ro + - ./xrd:/configs:ro + - ../../certs/rucio_ca.pem:/etc/grid-security/certificates/5fca1cb1.0:z + - ../../certs/hostcert_xrd4.pem:/tmp/xrdcert.pem:Z + - ../../certs/hostcert_xrd4.key.pem:/tmp/xrdkey.pem:Z + ulimits: + nofile: + soft: 10240 + hard: 10240 web1: image: rucio/webdav command: bash -c "a2dismod want_digest; apache2 -D FOREGROUND" diff --git a/tests/test_conveyor.py b/tests/test_conveyor.py index 8530011589d..807599eb4bc 100644 --- a/tests/test_conveyor.py +++ b/tests/test_conveyor.py @@ -1584,9 +1584,9 @@ def on_submit(file): {"overrides": [('oidc', 'admin_issuer', 'indigoiam')]}, ], indirect=True) def test_transfer_with_tokens(vo, did_factory, root_account, caches_mock, file_config_mock): - src_rse = 'XRD1' + src_rse = 'XRD4' src_rse_id = rse_core.get_rse_id(rse=src_rse, vo=vo) - dst_rse = 'XRD2' + dst_rse = 'XRD5' dst_rse_id = rse_core.get_rse_id(rse=dst_rse, vo=vo) all_rses = [src_rse_id, dst_rse_id] diff --git a/tools/docker_activate_rses.sh b/tools/docker_activate_rses.sh index 0f6cf21a803..20d8afdc7b6 100755 --- a/tools/docker_activate_rses.sh +++ b/tools/docker_activate_rses.sh @@ -25,11 +25,11 @@ echo "Creating RSEs" # ^ | # | 1 | 1 # v | -# +------+ | +------+ -# | |<--+ | | -# | XRD3 | | XRD4 | -# | |<----->| | -# +------+ 2 +------+ +# +------+ | +------+ +------+ +# | |<--+ | | | | +# | XRD3 | | XRD4 |<----->| XRD5 | +# | |<----->| | 1 | | +# +------+ 2 +------+ +------+ # Step zero, get a compliant proxy. The key must NOT be group/other readable (KEY=$(mktemp); cat /opt/rucio/etc/userkey.pem > "$KEY"; voms-proxy-init -valid 9999:00 -cert /opt/rucio/etc/usercert.pem -key "$KEY"; rm -f "$KEY") @@ -39,17 +39,18 @@ rucio-admin rse add XRD1 rucio-admin rse add XRD2 rucio-admin rse add XRD3 rucio-admin rse add XRD4 +rucio-admin rse add XRD5 rucio-admin rse add SSH1 rucio-admin rse add WEB1 rucio-admin rse add WEB2 # Add the protocol definitions for the storage servers -rucio-admin rse add-protocol --hostname xrd1 --scheme root --prefix //rucio --port 1094 --impl rucio.rse.protocols.xrootd.Default --domain-json '{"wan": {"read": 1, "write": 1, "delete": 1, "third_party_copy_read": 2, "third_party_copy_write": 2}, "lan": {"read": 1, "write": 1, "delete": 1}}' XRD1 -rucio-admin rse add-protocol --hostname xrd1 --scheme davs --prefix //rucio --port 1094 --impl rucio.rse.protocols.gfal.Default --domain-json '{"wan": {"read": 2, "write": 2, "delete": 2, "third_party_copy_read": 1, "third_party_copy_write": 1}, "lan": {"read": 2, "write": 2, "delete": 2}}' XRD1 -rucio-admin rse add-protocol --hostname xrd2 --scheme root --prefix //rucio --port 1095 --impl rucio.rse.protocols.xrootd.Default --domain-json '{"wan": {"read": 1, "write": 1, "delete": 1, "third_party_copy_read": 2, "third_party_copy_write": 2}, "lan": {"read": 1, "write": 1, "delete": 1}}' XRD2 -rucio-admin rse add-protocol --hostname xrd2 --scheme davs --prefix //rucio --port 1095 --impl rucio.rse.protocols.gfal.Default --domain-json '{"wan": {"read": 2, "write": 2, "delete": 2, "third_party_copy_read": 1, "third_party_copy_write": 1}, "lan": {"read": 2, "write": 2, "delete": 2}}' XRD2 +rucio-admin rse add-protocol --hostname xrd1 --scheme root --prefix //rucio --port 1094 --impl rucio.rse.protocols.xrootd.Default --domain-json '{"wan": {"read": 1, "write": 1, "delete": 1, "third_party_copy_read": 1, "third_party_copy_write": 1}, "lan": {"read": 1, "write": 1, "delete": 1}}' XRD1 +rucio-admin rse add-protocol --hostname xrd2 --scheme root --prefix //rucio --port 1095 --impl rucio.rse.protocols.xrootd.Default --domain-json '{"wan": {"read": 1, "write": 1, "delete": 1, "third_party_copy_read": 1, "third_party_copy_write": 1}, "lan": {"read": 1, "write": 1, "delete": 1}}' XRD2 rucio-admin rse add-protocol --hostname xrd3 --scheme root --prefix //rucio --port 1096 --impl rucio.rse.protocols.xrootd.Default --domain-json '{"wan": {"read": 1, "write": 1, "delete": 1, "third_party_copy_read": 1, "third_party_copy_write": 1}, "lan": {"read": 1, "write": 1, "delete": 1}}' XRD3 rucio-admin rse add-protocol --hostname xrd4 --scheme root --prefix //rucio --port 1097 --impl rucio.rse.protocols.xrootd.Default --domain-json '{"wan": {"read": 1, "write": 1, "delete": 1, "third_party_copy_read": 1, "third_party_copy_write": 1}, "lan": {"read": 1, "write": 1, "delete": 1}}' XRD4 +rucio-admin rse add-protocol --hostname xrd4 --scheme davs --prefix //rucio --port 1097 --impl rucio.rse.protocols.gfal.Default --domain-json '{"wan": {"read": 2, "write": 2, "delete": 2, "third_party_copy_read": 2, "third_party_copy_write": 2}, "lan": {"read": 2, "write": 2, "delete": 2}}' XRD4 +rucio-admin rse add-protocol --hostname xrd5 --scheme davs --prefix //rucio --port 1098 --impl rucio.rse.protocols.gfal.Default --domain-json '{"wan": {"read": 1, "write": 1, "delete": 1, "third_party_copy_read": 1, "third_party_copy_write": 1}, "lan": {"read": 1, "write": 1, "delete": 1}}' XRD5 rucio-admin rse add-protocol --hostname ssh1 --scheme scp --prefix /rucio --port 22 --impl rucio.rse.protocols.ssh.Default --domain-json '{"wan": {"read": 1, "write": 1, "delete": 1, "third_party_copy_read": 1, "third_party_copy_write": 1}, "lan": {"read": 1, "write": 1, "delete": 1}}' SSH1 rucio-admin rse add-protocol --hostname ssh1 --scheme rsync --prefix /rucio --port 22 --impl rucio.rse.protocols.ssh.Rsync --domain-json '{"wan": {"read": 2, "write": 2, "delete": 2, "third_party_copy_read": 2, "third_party_copy_write": 2}, "lan": {"read": 2, "write": 2, "delete": 2}}' SSH1 rucio-admin rse add-protocol --hostname ssh1 --scheme rclone --prefix /rucio --port 22 --impl rucio.rse.protocols.rclone.Default --domain-json '{"wan": {"read": 3, "write": 3, "delete": 3, "third_party_copy_read": 3, "third_party_copy_write": 3}, "lan": {"read": 3, "write": 3, "delete": 3}}' SSH1 @@ -62,8 +63,8 @@ rucio-admin rse set-attribute --rse XRD2 --key test_container_xrd --value True rucio-admin rse set-attribute --rse XRD3 --key test_container_xrd --value True rucio-admin rse set-attribute --rse XRD4 --key test_container_xrd --value True rucio-admin rse set-attribute --rse SSH1 --key test_container_ssh --value True -rucio-admin rse set-attribute --rse XRD1 --key oidc_support --value True -rucio-admin rse set-attribute --rse XRD2 --key oidc_support --value True +rucio-admin rse set-attribute --rse XRD4 --key oidc_support --value True +rucio-admin rse set-attribute --rse XRD5 --key oidc_support --value True rucio-admin rse set-attribute --rse WEB1 --key oidc_support --value True rucio-admin rse set-attribute --rse WEB2 --key oidc_support --value True rucio-admin rse set-attribute --rse WEB1 --key verify_checksum --value False @@ -80,6 +81,7 @@ rucio-admin rse set-attribute --rse XRD1 --key fts --value https://fts:8446 rucio-admin rse set-attribute --rse XRD2 --key fts --value https://fts:8446 rucio-admin rse set-attribute --rse XRD3 --key fts --value https://fts:8446 rucio-admin rse set-attribute --rse XRD4 --key fts --value https://fts:8446 +rucio-admin rse set-attribute --rse XRD5 --key fts --value https://fts:8446 rucio-admin rse set-attribute --rse SSH1 --key fts --value https://fts:8446 rucio-admin rse set-attribute --rse WEB1 --key fts --value https://fts:8446 rucio-admin rse set-attribute --rse WEB2 --key fts --value https://fts:8446 @@ -96,6 +98,8 @@ rucio-admin rse add-distance --distance 1 --ranking 1 XRD3 XRD1 rucio-admin rse add-distance --distance 2 --ranking 2 XRD3 XRD2 rucio-admin rse add-distance --distance 3 --ranking 3 XRD3 XRD4 rucio-admin rse add-distance --distance 3 --ranking 3 XRD4 XRD3 +rucio-admin rse add-distance --distance 1 --ranking 1 XRD4 XRD5 +rucio-admin rse add-distance --distance 1 --ranking 1 XRD5 XRD4 rucio-admin rse add-distance --distance 1 --ranking 1 WEB1 WEB2 rucio-admin rse add-distance --distance 1 --ranking 1 WEB2 WEB1