Skip to content

Commit 667ece8

Browse files
authored
Merge pull request DIRACGrid#7885 from fstagni/90_integration_tests_pilot_hc_cvmfs
[9.0] test: added a health check for CVMFS dir
2 parents 31118ea + f21d3e2 commit 667ece8

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

integration_tests.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,9 +785,8 @@ def _make_env(flags):
785785
env["ES_VER"] = flags.pop("ES_VER", DEFAULT_ES_VER)
786786
env["IAM_VER"] = flags.pop("IAM_VER", DEFAULT_IAM_VER)
787787
if "CVMFS_DIR" not in env or not Path(env["CVMFS_DIR"]).is_dir():
788-
# create a directory in tmp
789-
with tempfile.TemporaryDirectory() as tmpdir:
790-
env["CVMFS_DIR"] = tmpdir
788+
typer.secho(f"CVMFS_DIR environment value: {env.get('CVMFS_DIR', 'NOT SET')}", fg=c.YELLOW)
789+
env["CVMFS_DIR"] = "/tmp"
791790
return env
792791

793792

tests/CI/docker-compose.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,26 @@ services:
115115
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.
116116

117117
dirac-pilot:
118-
image: registry.cern.ch/cernvm/five/cernvm-five
118+
image: ${CI_REGISTRY_IMAGE}/${HOST_OS}-dirac
119119
container_name: pilot
120120
hostname: pilot
121121
user: "${DIRAC_UID}:${DIRAC_GID}"
122122
depends_on:
123123
- dirac-server
124124
volumes:
125-
- ${CVMFS_DIR}:/cvmfs:ro
125+
- type: bind
126+
source: ${CVMFS_DIR}
127+
target: /cvmfs
128+
bind:
129+
propagation: rslave
126130
ulimits:
127131
nofile: 8192
128132
pull_policy: always
133+
healthcheck:
134+
test: ["CMD", "ls", "${CVMFS_DIR}"]
135+
timeout: 20s
136+
retries: 10
137+
start_period: 60s
129138
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.
130139

131140
diracx-init-key:

0 commit comments

Comments
 (0)