[pve-devel] [RFC 0/6] Add 'cluster' CPU type

Stefan Reiter s.reiter at proxmox.com
Wed Jul 17 15:03:42 CEST 2019


This patch series introduces a new CPU type 'cluster', which automatically
creates the best CPU configuration in terms of feature-flags, that can still be
live-migrated to every machine in a cluster.  It does so by querying supported
CPU flags on each host from QEMU and broadcasting those flags as cluster state
(key-value pair 'cpuflags').

The way that supported CPU flags are retrieved (patch 4/5) is rather clumsy.  I
could not find another reliable way to get *truly* supported CPU flags though,
and this is also how libvirt handles it. You'd think QEMU could just expose a
CLI function for this...


One of the things I think would be useful is a check in the pre-join conditions.
If a new machine with different or less features (e.g. adding an AMD machine to
an Intel cluster) is added to a cluster that has machines running with 'cluster'
CPUs, it is not guaranteed that migration will work (potentially bad for HA).

Would this be a fail condition though? Is there a way to "warn" the user before
the node finishes it's join?


I'll add documentation (including some info on why CPU types/flags are important
in general, think SSE/AVX/...) once this series is finalized.


common: Stefan Reiter (2):
  Include CPU flags in read_cpuinfo
  Add array_intersect and array_unique functions

 src/PVE/ProcFSTools.pm | 10 +++++++---
 src/PVE/Tools.pm       | 29 +++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 3 deletions(-)

manager: Stefan Reiter (1):
  Broadcast supported CPU flags and allow 'cluster' CPU type

 PVE/Service/pvestatd.pm               | 11 +++++++++--
 www/manager6/form/CPUModelSelector.js |  4 ++--
 2 files changed, 11 insertions(+), 4 deletions(-)

qemu-server: Stefan Reiter (3):
  Add QEMU CPU flag querying helpers
  Add support for 'cluster' CPU type
  Add blacklist to cluster cpu flags

 PVE/QemuServer.pm                      | 149 ++++++++++++++++++++++++-
 test/cfg2cmd/minimal-defaults.conf.cmd |   2 +-
 test/cfg2cmd/simple1.conf.cmd          |   2 +-
 3 files changed, 149 insertions(+), 4 deletions(-)

-- 
2.20.1




More information about the pve-devel mailing list