[pve-devel] [PATCHSET] pve-cluster split

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Nov 6 13:36:01 CET 2019


this patch set attempts to rectify a long-standing issue with our
pve-cluster packaging:
- the combination of pmxcfs+ipcc+binding and various other more or less
  cluster-related perl code in mostly one perl module (PVE::Cluster) and
  binary package (pve-cluster)
- a cyclic dependency between pve-access-control and pve-cluster

to tackle both issues, pve-cluster gets split into two independent
parts:
- pve-cluster: pmxcfs+IPCC+cfs_*
- libpve-cluster(-api)-perl: rest of the perl code

and pve-access-control gets split into two binary packages:
- libpve-access-control: low level code, including RPCEnvironment
- libpve-access-control-api-perl: API2 modules + pveum

the (simplified) dependency graph now looks like this

pve-manager -> libpve-cluster-api-perl -> libpve-cluster-perl -> pve-cluster
                                                              -> libpve-access-control -> pve-cluster
                                       -> libpve-access-control -> pve-cluster
            -> libpve-access-control-api-perl -> libpve-cluster-perl -> pve-cluster
                                              -> libpve-access-control -> pve-cluster

with almost all other PVE packages depending on libpve-access-control
(RPCEnvironment), libpve-cluster-perl (DataCenterConfig, SSHInfo) and
pve-cluster (cfs_*).

some notable high-level changes:
- datacenter.cfg got its own perl module PVE::DataCenterConfig (libpve-cluster-perl)
- *ssh_info* got its own perl module PVE::SSHInfo (libpve-cluster-perl)
- the certificate cache got moved (back!) to pve-manager
- the pvecm call in ExecStartPost of pve-cluster.service got moved to ExecStartPre of pveproxy.service

some other cleanups / cruft removal / missing control metadata / etc.pp. is also
included. I tried to keep general cleanups up-front, as always.

for building, the following order should work:

pve-common
pve-docs
pve-cluster
pve-access-control
pve-ha-manager
pve-storage
pve-guest-common
pve-container
qemu-server
pve-manager
pve-firewall

tested with upgraded stand-alone and clustered setups, as well as
install on-top of Debian Buster, but obviously given the number of
changes this could benefit from some additional smoke-testing ;)

pve-common:

Fabian Grünbichler (2):
  cert: add fingerprint helper
  bump version to 6.0-7~test1

 debian/changelog       |  6 ++++++
 src/PVE/Certificate.pm | 14 ++++++++++++++
 2 files changed, 20 insertions(+)

base-commit: 484b6b398b51632a08dda75d865488610b79dc6b


pve-docs:

Fabian Grünbichler (2):
  use PVE::DataCenterConfig to get schema
  bump version to 6.0-9~test1

 debian/changelog             | 6 ++++++
 gen-datacenter.cfg.5-opts.pl | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

base-commit: d1fdb121e5f8a90fc510970776938062eceb5d5c


pve-cluster:

Fabian Grünbichler (16):
  d/control: add missing build-depends
  remove unused Data::Dumper import
  use PVE::Certificate to read fingerprint
  move RRD creating into own file
  move cluster setup related code to own file
  move corosync_link schema to Corosync.pm
  move certificate cache to own file
  move CertCache to pve-manager
  move datacenter.cfg to own file
  datacenter.cfg: parse/print u2f property string
  move ssh_info code to own file
  get_ssh_info: try via API first
  d/control: add versioned breaks
  split package into pve-cluster/pmxcfs and perl modules
  pve-cluster.service: move pvecm call to pveproxy.service
  bump version to 6.0-8~test1

 data/PVE/Cluster/Makefile                     |    2 +-
 data/PVE/Makefile                             |    2 +-
 data/PVE/API2/ClusterConfig.pm                |   23 +-
 data/PVE/CLI/pvecm.pm                         |   64 +-
 data/PVE/Cluster.pm                           | 1298 +----------------
 data/PVE/Cluster/Setup.pm                     |  744 ++++++++++
 data/PVE/Corosync.pm                          |   32 +
 data/PVE/DataCenterConfig.pm                  |  245 ++++
 data/PVE/RRD.pm                               |  134 ++
 data/PVE/SSHInfo.pm                           |   99 ++
 debian/changelog                              |    6 +
 debian/control                                |   65 +-
 debian/install                                |    1 -
 debian/libpve-cluster-api-perl.docs           |    1 +
 debian/libpve-cluster-api-perl.install        |    7 +
 ...ggers => libpve-cluster-api-perl.triggers} |    0
 debian/libpve-cluster-perl.docs               |    1 +
 debian/libpve-cluster-perl.install            |    5 +
 debian/{dirs => pve-cluster.dirs}             |    0
 debian/{docs => pve-cluster.docs}             |    0
 debian/pve-cluster.install                    |    8 +
 debian/pve-cluster.service                    |    1 -
 debian/rules                                  |    3 +
 23 files changed, 1409 insertions(+), 1332 deletions(-)
 create mode 100644 data/PVE/Cluster/Setup.pm
 create mode 100644 data/PVE/DataCenterConfig.pm
 create mode 100644 data/PVE/RRD.pm
 create mode 100644 data/PVE/SSHInfo.pm
 delete mode 100644 debian/install
 create mode 100644 debian/libpve-cluster-api-perl.docs
 create mode 100644 debian/libpve-cluster-api-perl.install
 rename debian/{pve-cluster.triggers => libpve-cluster-api-perl.triggers} (100%)
 create mode 100644 debian/libpve-cluster-perl.docs
 create mode 100644 debian/libpve-cluster-perl.install
 rename debian/{dirs => pve-cluster.dirs} (100%)
 rename debian/{docs => pve-cluster.docs} (100%)
 create mode 100644 debian/pve-cluster.install

