1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-10 20:26:48 +00:00

refactor(vrtManager): a VM's addresses are read once a page, not once an object

wvmInstance kept the guest agent's and the ARP table's addresses from
the first NIC it was asked about, and never read them again on that
object; it carried a lease lookup that was never filled.

The addresses are now one {MAC: (IPv4, IPv6)} read, kept like the
domain XML only inside a cached_reads block: the VM page, which reads
its NICs twice, asks the agent once (it may take its whole timeout),
and a read outside a page's block is a new one. The agent's addresses
still come before the ARP table's.
This commit is contained in:
catborise 2026-11-03 00:31:13 +03:00
parent 2d7e23864e
commit b2b2386db9
4 changed files with 44 additions and 57 deletions

View file

@ -31,7 +31,7 @@ XML = """<domain>
def proxy():
p = wvmInstance.__new__(wvmInstance) # no connection: only these calls
p._ip_cache = {"qemuga": {}, "arp": {}}
p._read_addresses = dict # no addresses
p._XMLDesc = lambda flags: XML
volumes = {"/iso/x.iso": ("x.iso", "iso")}