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();
|
||||
|
||||
$ipPool = IpPool::where('module_network_id', $networkId)
|
||||
->where('status', 'free')
|
||||
->whereNotNull('gateway')
|
||||
->where('gateway', '!=', '')
|
||||
->whereIn('status', ['free', 'reserved'])
|
||||
->whereNotIn('ip_address', $usedIps)
|
||||
->lockForUpdate()
|
||||
->inRandomOrder()
|
||||
|
||||
Reference in New Issue
Block a user