diff options
author | Colin Walters <walters@verbum.org> | 2021-09-30 15:53:18 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2021-10-01 11:28:11 -0400 |
commit | e6a560b40797324aa8b90e7100c6d50bff91f14d (patch) | |
tree | 6a25a80b7ae59c7d33463338111786440743cb48 /tests/test-admin-deploy-etcmerge-cornercases.sh | |
parent | 5bf4b1dabc12d6caee4f4899c9388a48bb4a72a3 (diff) | |
download | ostree-e6a560b40797324aa8b90e7100c6d50bff91f14d.tar.gz |
deploy: Ignore sockets, fifos in /etc during merge
https://bugzilla.redhat.com/show_bug.cgi?id=1945274 is an issue where a privileged
kubernetes daemonset is writing a socket into `/etc`. This makes ostree upgrades barf.
Now, they should clearly move it to `/run`. However, one option is for us to
just ignore it instead of erroring out. Some brief investigation shows that
e.g. `git add somesocket` is a silent no-op, which is an argument in favor of ignoring it.
Closes: https://github.com/ostreedev/ostree/issues/2446
Diffstat (limited to 'tests/test-admin-deploy-etcmerge-cornercases.sh')
-rwxr-xr-x | tests/test-admin-deploy-etcmerge-cornercases.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test-admin-deploy-etcmerge-cornercases.sh b/tests/test-admin-deploy-etcmerge-cornercases.sh index 98e2bbe6..ef4ddeec 100755 --- a/tests/test-admin-deploy-etcmerge-cornercases.sh +++ b/tests/test-admin-deploy-etcmerge-cornercases.sh @@ -51,6 +51,9 @@ chmod 700 ${etc}/a/long/dir/forking # Symlink to nonexistent path, to ensure we aren't walking symlinks ln -s no-such-file ${etc}/a/link-to-no-such-file +# fifo which should be ignored +mkfifo "${etc}/fifo-to-ignore" + # Remove a directory rm ${etc}/testdirectory -rf @@ -66,6 +69,10 @@ newetc=${newroot}/etc assert_file_has_content ${newroot}/usr/etc/NetworkManager/nm.conf "a default daemon file" assert_file_has_content ${newetc}/NetworkManager/nm.conf "a modified config file" +if test -e "${newetc}"/fifo-to-ignore; then + fatal "Should not have copied fifo!" +fi + assert_file_has_mode() { stat -c '%a' $1 > mode.txt if ! grep -q -e "$2" mode.txt; then |