]> git.proxmox.com Git - pve-access-control.git/commit
add realm-sync plugin for jobs and CRUD api for realm-sync-jobs
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 17 Jan 2023 11:46:54 +0000 (12:46 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Jun 2023 06:01:07 +0000 (08:01 +0200)
commitdc982c4b76772963ee8cfd45cceea70d3d283f9c
treee6fe2ddd3ea96ce630efcb592009e0f6fded05b7
parent53a2b71563d77bfe6fdaaa209522ec43725cf1f0
add realm-sync plugin for jobs and CRUD api for realm-sync-jobs

to be able to define automated jobs that sync ldap/ad

The jobs plugin contains special handling when no node is given, since
we only want it to run on a single node when that triggers. For that,
we save a statefile in /etc/pve/priv/jobs/ which contains the
node/time/upid of the node that runs the job. The first node that
is able to lock the realm (via cfs_lock_domain) "wins" and may
sync from the ldap.

in case a specific node was selected, this is omitted and the Jobs
handling will not let it run on other nodes anyway

the API part is our usual sectionconfig CRUD api, but specialized
for the specific type of job.

the api will be at /cluster/jobs/realm-sync
(this must be done in pve-manager)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: resolve merge conflict due to packaging/source split ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/API2/AccessControl/Makefile [new file with mode: 0644]
src/PVE/API2/AccessControl/RealmSync.pm [new file with mode: 0644]
src/PVE/API2/Makefile
src/PVE/Jobs/Makefile [new file with mode: 0644]
src/PVE/Jobs/RealmSync.pm [new file with mode: 0644]
src/PVE/Makefile