-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 2.277.4
cloudbees-disk-usage-simple 0.10
-
-
203.v3f46a_7462b_1a_
When running Jenkins from a read-only JENKINS_HOME, disk usage collection won't work, since it wants to touch the JENKINS_HOME directory.
This happens when running Jenkins in a containerized environment with a read-only root filesystem, where all the writable paths (i.e. workspace, cache, tmp etc.) are mounted to writable filesystems.
Is it maybe a possibility to opt-out of that touch to JENKINS_HOME?
- is duplicated by
-
JENKINS-71432 java.io.IOException: Failed to set the timestamp of /var/lib/jenkins to 1686557416541
-
- Closed
-
- relates to
-
JENKINS-66250 cloudbees-disk-usage-simple-plugin produces lots of entries in the jobConfigHistory data
-
- Resolved
-
- links to
hareldev I guess you could simply run the Jenkins Docker image using docker run --read-only=true ... and mount the subdirs that need to be writable via multiple -v /path/to/writable/subdir:/var/lib/jenkins/subdir:rw. That's sort of the setup I've used back in the day when I encountered this problem.
Edit: Maybe just mounting the whole JENKINS_HOME dir should be enough to trigger this IIRC. So docker run -v /pat/to/local/jenkins/dir:/var/lib/jenkins:rw ... should already do to reproduce this. The dir itself will then be read-only, but all the files and folders inside are writable...