From: Ricardo Simoes <[email protected]>

To fulfill OverlayFS workdir requirements, the mount-copybind script
creates a workdir. But if the mount operation fails for any reason,
the workdir is left there.

Then, subsequent runs of mount-copybind will again try to
create the directory and pollute system logs with failed mkdir error
messages.

This commit mitigates the problem by unconditionally removing workdir
if the OverlayFS is not used or fails to run.

Signed-off-by: Ricardo Simoes <[email protected]>
Signed-off-by: Mark Jonas <[email protected]>
---
 meta/recipes-core/volatile-binds/files/mount-copybind | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/volatile-binds/files/mount-copybind 
b/meta/recipes-core/volatile-binds/files/mount-copybind
index da88d160ee..4f373412be 100755
--- a/meta/recipes-core/volatile-binds/files/mount-copybind
+++ b/meta/recipes-core/volatile-binds/files/mount-copybind
@@ -57,6 +57,7 @@ if [ -d "$mountpoint" ]; then
         fi
     fi
     if [ "$MOUNT_COPYBIND_AVOID_OVERLAYFS" = 1 ] || ! mount -t overlay overlay 
-olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir""$mountcontext"
 "$mountpoint" > /dev/null 2>&1; then
+        rm -rf "$overlay_workdir"
 
         if [ "$specdir_existed" != "yes" ]; then
             cp -aPR "$mountpoint"/. "$spec/"
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#202189): 
https://lists.openembedded.org/g/openembedded-core/message/202189
Mute This Topic: https://lists.openembedded.org/mt/107412961/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to