[pve-devel] [RFC cluster v2 00/10] Allow adding a node to a cluster over API

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Dec 4 12:11:07 CET 2017


changes v1 -> 2:
* 7/10, 8/10, 9/10, 10/10 are new - mostly moving also the create
  cluster to the API and preparing for the UI component
* prev. 1/6 - 5/6 stayed the same
* prev. 6/6 (now 6/10): use PVE::PTY directly, not the CLIHandler
  wrapper

So mostly new patches where added, re-sent for easier review.

Fabian, it would be really great if you could take a look at this in
the next days.

Previous cover letter, for reference:

Initially, I picked up Dietmars work on this posted last year:
https://pve.proxmox.com/pipermail/pve-devel/2016-November/024222.html
Adopting the then not-existing PVE API client library.
Fabian then told me that the idea of a cluster CA was rejected as not
ideal in off-list discussion, so I dropped those part of the series.
(But FYI, as I had this already rebased and slightly tested I'll keep
the branch here, maybe parts of it become useful)

So this is thus only the "join over API" part of this series.
As quite a bit happened in the last year, especially the new apiclient
and other refactoring in the cluster almost all of this can be seen as
new changes.

There's also a fallback to the old code, one which can be forced by the
user and another which checks if the pve-cluster package is recent
enough for the add to succeed.

This series uses the not yet packaged PTY/read_password series from
Wolfgang B.

RFC, especially if the general approach seems OK.

cheers,
Thomas

Thomas Lamprecht (10):
  move addnode/delnode from CLI to cluster config API
  node add: factor out code
  return cluster config and authkey in addnode API call
  api: add joint cluster endpoint
  api/join: check if peer supports addnode over API
  pvecm: add: use API by default
  cluster create: factor out initial corosync config assembly
  cluster create: restart corosync & pmxfs in one go and say so
  move cluster create to API
  api/cluster: add join_info endpoint

 data/PVE/API2/ClusterConfig.pm | 504 ++++++++++++++++++++++++++++++++++++-
 data/PVE/CLI/pvecm.pm          | 559 ++++-------------------------------------
 data/PVE/Cluster.pm            | 146 +++++++++++
 data/PVE/Corosync.pm           |  73 ++++++
 debian/control.in              |   2 +
 5 files changed, 768 insertions(+), 516 deletions(-)

-- 
2.11.0





More information about the pve-devel mailing list