base-commit: 0f0094460100061c42c1625e7d8fa240e73da26b


pve-access-control:

Fabian Grünbichler (13):
  build: bump compat to 10
  build: use dh_missing
  build: leave man page compression to dh_docs
  d/control: remove outdated dependencies
  pveum: cleanup outdated use statements
  pveum: don't unconditionally create auth key
  ticket: use clinfo to get cluster name
  use PVE::DataCenterConfig
  use already parsed u2f property string
  d/control: correctly set Architecture field
  d/control: (build-)depend on libpve-cluster-perl
  add new api/cli binary package and bump version
  bump version to 6.0-4~test1

 Makefile                                      | 15 +++++-----
 PVE/API2/AccessControl.pm                     | 18 +++---------
 PVE/CLI/pveum.pm                              |  9 +-----
 debian/changelog                              |  8 ++++++
 debian/compat                                 |  2 +-
 debian/control                                | 28 +++++++++++++++----
 ...cs => libpve-access-control-api-perl.docs} |  0
 debian/libpve-access-control-api-perl.install |  7 +++++
 ...> libpve-access-control-api-perl.postinst} |  0
 ...> libpve-access-control-api-perl.triggers} |  0
 debian/libpve-access-control.docs             |  1 +
 debian/libpve-access-control.install          |  8 ++++++
 debian/rules                                  |  3 ++
 pveum                                         |  7 +----
 14 files changed, 64 insertions(+), 42 deletions(-)
 rename debian/{docs => libpve-access-control-api-perl.docs} (100%)
 create mode 100644 debian/libpve-access-control-api-perl.install
 rename debian/{postinst => libpve-access-control-api-perl.postinst} (100%)
 rename debian/{triggers => libpve-access-control-api-perl.triggers} (100%)
 create mode 100644 debian/libpve-access-control.docs
 create mode 100644 debian/libpve-access-control.install

base-commit: 6e5bbca424d32bc40edda38c5865fd06150672fd


pve-storage:

Fabian Grünbichler (6):
  use correct local IP address helper
  use PVE::DataCenterConfig
  use PVE::SSHInfo
  use PVE::RRD for RRD data
  d/control: add (build-)depends on libpve-cluster-perl
  bump version to 6.0-10~test1

 PVE/API2/Storage/Content.pm |  3 ++-
 PVE/API2/Storage/Status.pm  |  5 +++--
 PVE/CLI/pvesm.pm            |  5 ++++-
 PVE/Storage.pm              |  6 ++++--
 debian/changelog            | 12 ++++++++++++
 debian/control              |  2 ++
 6 files changed, 27 insertions(+), 6 deletions(-)

base-commit: 83a9960c7139447e767009f81372eb25dd87c2ba


pve-guest-common:

Fabian Grünbichler (5):
  use PVE::DataCenterConfig
  use PVE::SSHInfo
  d/control: add (build-)depends on libpve-cluster-perl
  d/control: add more missing build-dependencies
  bump version to 3.0-3~test1

 PVE/AbstractMigrate.pm |  6 ++++--
 PVE/Replication.pm     | 10 ++++++----
 debian/changelog       |  6 ++++++
 debian/control         |  7 ++++++-
 4 files changed, 22 insertions(+), 7 deletions(-)

