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