public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH common/access-control/wt/manager v3] add realm sync jobs
Date: Tue, 17 Jan 2023 12:46:51 +0100	[thread overview]
Message-ID: <20230117114659.2397499-1-d.csapak@proxmox.com> (raw)

with this, users now can schedule realm sync jobs, instead of manually
pressing 'sync' or configuring a cronjob for 'pveum realm sync'

the access-control patch needs special care, since i try to sync
independent pve-scheduler calls across the cluster. in my tests here
it worked, but that does not mean i didn't overlook some things.

access-control depends on pve-common and pve-manager depends
on access-control and widget-toolkit

the most notable changes (beside what thomas said in the review) is
that i moved the api from /access/jobs to /cluster/jobs, since we
already have that, and it made more sense to have it there
(especially if we want to have more type of 'jobs' later on, having
them all in one place makes more sense).

if we rather want to have it in /access/jobs (like i sent it last)
i can make the change and send a v4 (should be relatively trivial)

changes from v2:
* incorporated thomas suggestions:
  - typo fixes
  - use of register_standard_option for reuse
  - better description
  - omitting of the 'node' parameter, always schedule in cluster
  - use 'realm-sync' as 'domain' for cluster locking
  - refactor/reuse state saving/reading
  - refactor crud ap update delete checks
    (if we go forward with this series, i'll send patches to make use
    of this in other parts of our code)
  - renamed 'realmsync' to 'realm-sync'
    (this made it necessary to change the regex in the job cleanup
    slightly, see pve-manager patch 1/4)
* moved crud api to /cluster/jobs (was /access/jobs)
* removed calls to PVE::Jobs from AccessControl
  (was an implicit cyclic dependency, but actually not necessary)

changes from v1:
* include thomas suggestions
* add patches to allow 'none' for remove-vanished
* add patch for wt that allows filtering for the realm combobox
* load the default values (if any) from the realm on sync job create,
  but not on edit

pve-common:

Dominik Csapak (1):
  SectionConfig: add helper to delete keys from a section config entry

 src/PVE/SectionConfig.pm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

pve-access-control:

Dominik Csapak (2):
  realm sync: refactor scope/remove-vanished into a standard option
  add realm-sync plugin for jobs and CRUD api for realm-sync-jobs

 src/PVE/API2/AccessControl/Makefile     |   6 +
 src/PVE/API2/AccessControl/RealmSync.pm | 292 ++++++++++++++++++++++++
 src/PVE/API2/Makefile                   |   4 +
 src/PVE/Auth/Plugin.pm                  |  42 ++--
 src/PVE/Jobs/Makefile                   |   6 +
 src/PVE/Jobs/RealmSync.pm               | 201 ++++++++++++++++
 src/PVE/Makefile                        |   1 +
 7 files changed, 533 insertions(+), 19 deletions(-)
 create mode 100644 src/PVE/API2/AccessControl/Makefile
 create mode 100644 src/PVE/API2/AccessControl/RealmSync.pm
 create mode 100644 src/PVE/Jobs/Makefile
 create mode 100644 src/PVE/Jobs/RealmSync.pm

proxmox-widget-toolkit:

Dominik Csapak (1):
  RealmComboBox: add custom store filters for callers

 src/form/RealmComboBox.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

pve-manager:

Dominik Csapak (4):
  Jobs: include existing types in state file regex for deletion
  Jobs: add RealmSync Plugin and register it
  api: add realm-sync crud api to /cluster/jobs
  ui: add Realm Sync panel

 PVE/API2/Cluster/Jobs.pm        |   7 +
 PVE/Jobs.pm                     |   7 +-
 www/manager6/Makefile           |   1 +
 www/manager6/dc/Config.js       |   7 +
 www/manager6/dc/RealmSyncJob.js | 364 ++++++++++++++++++++++++++++++++
 5 files changed, 385 insertions(+), 1 deletion(-)
 create mode 100644 www/manager6/dc/RealmSyncJob.js

-- 
2.30.2





             reply	other threads:[~2023-01-17 11:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 11:46 Dominik Csapak [this message]
2023-01-17 11:46 ` [pve-devel] [PATCH common v3 1/1] SectionConfig: add helper to delete keys from a section config entry Dominik Csapak
2023-03-08  6:53   ` Thomas Lamprecht
2023-03-11 17:23     ` [pve-devel] applied: " Thomas Lamprecht
2023-01-17 11:46 ` [pve-devel] [PATCH access-control v3 1/2] realm sync: refactor scope/remove-vanished into a standard option Dominik Csapak
2023-03-08 11:43   ` [pve-devel] applied: " Thomas Lamprecht
2023-01-17 11:46 ` [pve-devel] [PATCH access-control v3 2/2] add realm-sync plugin for jobs and CRUD api for realm-sync-jobs Dominik Csapak
2023-06-07  8:38   ` [pve-devel] applied: " Thomas Lamprecht
2023-01-17 11:46 ` [pve-devel] [PATCH widget-toolkit v3 1/1] RealmComboBox: add custom store filters for callers Dominik Csapak
2023-03-14 14:26   ` [pve-devel] applied: " Thomas Lamprecht
2023-01-17 11:46 ` [pve-devel] [PATCH manager v3 1/4] Jobs: include existing types in state file regex for deletion Dominik Csapak
2023-01-17 11:46 ` [pve-devel] [PATCH manager v3 2/4] Jobs: add RealmSync Plugin and register it Dominik Csapak
2023-01-17 11:46 ` [pve-devel] [PATCH manager v3 3/4] api: add realm-sync crud api to /cluster/jobs Dominik Csapak
2023-01-17 11:46 ` [pve-devel] [PATCH manager v3 4/4] ui: add Realm Sync panel Dominik Csapak
2023-03-07  8:06 ` [pve-devel] [PATCH common/access-control/wt/manager v3] add realm sync jobs Dominik Csapak
2023-05-03  7:35 ` Dominik Csapak
2023-06-07  9:59 ` Thomas Lamprecht

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=20230117114659.2397499-1-d.csapak@proxmox.com \
    --to=d.csapak@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