switch over to spawning new capsuls on public2 network

This commit is contained in:
forest 2022-04-12 14:21:26 -05:00
parent d2f41a1be3
commit 5641b22246
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ def can_claim_create(payload, host_id) -> (str, str):
# hard-code the network name and IP for now until we can implement https://git.cyberia.club/cyberia/capsul-flask/issues/11
# enable static IP -> capsul mapping via libvirt (manage MAC addresses)
payload["network_name"] = 'public3'
payload["network_name"] = 'public2'
payload["public_ipv4"] = ""
return payload, ""

View File

@ -20,7 +20,7 @@ if [ "$ram_bytes_remainder" -le $((20 * 1024 * 1024 * 1024)) ]; then
fi
ipv4_limit=61
total_addresses_used=$(virsh net-dhcp-leases public3 | grep -E '.+' | tail -n +3 | wc -l)
total_addresses_used=$(virsh net-dhcp-leases public2 | grep -E '.+' | tail -n +3 | wc -l)
if [ "$total_addresses_used" -ge "$ipv4_limit" ]; then
echo "IPv4 address limit reached"