Skip to content

Commit

Permalink
WIP arp_clear
Browse files Browse the repository at this point in the history
FIXME: how useful?
  • Loading branch information
ydirson committed Sep 18, 2024
1 parent 4836461 commit 020c7ae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pxe.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@ def arp_addresses_for(mac_address):
)
candidate_ips = output.splitlines()
return candidate_ips

def arp_clear_for(mac_address):
for stray_ip in arp_addresses_for(mac_address):
output = ssh(
PXE_CONFIG_SERVER,
['arp', '-d', stray_ip]
)
2 changes: 2 additions & 0 deletions tests/install/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ def vm_booted_with_installer(remastered_iso, create_vms):
host_vm.insert_cd(os.path.basename(remote_iso))

try:
pxe.arp_clear_for(mac_address)

host_vm.start()
wait_for(host_vm.is_running, "Wait for host VM running")

Expand Down
2 changes: 2 additions & 0 deletions tests/install/test_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def test_join_pool(firmware, mode, create_vms):
slave_mac = slave_vm.vifs()[0].param_get('MAC')
logging.info("Slave VM has MAC %s", slave_mac)

pxe.arp_clear_for(master_mac)
master_vm.start()
pxe.arp_clear_for(slave_mac)
slave_vm.start()
wait_for(master_vm.is_running, "Wait for master VM running")
wait_for(slave_vm.is_running, "Wait for slave VM running")
Expand Down

0 comments on commit 020c7ae

Please sign in to comment.