2022-09-02 00:07:34 +02:00
|
|
|
From a844460158d37bc6f984384f8edb9d369208e390 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jim Fehlig <jfehlig@suse.com>
|
|
|
|
Date: Tue, 5 Jul 2022 13:51:37 -0600
|
|
|
|
Subject: libxl: disable autoballooning
|
2019-03-14 00:35:01 +01:00
|
|
|
|
|
|
|
Xen 4.12 introduced a CONFIG_DOM0_MEM option, which our xen package uses
|
|
|
|
to configure dom0 with a sensible initial memory value and disables
|
|
|
|
autoballooning. This patch changes libvirt to also disable autoballooning
|
|
|
|
by default. It can only be enabled with the 'autoballoon' setting in
|
|
|
|
libxl.conf. See jsc#SLE-3059 for more details.
|
|
|
|
|
2022-09-02 00:07:34 +02:00
|
|
|
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
|
|
|
---
|
|
|
|
src/libxl/libxl.conf | 9 ++++-----
|
|
|
|
src/libxl/libxl_conf.c | 16 +++-------------
|
|
|
|
src/libxl/test_libvirtd_libxl.aug.in | 2 +-
|
|
|
|
3 files changed, 8 insertions(+), 19 deletions(-)
|
|
|
|
|
Accepting request 1068569 from home:jfehlig:branches:Virtualization
- Update to libvirt 9.1.0
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html#v9-1-0-2023-03-01
- spec: Remove obsolete Groups tag
- spec: Integrate upstream spec file changes that split the
libvirt-daemon package, allowing more modular, customized
installations
- spec: New subpackages libvirt-daemon-common, libvirt-daemon-lock,
libvirt-daemon-log, libvirt-daemon-proxy, and
libvirt-daemon-plugin-lockd
- spec: Renamed subpackage libvirt-lock-sanlock to
libvirt-daemon-plugin-sanlock
- Dropped patches:
ef482951-apparmor-Allow-umount-dev.patch,
d6a8b9ee-qemu-Fix-managed-no-when-creating-ethdev.patch,
c3f16cea-qemu-cleanup-label-on-umount-failure.patch,
697c16e3-qemu_process-better-debug-message.patch,
5155ab4b-qemu_namespace-nested-mounts-when-umount.patch
OBS-URL: https://build.opensuse.org/request/show/1068569
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=968
2023-03-02 01:49:27 +01:00
|
|
|
Index: libvirt-9.1.0/src/libxl/libxl.conf
|
2019-03-14 00:35:01 +01:00
|
|
|
===================================================================
|
Accepting request 1068569 from home:jfehlig:branches:Virtualization
- Update to libvirt 9.1.0
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html#v9-1-0-2023-03-01
- spec: Remove obsolete Groups tag
- spec: Integrate upstream spec file changes that split the
libvirt-daemon package, allowing more modular, customized
installations
- spec: New subpackages libvirt-daemon-common, libvirt-daemon-lock,
libvirt-daemon-log, libvirt-daemon-proxy, and
libvirt-daemon-plugin-lockd
- spec: Renamed subpackage libvirt-lock-sanlock to
libvirt-daemon-plugin-sanlock
- Dropped patches:
ef482951-apparmor-Allow-umount-dev.patch,
d6a8b9ee-qemu-Fix-managed-no-when-creating-ethdev.patch,
c3f16cea-qemu-cleanup-label-on-umount-failure.patch,
697c16e3-qemu_process-better-debug-message.patch,
5155ab4b-qemu_namespace-nested-mounts-when-umount.patch
OBS-URL: https://build.opensuse.org/request/show/1068569
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=968
2023-03-02 01:49:27 +01:00
|
|
|
--- libvirt-9.1.0.orig/src/libxl/libxl.conf
|
|
|
|
+++ libvirt-9.1.0/src/libxl/libxl.conf
|
2019-03-14 00:35:01 +01:00
|
|
|
@@ -4,12 +4,11 @@
|
|
|
|
|
|
|
|
# Enable autoballooning of domain0
|
|
|
|
#
|
|
|
|
-# By default, autoballooning of domain0 is enabled unless its memory
|
|
|
|
-# is already limited with Xen's "dom0_mem=" parameter, in which case
|
|
|
|
-# autoballooning is disabled. Override the default behavior with the
|
|
|
|
-# autoballoon setting.
|
|
|
|
+# By default, autoballooning of domain0 is disabled. Traditionally it
|
|
|
|
+# could also be disabled by using Xen's "dom0_mem=" parameter. Set to
|
|
|
|
+# 1 to enable autoballooning.
|
|
|
|
#
|
|
|
|
-#autoballoon = 1
|
|
|
|
+#autoballoon = 0
|
|
|
|
|
|
|
|
|
|
|
|
# In order to prevent accidentally starting two domains that
|
Accepting request 1068569 from home:jfehlig:branches:Virtualization
- Update to libvirt 9.1.0
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html#v9-1-0-2023-03-01
- spec: Remove obsolete Groups tag
- spec: Integrate upstream spec file changes that split the
libvirt-daemon package, allowing more modular, customized
installations
- spec: New subpackages libvirt-daemon-common, libvirt-daemon-lock,
libvirt-daemon-log, libvirt-daemon-proxy, and
libvirt-daemon-plugin-lockd
- spec: Renamed subpackage libvirt-lock-sanlock to
libvirt-daemon-plugin-sanlock
- Dropped patches:
ef482951-apparmor-Allow-umount-dev.patch,
d6a8b9ee-qemu-Fix-managed-no-when-creating-ethdev.patch,
c3f16cea-qemu-cleanup-label-on-umount-failure.patch,
697c16e3-qemu_process-better-debug-message.patch,
5155ab4b-qemu_namespace-nested-mounts-when-umount.patch
OBS-URL: https://build.opensuse.org/request/show/1068569
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=968
2023-03-02 01:49:27 +01:00
|
|
|
Index: libvirt-9.1.0/src/libxl/libxl_conf.c
|
2019-03-14 00:35:01 +01:00
|
|
|
===================================================================
|
Accepting request 1068569 from home:jfehlig:branches:Virtualization
- Update to libvirt 9.1.0
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html#v9-1-0-2023-03-01
- spec: Remove obsolete Groups tag
- spec: Integrate upstream spec file changes that split the
libvirt-daemon package, allowing more modular, customized
installations
- spec: New subpackages libvirt-daemon-common, libvirt-daemon-lock,
libvirt-daemon-log, libvirt-daemon-proxy, and
libvirt-daemon-plugin-lockd
- spec: Renamed subpackage libvirt-lock-sanlock to
libvirt-daemon-plugin-sanlock
- Dropped patches:
ef482951-apparmor-Allow-umount-dev.patch,
d6a8b9ee-qemu-Fix-managed-no-when-creating-ethdev.patch,
c3f16cea-qemu-cleanup-label-on-umount-failure.patch,
697c16e3-qemu_process-better-debug-message.patch,
5155ab4b-qemu_namespace-nested-mounts-when-umount.patch
OBS-URL: https://build.opensuse.org/request/show/1068569
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=968
2023-03-02 01:49:27 +01:00
|
|
|
--- libvirt-9.1.0.orig/src/libxl/libxl_conf.c
|
|
|
|
+++ libvirt-9.1.0/src/libxl/libxl_conf.c
|
|
|
|
@@ -1740,15 +1740,12 @@ libxlMakeBuildInfoVfb(virPortAllocatorRa
|
2019-03-14 00:35:01 +01:00
|
|
|
/*
|
|
|
|
* Get domain0 autoballoon configuration. Honor user-specified
|
|
|
|
* setting in libxl.conf first. If not specified, autoballooning
|
|
|
|
- * is disabled when domain0's memory is set with 'dom0_mem'.
|
|
|
|
- * Otherwise autoballooning is enabled.
|
|
|
|
+ * is disabled.
|
|
|
|
*/
|
|
|
|
static int
|
2021-05-18 00:14:02 +02:00
|
|
|
libxlGetAutoballoonConf(libxlDriverConfig *cfg,
|
|
|
|
virConf *conf)
|
2019-03-14 00:35:01 +01:00
|
|
|
{
|
2019-12-03 05:35:26 +01:00
|
|
|
- g_autoptr(GRegex) regex = NULL;
|
|
|
|
- g_autoptr(GError) err = NULL;
|
2019-03-14 00:35:01 +01:00
|
|
|
int res;
|
|
|
|
|
|
|
|
res = virConfGetValueBool(conf, "autoballoon", &cfg->autoballoon);
|
Accepting request 1068569 from home:jfehlig:branches:Virtualization
- Update to libvirt 9.1.0
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html#v9-1-0-2023-03-01
- spec: Remove obsolete Groups tag
- spec: Integrate upstream spec file changes that split the
libvirt-daemon package, allowing more modular, customized
installations
- spec: New subpackages libvirt-daemon-common, libvirt-daemon-lock,
libvirt-daemon-log, libvirt-daemon-proxy, and
libvirt-daemon-plugin-lockd
- spec: Renamed subpackage libvirt-lock-sanlock to
libvirt-daemon-plugin-sanlock
- Dropped patches:
ef482951-apparmor-Allow-umount-dev.patch,
d6a8b9ee-qemu-Fix-managed-no-when-creating-ethdev.patch,
c3f16cea-qemu-cleanup-label-on-umount-failure.patch,
697c16e3-qemu_process-better-debug-message.patch,
5155ab4b-qemu_namespace-nested-mounts-when-umount.patch
OBS-URL: https://build.opensuse.org/request/show/1068569
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=968
2023-03-02 01:49:27 +01:00
|
|
|
@@ -1757,15 +1754,8 @@ libxlGetAutoballoonConf(libxlDriverConfi
|
2019-03-14 00:35:01 +01:00
|
|
|
else if (res == 1)
|
|
|
|
return 0;
|
|
|
|
|
2019-12-03 05:35:26 +01:00
|
|
|
- regex = g_regex_new("(^| )dom0_mem=((|min:|max:)[0-9]+[bBkKmMgG]?,?)+($| )",
|
|
|
|
- 0, 0, &err);
|
|
|
|
- if (!regex) {
|
2019-03-14 00:35:01 +01:00
|
|
|
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
2019-12-03 05:35:26 +01:00
|
|
|
- _("Failed to compile regex %s"), err->message);
|
2019-03-14 00:35:01 +01:00
|
|
|
- return -1;
|
|
|
|
- }
|
|
|
|
-
|
2019-12-03 05:35:26 +01:00
|
|
|
- cfg->autoballoon = !g_regex_match(regex, cfg->verInfo->commandline, 0, NULL);
|
2019-03-14 00:35:01 +01:00
|
|
|
+ /* make it explicit */
|
|
|
|
+ cfg->autoballoon = 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
Accepting request 1068569 from home:jfehlig:branches:Virtualization
- Update to libvirt 9.1.0
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html#v9-1-0-2023-03-01
- spec: Remove obsolete Groups tag
- spec: Integrate upstream spec file changes that split the
libvirt-daemon package, allowing more modular, customized
installations
- spec: New subpackages libvirt-daemon-common, libvirt-daemon-lock,
libvirt-daemon-log, libvirt-daemon-proxy, and
libvirt-daemon-plugin-lockd
- spec: Renamed subpackage libvirt-lock-sanlock to
libvirt-daemon-plugin-sanlock
- Dropped patches:
ef482951-apparmor-Allow-umount-dev.patch,
d6a8b9ee-qemu-Fix-managed-no-when-creating-ethdev.patch,
c3f16cea-qemu-cleanup-label-on-umount-failure.patch,
697c16e3-qemu_process-better-debug-message.patch,
5155ab4b-qemu_namespace-nested-mounts-when-umount.patch
OBS-URL: https://build.opensuse.org/request/show/1068569
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=968
2023-03-02 01:49:27 +01:00
|
|
|
Index: libvirt-9.1.0/src/libxl/test_libvirtd_libxl.aug.in
|
2020-10-14 18:48:18 +02:00
|
|
|
===================================================================
|
Accepting request 1068569 from home:jfehlig:branches:Virtualization
- Update to libvirt 9.1.0
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html#v9-1-0-2023-03-01
- spec: Remove obsolete Groups tag
- spec: Integrate upstream spec file changes that split the
libvirt-daemon package, allowing more modular, customized
installations
- spec: New subpackages libvirt-daemon-common, libvirt-daemon-lock,
libvirt-daemon-log, libvirt-daemon-proxy, and
libvirt-daemon-plugin-lockd
- spec: Renamed subpackage libvirt-lock-sanlock to
libvirt-daemon-plugin-sanlock
- Dropped patches:
ef482951-apparmor-Allow-umount-dev.patch,
d6a8b9ee-qemu-Fix-managed-no-when-creating-ethdev.patch,
c3f16cea-qemu-cleanup-label-on-umount-failure.patch,
697c16e3-qemu_process-better-debug-message.patch,
5155ab4b-qemu_namespace-nested-mounts-when-umount.patch
OBS-URL: https://build.opensuse.org/request/show/1068569
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=968
2023-03-02 01:49:27 +01:00
|
|
|
--- libvirt-9.1.0.orig/src/libxl/test_libvirtd_libxl.aug.in
|
|
|
|
+++ libvirt-9.1.0/src/libxl/test_libvirtd_libxl.aug.in
|
2020-10-14 18:48:18 +02:00
|
|
|
@@ -2,7 +2,7 @@ module Test_libvirtd_libxl =
|
|
|
|
@CONFIG@
|
|
|
|
|
|
|
|
test Libvirtd_libxl.lns get conf =
|
|
|
|
-{ "autoballoon" = "1" }
|
|
|
|
+{ "autoballoon" = "0" }
|
|
|
|
{ "lock_manager" = "lockd" }
|
|
|
|
{ "keepalive_interval" = "5" }
|
|
|
|
{ "keepalive_count" = "5" }
|