diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java index 553f69623d..9cea2258bd 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java @@ -247,18 +247,14 @@ public class Bridge { public boolean healthCheck() { try { dbStore.getNumProjects(); - // Check the repo store volume (the PVC mounted at the repo store root), not the - // container root filesystem. A read-only or detached volume must fail the check. + // Check the repo store volume, not the container root filesystem, so a + // read-only or detached volume fails the check. File rootDirectory = repoStore.getRootDirectory(); if (rootDirectory == null || !rootDirectory.isDirectory()) { throw new Exception("repo store root directory does not exist: " + rootDirectory); } - // Write and read back a small probe file to confirm the volume is mounted read-write. - // Use the .wlgb directory (excluded from project purging) so we never touch project - // storage. A single fixed-name file is overwritten on each probe (never deleted), so we - // avoid churning through unique files and can't leave orphaned temp files behind. Both - // liveness and readiness probes write identical content, so this is safe under concurrent - // probes. + // Confirm the volume is writable: overwrite a fixed probe file in .wlgb + // (outside project storage) and read it back. File wlgbDirectory = new File(rootDirectory, ".wlgb"); if (!wlgbDirectory.isDirectory()) { throw new Exception("repo store .wlgb directory does not exist: " + wlgbDirectory);