Skip to content

Commit

Permalink
Merge pull request #7885 from fstagni/90_integration_tests_pilot_hc_c…
Browse files Browse the repository at this point in the history
…vmfs

[9.0] test: added a health check for CVMFS dir
  • Loading branch information
fstagni authored Nov 19, 2024
2 parents 31118ea + f21d3e2 commit 667ece8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 2 additions & 3 deletions integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,9 +785,8 @@ def _make_env(flags):
env["ES_VER"] = flags.pop("ES_VER", DEFAULT_ES_VER)
env["IAM_VER"] = flags.pop("IAM_VER", DEFAULT_IAM_VER)
if "CVMFS_DIR" not in env or not Path(env["CVMFS_DIR"]).is_dir():
# create a directory in tmp
with tempfile.TemporaryDirectory() as tmpdir:
env["CVMFS_DIR"] = tmpdir
typer.secho(f"CVMFS_DIR environment value: {env.get('CVMFS_DIR', 'NOT SET')}", fg=c.YELLOW)
env["CVMFS_DIR"] = "/tmp"
return env


Expand Down
13 changes: 11 additions & 2 deletions tests/CI/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,26 @@ services:
command: ["sleep", "infinity"] # This is necessary because of the issue described in https://github.com/moby/moby/issues/42275. What is added here is a hack/workaround.

dirac-pilot:
image: registry.cern.ch/cernvm/five/cernvm-five
image: ${CI_REGISTRY_IMAGE}/${HOST_OS}-dirac
container_name: pilot
hostname: pilot
user: "${DIRAC_UID}:${DIRAC_GID}"
depends_on:
- dirac-server
volumes:
- ${CVMFS_DIR}:/cvmfs:ro
- type: bind
source: ${CVMFS_DIR}
target: /cvmfs
bind:
propagation: rslave
ulimits:
nofile: 8192
pull_policy: always
healthcheck:
test: ["CMD", "ls", "${CVMFS_DIR}"]
timeout: 20s
retries: 10
start_period: 60s
command: ["sleep", "infinity"] # This is necessary because of the issue described in https://github.com/moby/moby/issues/42275. What is added here is a hack/workaround.

diracx-init-key:
Expand Down

0 comments on commit 667ece8

Please sign in to comment.