mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
Interfaces: Virtual IPs: Settings - fix config locking when deleting a node.
This is a bit of a tricky one, delBase() always locks, which enforces the proper sequence in concurrent operations, but when reading the config first with getModel(), we are locking the wrong state (memory doesn't equal disk anymore).
This commit is contained in:
parent
b0f3e131f5
commit
ad2e5e7515
@ -176,6 +176,7 @@ class VipSettingsController extends ApiMutableModelControllerBase
|
||||
|
||||
public function delItemAction($uuid)
|
||||
{
|
||||
Config::getInstance()->lock();
|
||||
$node = $this->getModel()->getNodeByReference('vip.' . $uuid);
|
||||
$validations = $this->getModel()->whereUsed((string)$node->subnet);
|
||||
if (!empty($validations)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user