public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu 01/19] weaken machine version deprecation warning
Date: Fri,  3 Jan 2025 16:57:44 +0100	[thread overview]
Message-ID: <20250103155802.143669-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250103155802.143669-1-f.ebner@proxmox.com>

In commit a35f8577a0 ("include/hw: add macros for deprecation &
removal of versioned machines"), a new machine version deprecation and
removal policy was introduced. After only 3 years a machine version
will be deprecated while being removed after 6 years.

The deprecation is a bit early considering major PVE releases are
approximately every 2 years. This means that a deprecation warning can
already happen for a machine version that was introduced during the
previous major release. This would scare users for no good reason, so
avoid deprecating machine versions in PVE too early and define a
baseline of machine versions that will be supported throughout a
single major PVE release.

PVE will warn about deprecated machine versions when it considers them
to be deprecated, so avoid a scary-sounding warning from QEMU proper
and turn it into an informational message about pre-deprecation.

Reported-by: Martin Maurer <martin@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 ...-machine-version-deprecation-warning.patch | 56 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 57 insertions(+)
 create mode 100644 debian/patches/pve/0052-weaken-machine-version-deprecation-warning.patch

diff --git a/debian/patches/pve/0052-weaken-machine-version-deprecation-warning.patch b/debian/patches/pve/0052-weaken-machine-version-deprecation-warning.patch
new file mode 100644
index 0000000..b8cfc67
--- /dev/null
+++ b/debian/patches/pve/0052-weaken-machine-version-deprecation-warning.patch
@@ -0,0 +1,56 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Fiona Ebner <f.ebner@proxmox.com>
+Date: Fri, 3 Jan 2025 14:03:12 +0100
+Subject: [PATCH] weaken machine version deprecation warning
+
+In commit a35f8577a0 ("include/hw: add macros for deprecation &
+removal of versioned machines"), a new machine version deprecation and
+removal policy was introduced. After only 3 years a machine version
+will be deprecated while being removed after 6 years.
+
+The deprecation is a bit early considering major PVE releases are
+approximately every 2 years. This means that a deprecation warning can
+already happen for a machine version that was introduced during the
+previous major release. This would scare users for no good reason, so
+avoid deprecating machine versions in PVE too early and define a
+baseline of machine versions that will be supported throughout a
+single major PVE release.
+
+PVE will warn about deprecated machine versions when it considers them
+to be deprecated, so avoid a scary-sounding warning from QEMU proper
+and turn it into an informational message about pre-deprecation.
+
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ include/hw/boards.h | 4 +---
+ system/vl.c         | 2 +-
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/include/hw/boards.h b/include/hw/boards.h
+index 5cddeb7fcb..4f30824b57 100644
+--- a/include/hw/boards.h
++++ b/include/hw/boards.h
+@@ -619,9 +619,7 @@ struct MachineState {
+  * message for a versioned machine type
+  */
+ #define MACHINE_VER_DEPRECATION_MSG \
+-    "machines more than " stringify(MACHINE_VER_DEPRECATION_MAJOR) \
+-    " years old are subject to deletion after " \
+-    stringify(MACHINE_VER_DELETION_MAJOR) " years"
++    "machine version is rather old"
+ 
+ #define _MACHINE_VER_IS_EXPIRED_IMPL(cutoff, major, minor) \
+     (((QEMU_VERSION_MAJOR - major) > cutoff) || \
+diff --git a/system/vl.c b/system/vl.c
+index 0dbdba6421..67822c6b6c 100644
+--- a/system/vl.c
++++ b/system/vl.c
+@@ -3769,7 +3769,7 @@ void qemu_init(int argc, char **argv)
+ 
+     machine_class = MACHINE_GET_CLASS(current_machine);
+     if (!qtest_enabled() && machine_class->deprecation_reason) {
+-        warn_report("Machine type '%s' is deprecated: %s",
++        info_report("Machine type '%s': %s",
+                      machine_class->name, machine_class->deprecation_reason);
+     }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 0b48878..ffbfd29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -61,3 +61,4 @@ pve/0048-PVE-backup-fixup-error-handling-for-fleecing.patch
 pve/0049-PVE-backup-factor-out-setting-up-snapshot-access-for.patch
 pve/0050-PVE-backup-save-device-name-in-device-info-structure.patch
 pve/0051-PVE-backup-include-device-name-in-error-when-setting.patch
+pve/0052-weaken-machine-version-deprecation-warning.patch
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-01-03 15:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-03 15:57 [pve-devel] [PATCH qemu/qemu-server/docs 00/19] adapt to changes in QEMU machine version deprecation/removal Fiona Ebner
2025-01-03 15:57 ` Fiona Ebner [this message]
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 02/19] machine: drop unused parameter from assert_valid_machine_property() helper Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 03/19] move get_command_for_arch() helper to helpers module Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 04/19] helpers: improve name for variable for mapping arch to binary Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 05/19] move kvm_user_version() function to helpers module Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 06/19] move get_vm_arch() helper " Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 07/19] machine: add default_machine_for_arch() helper Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 08/19] move get_installed_machine_version() helper to machine module Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 09/19] move windows_get_pinned_machine_version() function " Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 10/19] move get_vm_machine() " Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 11/19] move meta information handling to its own module Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 12/19] machine: get vm machine: fallback to creation QEMU version for windows starting with 9.1 Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 13/19] machine: add check_and_pin_machine_string() helper Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [RFC qemu-server 14/19] api: update vm config: pin machine version when switching to windows os type Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 15/19] machine: log informational line when pinning machine version for Windows guest Fiona Ebner
2025-01-03 15:57 ` [pve-devel] [PATCH qemu-server 16/19] machine: rename machine_version() function to machine_version_at_least() Fiona Ebner
2025-01-03 15:58 ` [pve-devel] [PATCH qemu-server 17/19] machine: adapt to changes in QEMU machine version deprecation/removal Fiona Ebner
2025-01-03 15:58 ` [pve-devel] [PATCH qemu-server 18/19] machine: code cleanup: avoid superfluous augmented assignment operator Fiona Ebner
2025-01-03 15:58 ` [pve-devel] [PATCH docs 19/19] qm: machine version: document support in PVE Fiona Ebner
2025-01-04  7:58 ` [pve-devel] [PATCH qemu/qemu-server/docs 00/19] adapt to changes in QEMU machine version deprecation/removal Dietmar Maurer
2025-01-04  8:00   ` Dietmar Maurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250103155802.143669-2-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal