debian: Drop log directory copy during boot

Drop the workaround that we used to copy the /var/log
directory from ostree when the system boots up. This
caused a regression when trying to start services during
bootstrapping because some log directories were not
available before running the ansible playbook.

Going forward this will be managed by the systemd-tmpfile
daemon.

Test Plan:
PASS Apply patch
PASS Build initramfs-ostree package
PASS Build image
PASS Boot image
PASS Check for missing /var/log/keystone

Story: 2009968
Task: 46524

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I6b0a8d2e4906d9b5a6a504942d8bbd7dd4b36010
This commit is contained in:
Charles Short 2022-09-28 13:06:22 -04:00 committed by Al Bailey
parent fe793aa23c
commit e6d324eb1a
2 changed files with 0 additions and 34 deletions

View File

@ -1,33 +0,0 @@
From: Charles Short <charles.short@windriver.com>
Date: Thu, 17 Feb 2022 15:21:03 -0500
Subject: debian: Copy /sysroot/var/log to LVM volume
Sync the contents of ostree/1/var/log and the
cgts-vg/log-lv volume so services will start properly
at boot.
Signed-off-by: Charles Short <charles.short@windriver.com>
---
init-ostree-install.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
index 0e5b8f3..1a53f3c 100644
--- a/init-ostree-install.sh
+++ b/init-ostree-install.sh
@@ -1486,6 +1486,15 @@ if [ -d ${PHYS_SYSROOT}/ostree/1/usr/homedirs/home ] ; then
tar --xattrs --xattrs-include='*' -xf - -C /var1/home 2> /dev/null
fi
+if [ -b /dev/cgts-vg/log-lv ]; then
+ if [ -d ${PHYS_SYSROOT}/ostree/1/var/log/apt ] ; then
+ mnt_point=$(mktemp -d)
+ mount -t ext4 /dev/cgts-vg/log-lv ${mnt_point} || fatal "Error mounting ${mnt_point}"
+ cp -rp ${PHYS_SYSROOT}/ostree/1/var/log/* ${mnt_point}
+ umount ${mnt_point}
+ fi
+fi
+
if [ -n "${KS}" ]; then
rootfs=`ls ${PHYS_SYSROOT}/ostree/? -d`
if [ "$INSTAB" = 1 ] ; then

View File

@ -1,5 +1,4 @@
0001-Prevent-auto-expansion-of-fluxdata-partition.patch
0002-debian-Copy-sysroot-var-log-to-LVM-volume.patch
0003-Make-boot-efi-mount-as-rw.patch
0004-debian-set-default-size-variables-in-install-script.patch
0005-Wait-for-devices-to-be-configured-after-boot.patch