switch over to spawning new capsuls on public2 network
This commit is contained in:
parent
d2f41a1be3
commit
5641b22246
@ -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
|
# 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)
|
# enable static IP -> capsul mapping via libvirt (manage MAC addresses)
|
||||||
|
|
||||||
payload["network_name"] = 'public3'
|
payload["network_name"] = 'public2'
|
||||||
payload["public_ipv4"] = ""
|
payload["public_ipv4"] = ""
|
||||||
|
|
||||||
return payload, ""
|
return payload, ""
|
||||||
|
@ -20,7 +20,7 @@ if [ "$ram_bytes_remainder" -le $((20 * 1024 * 1024 * 1024)) ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ipv4_limit=61
|
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
|
if [ "$total_addresses_used" -ge "$ipv4_limit" ]; then
|
||||||
echo "IPv4 address limit reached"
|
echo "IPv4 address limit reached"
|
||||||
|
Loading…
Reference in New Issue
Block a user