Page MenuHomeFreeBSD

Properly destroy renamed interfaces
ClosedPublic

Authored by vegeta_tuxpowered.net on Jan 11 2023, 8:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 30 2024, 7:48 PM
Unknown Object (File)
Apr 30 2024, 7:39 PM
Unknown Object (File)
Apr 30 2024, 7:38 PM
Unknown Object (File)
Apr 30 2024, 7:38 PM
Unknown Object (File)
Apr 30 2024, 7:37 PM
Unknown Object (File)
Apr 30 2024, 5:43 PM
Unknown Object (File)
Apr 25 2024, 11:12 PM
Unknown Object (File)
Apr 23 2024, 7:20 AM

Details

Summary

This test leaves a lot of interfaces when it finishes, making other tests slower due to long time of loading scapy from pft_ping.py when more interfaces are present. When both sides of epair are assigned to jails, they are both removed from created_interfaces.lst and thus won't be removed during cleanup from this file. An interface assigned to jail is stored in created_jails.lst but if it is renamed, it won't be cleaned up either. Furthermore this test uses identical names for multiple interfaces across multiple jails which after destroying those jails adds to overall confusion.

To address this issue a new function is provided for renaming interfaces in jails and storing their new names in created_jails.lst for deletion during cleanup.

I was also unable to replicate the issue of "long cleanup which may lead to a timeout", at least not after fixing deletion of renamed interfaces. I've restored normal cleanup function, it worked properly multiple times.

Sponsored by: InnoGames GmbH

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I'm a little concerned about one end of an epair not getting destroyed if we destroy the other. That's not something I'd want the tests to cope with, that sounds like an issue with if_epair we should look at.

In D38024#863922, @kp wrote:

I'm a little concerned about one end of an epair not getting destroyed if we destroy the other. That's not something I'd want the tests to cope with, that sounds like an issue with if_epair we should look at.

You are right, this does not seem right. I will check the test again and update the patch.

vegeta_tuxpowered.net edited the summary of this revision. (Show Details)
vegeta_tuxpowered.net edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Jan 16 2023, 10:38 AM
This revision was automatically updated to reflect the committed changes.