From 0be199cab94f5b89ac5eab4524d02e0aa21e4849 Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Mon, 28 Mar 2022 14:33:29 +0800 Subject: [PATCH] ignore failure for swapoff --- pkg/cluster/manager/check.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cluster/manager/check.go b/pkg/cluster/manager/check.go index a4c931937d..f8aa399625 100644 --- a/pkg/cluster/manager/check.go +++ b/pkg/cluster/manager/check.go @@ -637,7 +637,7 @@ func fixFailedChecks(host string, res *operator.CheckResult, t *task.Builder) (s // in the sysctl check // t.Sysctl(host, "vm.swappiness", "0") t.Shell(host, - "swapoff -a", + "swapoff -a || exit 0", // ignore failure "", true, ) msg = "will try to disable swap, please also check /etc/fstab manually"