73ad23
From b63e0c5040d9881f8c3c0bc09fc21c6588c8a26f Mon Sep 17 00:00:00 2001
73ad23
From: Kairui Song <kasong@redhat.com>
73ad23
Date: Thu, 18 Oct 2018 17:05:22 +0800
73ad23
Subject: [PATCH] 99squash: Don't clean up squahfs on isolate
73ad23
73ad23
The only time we need to cleanup squahfs manually is on switch root, to
73ad23
release resource and memory. We've covered that by setting
73ad23
"Conflicts=initrd-switch-root.target" for squash cleanup service.
73ad23
On shutdown systemd will take care of squahfs mounts. But for other
73ad23
isolate, files in initramfs are most likely still required, so don't
73ad23
clean up squahfs. For example, kdump's emergency handler will isolate
73ad23
into its own target, if squahfs is cleaned up it will fail.
73ad23
73ad23
Signed-off-by: Kairui Song <kasong@redhat.com>
73ad23
73ad23
Cherry-picked from: b9af0fcd
73ad23
Resolves: #1641423
73ad23
---
73ad23
 modules.d/99squash/squash-mnt-clear.service | 1 +
73ad23
 1 file changed, 1 insertion(+)
73ad23
73ad23
diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
73ad23
index 8dd17812..f8d5db46 100644
73ad23
--- a/modules.d/99squash/squash-mnt-clear.service
73ad23
+++ b/modules.d/99squash/squash-mnt-clear.service
73ad23
@@ -9,6 +9,7 @@ After=dracut-initqueue.service dracut-pre-pivot.service
73ad23
 Before=initrd-cleanup.service
73ad23
 ConditionPathExists=/squash/root
73ad23
 Conflicts=initrd-switch-root.target
73ad23
+IgnoreOnIsolate=true
73ad23
 
73ad23
 [Service]
73ad23
 Type=oneshot
73ad23