From 4c7f6dc01b79b27b9d0a474d9f9b7890a3044894 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Mon, 2 Sep 2024 15:34:52 +0200 Subject: [PATCH] B ##6665: Fix missing CLEANUP_MEMORY_ON_STOP for KVM migrations Fix is the same applied here: c9742ad3d798e3c (use to_s to prevent nil.upcase calls) --- src/vmm_mad/remotes/kvm/migrate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vmm_mad/remotes/kvm/migrate b/src/vmm_mad/remotes/kvm/migrate index 7594f114128..36151eedc4c 100755 --- a/src/vmm_mad/remotes/kvm/migrate +++ b/src/vmm_mad/remotes/kvm/migrate @@ -252,7 +252,7 @@ begin # Compact memory # rubocop:disable Layout/LineLength - if ENV['CLEANUP_MEMORY_ON_STOP'].upcase == 'YES' + if ENV['CLEANUP_MEMORY_ON_STOP'].to_s.upcase == 'YES' `(sudo -l | grep -q sysctl) && sudo -n sysctl vm.drop_caches=3 vm.compact_memory=1 &>/dev/null &` end # rubocop:enable Layout/LineLength