Files
ubicloud/spec/model/address_spec.rb
Jeremy Evans 132a95a175 Fix ipv4_address table population in Address#populate_ipv4_addresses
Change

id != routed_to_host_id

to

vm_host.sshable.host != cidr.network.to_s

We do not consistently use the VmHost id as the primary Address id
(it is not done at all for Hetzner hosts), so the next simplest way
to check is check the sshable address.

Existing installations that previously ran
Address#populate_ipv4_addresses can be fixed using:

DB[:ipv4_address].where(ip: Sshable.where(id: VmHost.select(:id)).select(Sequel.cast(:host, :inet))).delete
2025-06-21 07:37:04 +09:00

1.7 KiB