base-commit: 7a6a1a4b3735add09b9d12170f15f40f6915dd42


pve-container:

Fabian Grünbichler (5):
  test: mock PVE::Cluster in setup tests
  test: add 'use PVE::LXC::Config' to setup test
  use PVE::DataCenterConfig
  use PVE::RRD for RRD data
  bump version to 3.0-11~test11

 debian/changelog            | 14 ++++++++++++++
 debian/control              |  2 ++
 src/PVE/API2/LXC.pm         |  6 ++++--
 src/PVE/LXC/Config.pm       |  1 +
 src/PVE/LXC/Create.pm       |  1 +
 src/test/run_setup_tests.pl | 19 +++++++++++++++++++
 6 files changed, 41 insertions(+), 2 deletions(-)

base-commit: f71db91bbd7e6644bfa92b5ac6adf3c7f84d83eb


qemu-server:

Fabian Grünbichler (12):
  move 'use UUID' statement to correct file
  test: mock PVE::ReplicationConfig->new
  test: mock PVE::Storage for all tests
  d/control: add build-dependency on pve-qemu-kvm
  d/control: add build-dependency on pve-edk2-firmware
  d/control: add build-dependency on pkg-config
  use PVE::DataCenterConfig
  use PVE::SSHInfo
  use PVE::RRD for RRD data
  refactor migration IP retrieval
  d/control: add (build-)depends on libpve-cluster-perl
  bump version to 6.0-14~test1

 PVE/API2/Qemu.pm      | 16 +++++++++-------
 PVE/QemuServer.pm     | 42 +++++++++++++++++++++++++++++++++---------
 debian/changelog      | 12 ++++++++++++
 debian/control        |  7 ++++++-
 test/snapshot-test.pm | 25 ++++++++++++-------------
 5 files changed, 72 insertions(+), 30 deletions(-)

base-commit: 7be54044ef3105639928b6b2ee8fa7bf0be73401


pve-ha-manager:

Fabian Grünbichler (2):
  use PVE::DataCenterConfig
  bump version to 3.0-3~test1

 debian/changelog       | 16 ++++++++++++++++
 debian/control         |  2 ++
 src/PVE/HA/Env/PVE2.pm |  1 +
 3 files changed, 19 insertions(+)

base-commit: c9b21b5a0bf7288bd437d2b02d87435438884601


pve-manager:

Fabian Grünbichler (12):
  takeover CertCache from pve-cluster
  use PVE::DataCenterConfig
  API: add node address(es) API endpoint
  test: mock PVE::SSHInfo module
  use PVE::RRD for RRD data
  pveproxy.service: take over pvecm call from pve-cluster.service
  test: also mock cfs_read_file
  d/control: add (build-)depends on libpve-cluster-perl
  d/control: add (build-)depends on libpve-cluster-api-perl
  d/control: bump versioned b-d on libpve-guest-common-perl
  d/control: add dependency on libpve-access-control-api-perl
  bump version to 6.0-12~test1

 PVE/Makefile               |  1 +
 PVE/API2.pm                |  1 +
 PVE/API2/APT.pm            |  1 +
 PVE/API2/Cluster.pm        |  3 +-
 PVE/API2/Nodes.pm          | 78 +++++++++++++++++++++++++++++++-
 PVE/API2/Subscription.pm   |  1 +
 PVE/API2Tools.pm           |  1 +
 PVE/CLI/pveam.pm           |  1 +
 PVE/CertCache.pm           | 92 ++++++++++++++++++++++++++++++++++++++
 PVE/HTTPServer.pm          |  5 ++-
 PVE/Service/pveproxy.pm    |  1 +
 PVE/VZDump.pm              |  1 +
 bin/pvemailforward.pl      |  1 +
 bin/pveupdate              |  1 +
 debian/changelog           | 18 ++++++++
 debian/control             |  9 +++-
 services/pveproxy.service  |  1 +
 test/ReplicationTestEnv.pm | 15 ++++++-
 18 files changed, 223 insertions(+), 8 deletions(-)
 create mode 100644 PVE/CertCache.pm

base-commit: 9dec675a320d53b721192a47d337858de8ae3e22


pve-firewall:

Fabian Grünbichler (1):
  d/control: add (build-)depends on libpve-cluster-perl

 debian/control | 2 ++
 1 file changed, 2 insertions(+)

base-commit: e1639957a44ea8d42fbf8ea8e0b997fbe92b0aa8




More information about the pve-devel mailing list