diff options
| author | Stefan Hanreich <s.hanreich@proxmox.com> | 2025-07-29 11:29:29 +0200 | 
|---|---|---|
| committer | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2025-07-29 12:59:46 +0200 | 
| commit | f7d4f22a42a506e6cd60f0de8fbac9f580b85c6f (patch) | |
| tree | 640fcfa41d99079fbdf1e9758cce0a955f855f33 /src/PVE/API2/Network/SDN/Ipams.pm | |
| parent | d969147891eff88d6be121d10137d3a8a1c79201 (diff) | |
sdn: add global lock for configuration
Add a new cluster-wide lock for SDN that prevents any changes to the
configuration if the generated lock-token is not provided. It works
by generating and storing a token in sdn/.lock which gets checked by
lock_sdn_config on every invocation. If the lock file exists, then the
lock token has to be supplied in order to make changes to the SDN
configuration.
Lock using the domain lock (`PVE::Cluster::cfs_lock_domain`) and "sdn"
string.
This is mainly a preparation for PDM, where PDM can take the lock and
prevent concurrent modifications to the SDN configuration from other
sources, even across multiple API calls.
Co-authored-by: Gabriel Goller <g.goller@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Link: https://lore.proxmox.com/20250729092933.90118-2-g.goller@proxmox.com
 [TL: fix tests failing build as unprivileged users by mocking the
  cfs_domain_lock method]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Diffstat (limited to 'src/PVE/API2/Network/SDN/Ipams.pm')
0 files changed, 0 insertions, 0 deletions
