Browse Source

switch over to spawning new capsuls on public2 network

main
forest 3 months ago
parent
commit
5641b22246
  1. 2
      capsulflask/hub_api.py
  2. 2
      capsulflask/shell_scripts/capacity-avaliable.sh

2
capsulflask/hub_api.py

@ -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, ""

2
capsulflask/shell_scripts/capacity-avaliable.sh

@ -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"

Loading…
Cancel
Save