代码拉取完成,页面将自动刷新
From 09ab1debcc752ed7d9dbff5731450f9a0df7761a Mon Sep 17 00:00:00 2001
From: zhangqiumiao <zhangqiumiao1@huawei.com>
Date: Wed, 23 Sep 2020 11:23:11 +0800
Subject: [PATCH] enable kdump and set default reserve memory 512M
---
com_redhat_kdump/common.py | 2 +-
com_redhat_kdump/service/kdump.py | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/com_redhat_kdump/common.py b/com_redhat_kdump/common.py
index b8450c8..992d63e 100644
--- a/com_redhat_kdump/common.py
+++ b/com_redhat_kdump/common.py
@@ -71,7 +71,7 @@ def getMemoryBounds():
minUsable = 1024
step = 1
elif arch == 'aarch64':
- lowerBound = 768
+ lowerBound = 512
minUsable = 768
step = 1
else:
diff --git a/com_redhat_kdump/service/kdump.py b/com_redhat_kdump/service/kdump.py
index ff902b7..2764e6a 100644
--- a/com_redhat_kdump/service/kdump.py
+++ b/com_redhat_kdump/service/kdump.py
@@ -47,8 +47,13 @@ class KdumpService(KickstartService):
self._fadump_enabled = False
self.fadump_enabled_changed = Signal()
- self.reserveMB = "auto"
lower, upper, step = getMemoryBounds()
+ # set default reserveMB
+ # ensure that 512M is not out of MemoryBounds
+ if (upper > 512):
+ self._reserved_memory = "512"
+ else:
+ self._reserved_memory = "%d" % lower
self.reserved_memory_changed = Signal()
def publish(self):
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。