Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unlock: Don't pass options again to overlayfs
There seems to be a tricky regression here with the util-linux support for the new mount API, plus overlays support for it. ``` [2023-11-09T21:05:30.633Z] Nov 09 21:05:26 qemu0 kola-runext-unlock-transient.sh[2108]: + unshare -m -- /bin/sh -c 'mount -o remount,rw /usr && echo hello from transient unlock >/usr/share/writable-usr-test' [2023-11-09T21:05:30.633Z] Nov 09 21:05:26 qemu0 kola-runext-unlock-transient.sh[2148]: mount: /usr: mount point not mounted or bad option. [2023-11-09T21:05:30.633Z] Nov 09 21:05:26 qemu0 kola-runext-unlock-transient.sh[2148]: dmesg(1) may have more information after failed mount system call. ``` OK this seems related to the new mount API support in util-linux and overlayfs. From a strace: ``` 2095 open_tree(AT_FDCWD, "/usr", OPEN_TREE_CLOEXEC) = 3 2095 mount_setattr(-1, NULL, 0, NULL, 0) = -1 EINVAL (Invalid argument) ... 2095 fspick(3, "", FSPICK_NO_AUTOMOUNT|FSPICK_EMPTY_PATH) = 4 2095 fsconfig(4, FSCONFIG_SET_FLAG, "seclabel", NULL, 0) = 0 2095 fsconfig(4, FSCONFIG_SET_STRING, "lowerdir", "usr", 0) = -1 EINVAL (Invalid argument) ``` I think the core problem here is it's trying to reconfigure the mount with existing options, but in the new mount namespace we can't see the lowerdir. Here we really really just want to remount writable. Telling util-linux to not pass existing options fixes it.
- Loading branch information