public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v3 pve-network 00/12] SDN: Testing VNets as a blackbox and fixing found bugs
@ 2024-04-05 13:17 Stefan Lendl
  2024-04-05 13:17 ` [pve-devel] [PATCH v3 pve-network 01/12] sdn: dhcp: get next free ip for a specific IP version Stefan Lendl
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Stefan Lendl @ 2024-04-05 13:17 UTC (permalink / raw)
  To: pve-devel

This add several tests for SDN VNets.
State setup as well as testing results is done only via the API to test on the
API boundaries and not against the internal state. Internal state and config
files are mocked to avoid requiring access to system files or pmxcfs.

The first 4 commits fix functionality, identified as bugs thanks to the tests.

The next 7 commits extract various functions to allow mocking them in the
tests. The tests are then added as the test_vnets_blackbox test.
The last commit removes the old vnets tests which are not working anyway.

Tests validate the events of a nic joining a VNet or a nic staring on a VNet.
These events are tested with with different subnet configurations.
Mainly for IPv4 and/or IPv6 configurations and odd combinations.
Further descriptions in the commit.

Differences v2 -> v3:
* Fix functionalitiy in VNet and Subnet so all tests pass
  Thanks @s.hanreich for lots of testing
* Update and add more tests
* Make it build in sbuild

Differences v1 -> v2:
* Add tests that expect a failure when no IP can be allocated
* Removed commented out debug stuff


Stefan Hanreich (2):
  sdn: dhcp: only consider subnets that have dhcp-range configured
  sdn: dhcp: rollback allocated ips on failure

Stefan Lendl (10):
  sdn: dhcp: get next free ip for a specific IP version
  sdn: dhcp: request both IPv4 and IPv6 addresses on VM start
  sdn: zones: extract function that reads datacenter config
  dns: dnsmasq: extract function to systemctl command.
  sdn: dnsmasq: extract function that generates the ethers file path
  sdn: dnsmasq: extract function that updates dnsmasq lease via dbus
  sdn: api: extract function that creates the sdn directory.
  debian: blackbox tests depend on libpve-access-control at build
  tests: test VNets functionality as a blackbox
  tests: remove old Vnets tests

 debian/control                            |   1 +
 src/PVE/API2/Network/SDN/Zones.pm         |   6 +-
 src/PVE/Network/SDN/Dhcp/Dnsmasq.pm       |  47 +-
 src/PVE/Network/SDN/Subnets.pm            |   2 +-
 src/PVE/Network/SDN/Vnets.pm              |  29 +-
 src/PVE/Network/SDN/Zones/EvpnPlugin.pm   |   3 +-
 src/PVE/Network/SDN/Zones/Plugin.pm       |   5 +
 src/PVE/Network/SDN/Zones/SimplePlugin.pm |   2 +-
 src/test/Makefile                         |   5 +-
 src/test/run_test_vnets.pl                | 343 ---------
 src/test/run_test_vnets_blackbox.pl       | 894 ++++++++++++++++++++++
 11 files changed, 962 insertions(+), 375 deletions(-)
 delete mode 100755 src/test/run_test_vnets.pl
 create mode 100755 src/test/run_test_vnets_blackbox.pl

-- 
2.44.0





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-04-08 15:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05 13:17 [pve-devel] [PATCH v3 pve-network 00/12] SDN: Testing VNets as a blackbox and fixing found bugs Stefan Lendl
2024-04-05 13:17 ` [pve-devel] [PATCH v3 pve-network 01/12] sdn: dhcp: get next free ip for a specific IP version Stefan Lendl
2024-04-05 13:17 ` [pve-devel] [PATCH v3 pve-network 02/12] sdn: dhcp: request both IPv4 and IPv6 addresses on VM start Stefan Lendl
2024-04-05 13:17 ` [pve-devel] [PATCH v3 pve-network 03/12] sdn: dhcp: only consider subnets that have dhcp-range configured Stefan Lendl
2024-04-05 13:17 ` [pve-devel] [PATCH v3 pve-network 04/12] sdn: dhcp: rollback allocated ips on failure Stefan Lendl
2024-04-05 13:17 ` [pve-devel] [PATCH v3 pve-network 05/12] sdn: zones: extract function that reads datacenter config Stefan Lendl
2024-04-05 13:17 ` [pve-devel] [PATCH v3 pve-network 06/12] dns: dnsmasq: extract function to systemctl command Stefan Lendl
2024-04-05 13:18 ` [pve-devel] [PATCH v3 pve-network 07/12] sdn: dnsmasq: extract function that generates the ethers file path Stefan Lendl
2024-04-05 13:18 ` [pve-devel] [PATCH v3 pve-network 08/12] sdn: dnsmasq: extract function that updates dnsmasq lease via dbus Stefan Lendl
2024-04-05 13:18 ` [pve-devel] [PATCH v3 pve-network 09/12] sdn: api: extract function that creates the sdn directory Stefan Lendl
2024-04-05 13:18 ` [pve-devel] [PATCH v3 pve-network 10/12] debian: blackbox tests depend on libpve-access-control at build Stefan Lendl
2024-04-05 13:18 ` [pve-devel] [PATCH v3 pve-network 11/12] tests: test VNets functionality as a blackbox Stefan Lendl
2024-04-05 13:18 ` [pve-devel] [PATCH v3 pve-network 12/12] tests: remove old Vnets tests Stefan Lendl
2024-04-08 12:02 ` [pve-devel] [PATCH v3 pve-network 00/12] SDN: Testing VNets as a blackbox and fixing found bugs Stefan Hanreich
2024-04-08 15:59 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal