]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
script/build-with-container: add support for overlay dir
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 20 Feb 2025 00:17:30 +0000 (19:17 -0500)
committerKamoltat Sirivadhna <ksirivad@redhat.com>
Fri, 10 Oct 2025 18:27:42 +0000 (18:27 +0000)
commitb58d1b0a9fa04c9396ea0717732210d42892a5a0
tree1d70dfb4c5bc0f74370495924a90577ffb97f031
parent046f182252b2158305937281395a41e9d9e8cf87
script/build-with-container: add support for overlay dir

The source dir (aka homedir, default /ceph) is mounted in the container
read-write. This is needed as the various ceph build scripts expect to
write things into the tree - often this is in the build directory - but
not always. This can lead to small messes and/or situations that are
confusing to debug, especially if one is jumping between distros often.
Add an option to use an overlay volume for the homedir - by default we
enable a persistent overlay with a supplied "upper dir" where files that
were written will appear. One can also enable a temporary overlay that
forgets the writes when the container exits - maybe useful when doing
experiments in 'interactive' mode.

To use this option run the command with the `--overlay=<dir>` option.
For example: `./src/script/build-with-container.py -b build.inner
--overlay-dir build.ovr`. This will create a directory
`build.ovr/content` automatically and all new files will appear there.
For example the build directory will appear at
`build.ovr/content/build.inner`.

To use the temporary overlay use a `-` as the directory name. For
example: `./src/script/build-with-container.py -b build.inner
--overlay-dir -`

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 794e3d0b25a05e019e549eb51ba0ddba1268d5a6)
(cherry picked from commit 895ffc99895f53e6621c68b51150313e772d0756)
src/script/build-with-container.py