summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNataliia S. <81954790+natali-rs1985@users.noreply.github.com>2025-07-24 16:33:11 +0200
committerGitHub <noreply@github.com>2025-07-24 15:33:11 +0100
commitd37cca0672b71691614da0a0f770eaf0fe117fa4 (patch)
tree02980494244a71b8b88eb3de3a58ad84ff8378c1 /python
parent255306c2c207d1de082261c65479683869ad377a (diff)
downloadvyos-1x-d37cca0672b71691614da0a0f770eaf0fe117fa4.tar.gz
vyos-1x-d37cca0672b71691614da0a0f770eaf0fe117fa4.zip
T7658: T7656: Changes for max-map-count parameter (#53)
* T7658: Increase max-map-count interval and default value to linux default Also input a warning instead of ConfigError in case of "host-resources max-map-count" didn't pass the verification * T7656: Clarify warning message for max-map-count option verification
Diffstat (limited to 'python')
-rw-r--r--python/vyos/vpp/config_verify.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/vyos/vpp/config_verify.py b/python/vyos/vpp/config_verify.py
index 65dfac91a..f6c47d0c0 100644
--- a/python/vyos/vpp/config_verify.py
+++ b/python/vyos/vpp/config_verify.py
@@ -19,6 +19,7 @@
import psutil
from vyos import ConfigError
+from vyos.base import Warning
from vyos.utils.cpu import get_core_count as total_core_count
from vyos.vpp.control_host import get_eth_driver
@@ -398,6 +399,8 @@ def verify_vpp_host_resources(config: dict):
hugepages = mem_checks.get_hugepages_total()
if max_map_count < 2 * hugepages:
- raise ConfigError(
- 'The max_map_count must be greater than or equal to (2 * HugePages_Total)'
+ Warning(
+ 'The max-map-count should be greater than or equal to (2 * HugePages_Total) '
+ 'or VPP could work not properly. Please set up '
+ f'"vpp settings host-resources max-map-count" to {2 * hugepages} or higher'
)