Update IP reservation logic to include 'reserved' status in available IPs
This commit is contained in:
@@ -304,9 +304,7 @@ class AssignIpToGuestJob implements ShouldQueue
|
|||||||
->toArray();
|
->toArray();
|
||||||
|
|
||||||
$ipPool = IpPool::where('module_network_id', $networkId)
|
$ipPool = IpPool::where('module_network_id', $networkId)
|
||||||
->where('status', 'free')
|
->whereIn('status', ['free', 'reserved'])
|
||||||
->whereNotNull('gateway')
|
|
||||||
->where('gateway', '!=', '')
|
|
||||||
->whereNotIn('ip_address', $usedIps)
|
->whereNotIn('ip_address', $usedIps)
|
||||||
->lockForUpdate()
|
->lockForUpdate()
|
||||||
->inRandomOrder()
|
->inRandomOrder()
|
||||||
|
|||||||
Reference in New Issue
Block a user