The removal of files in the overlay present in the lowerdir creates
whiteout entries that mask the lowerdir entries. For those files that
have a tmpfile rule for creation, a reboot would cause the file to be
created in the upperdir, meaning this file is not updated from the
lowerdir when it changes. In addition we have filtered out some tmpfile
rules that caused upcopies (symlinks and directories) which meant that
removing the /etc/resolv.conf symlink didn't bring it back after reboot.
To make files from the lowerdir show up if they have a tmpfile rule that
normally would recreate them we keep a list of whiteout entries that we
clean up on boot. This also prevents freezing files because
systemd-tmpfiles does not need to recreate them in the upperdir.
If fixes an issue with Systemd service restart when the main process is
being killed by a SIGHUP signal.
See also: https://github.com/flatcar/Flatcar/issues/1157
Commit-Ref: 34e834f496
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
The folders are not created through "keepdir" which results in tmpfiles
rules but an explict tmpfiles file. This is error prone and we should
try to move to "keepdir" instead but for the backport, just add the
missing line.