[pve-devel] [PATCH-SERIES qemu-server v5 00/16] more robust handling of fleecing images

Fiona Ebner f.ebner at proxmox.com
Mon Jan 27 12:29:07 CET 2025


Changes in v5:
* everything new in v5 except the last 3 patches
* new approach, use special config section instead of config key
* add tests and some fixes for configuration handling
* make special section handling more generic
* also check for and cancel left-over running backup job before
  detaching the fleecing images to prevent a deadlock in some
  scenarios

Record the created fleecing images in the VM configuration to be able
to remove left-overs after hard failures.

Adds a new special configuration section 'fleecing', making special
section handling more generic as preparation, as well as fixing some
corner cases in configuration parsing and adding tests.

Fiona Ebner (16):
  migration: remove unused variable
  test: avoid duplicate mock module in restore config test
  test: add parse config tests
  parse config: be precise about section type checks
  test: add test case exposing issue with unknown sections
  parse config: skip unknown sections and warn about their presence
  vzdump: anchor matches for pending and special sections
  vzdump: skip all special sections
  config: make special section handling generic
  test: parse config: test config with duplicate sections
  parse config: warn about duplicate sections
  check type: require schema as an argument
  config: add fleecing section
  fix #5440: vzdump: better cleanup fleecing images after hard errors
  migration: attempt to clean up potential left-over fleecing images
  destroy vm: clean up potential left-over fleecing images

 PVE/API2/Qemu.pm                              |  22 +-
 PVE/QemuConfig.pm                             |  84 +++++++-
 PVE/QemuMigrate.pm                            |   8 +-
 PVE/QemuServer.pm                             |  97 ++++++---
 PVE/QemuServer/Cloudinit.pm                   |   8 +-
 PVE/VZDump/QemuServer.pm                      |  50 ++++-
 test/Makefile                                 |   7 +-
 .../cloudinit-snapshot.conf                   |  40 ++++
 .../cloudinit-snapshot.conf.strict.error      |   1 +
 .../duplicate-sections.conf                   |  43 ++++
 .../duplicate-sections.conf.strict.error      |   1 +
 .../unknown-sections.conf                     |  44 ++++
 .../unknown-sections.conf.strict.error        |   1 +
 .../verify-snapshot.conf                      |  36 ++++
 .../verify-snapshot.conf.strict.error         |   1 +
 .../cloudinit-snapshot.conf                   |  41 ++++
 .../duplicate-sections.conf                   |  68 +++++++
 test/parse-config-input/fleecing-section.conf |  20 ++
 test/parse-config-input/locked.conf           |  16 ++
 test/parse-config-input/plain.conf            |  15 ++
 test/parse-config-input/regular-vm-efi.conf   |  16 ++
 test/parse-config-input/sections.conf         |  44 ++++
 test/parse-config-input/snapshots.conf        | 189 ++++++++++++++++++
 test/parse-config-input/unknown-sections.conf |  57 ++++++
 test/parse-config-input/verify-snapshot.conf  |  37 ++++
 test/run_parse_config_tests.pl                |  92 +++++++++
 test/run_qemu_restore_config_tests.pl         |  12 +-
 27 files changed, 992 insertions(+), 58 deletions(-)
 create mode 100644 test/parse-config-expected/cloudinit-snapshot.conf
 create mode 100644 test/parse-config-expected/cloudinit-snapshot.conf.strict.error
 create mode 100644 test/parse-config-expected/duplicate-sections.conf
 create mode 100644 test/parse-config-expected/duplicate-sections.conf.strict.error
 create mode 100644 test/parse-config-expected/unknown-sections.conf
 create mode 100644 test/parse-config-expected/unknown-sections.conf.strict.error
 create mode 100644 test/parse-config-expected/verify-snapshot.conf
 create mode 100644 test/parse-config-expected/verify-snapshot.conf.strict.error
 create mode 100644 test/parse-config-input/cloudinit-snapshot.conf
 create mode 100644 test/parse-config-input/duplicate-sections.conf
 create mode 100644 test/parse-config-input/fleecing-section.conf
 create mode 100644 test/parse-config-input/locked.conf
 create mode 100644 test/parse-config-input/plain.conf
 create mode 100644 test/parse-config-input/regular-vm-efi.conf
 create mode 100644 test/parse-config-input/sections.conf
 create mode 100644 test/parse-config-input/snapshots.conf
 create mode 100644 test/parse-config-input/unknown-sections.conf
 create mode 100644 test/parse-config-input/verify-snapshot.conf
 create mode 100755 test/run_parse_config_tests.pl

-- 
2.39.5





More information about the pve-devel mailing list