]> git.apps.os.sepia.ceph.com Git - ceph.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)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 6 Mar 2025 21:14:28 +0000 (16:14 -0500)
commit895ffc99895f53e6621c68b51150313e772d0756
tree10239f2de9faed2ff68ba646ef7f180039ed8417
parent08f7626d7241ba3a00f98fd2df1faab649845f57
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)
src/script/build-with-container.py