From 5ddfc13a75b13be9f567cde4721993e97fec789c Mon Sep 17 00:00:00 2001 From: rkdevi27 <54701695+rkdevi27@users.noreply.github.com> Date: Sat, 25 Jul 2020 13:57:58 +0530 Subject: [PATCH] [baseimage]: /host unmount timeout issue during reboot. (#5032) Fix for the host unmount issue through PR https://github.com/Azure/sonic-buildimage/pull/4558 and https://github.com/Azure/sonic-buildimage/pull/4865 creates the timeout of syslog.socket closure during reboot since the journald socket closure has been included in syslog.socket Removed the journal socket closure. The host unmount is fixed with just stopping the services which gets restarted only after /var/log unmount and not causing the unmount issues. --- files/image_config/syslog/host_umount.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/image_config/syslog/host_umount.sh b/files/image_config/syslog/host_umount.sh index cedbb5b111..6a057f16d5 100755 --- a/files/image_config/syslog/host_umount.sh +++ b/files/image_config/syslog/host_umount.sh @@ -5,9 +5,6 @@ journal_stop() { systemctl stop systemd-journald.service - systemctl stop systemd-journald.socket - systemctl stop systemd-journald-audit.socket - systemctl stop systemd-journald-dev-log.socket } delete_loop_device() { @@ -16,7 +13,10 @@ delete_loop_device() { then exit 0 fi - losetup -d /dev/loop1 + loop_exist=$(losetup -a | grep loop1 | wc -l) + if [ $loop_exist -ne 0 ]; then + losetup -d /dev/loop1 + fi } case "$1" in