Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.9.0 #318

Open
wants to merge 133 commits into
base: master
Choose a base branch
from
Open

Version 3.9.0 #318

wants to merge 133 commits into from

Conversation

julienfortin
Copy link
Contributor

  • New: ifreload: new --diff cli argument: only reload delta between /e/n/i
  • New: Support for Per-VLAN Rapid Spanning Tree attributes:
    mstpctl-pvrst-mode (on/off): Enable/disable PVRST mode
    mstpctl-vlan-priority (range 4096-32768)
    mstpctl-vlan-hello (range 1-10)
    mstpctl-vlan-fdelay (range 4-30)
    mstpctl-vlan-maxage (range 6-40)
    mstpctl-port-vlan-path-cost (range 1-200000000)
    mstpctl-port-vlan-priority (range 0-240)
  • New: Get default mac address from policy file as 'address' iface_default
  • New: Enable per vlan snooping when config mcqv4src
  • New: Add vxlan hopping filter
  • New: Add support for setting mac addresses via iface_defaults policy
  • New: Reset mac address on switch port when 'hwaddress' is removed from eni
  • New: Policy "dhclient_no_wait_on_reload": dhclient won't wait (default off)
  • Fix: Bring DHCP config down if link-down yes is set
  • Fix: Various code cleanups (SonarQube)
  • Fix: Macvlan/VRR: set accept_dad=0 before link up
  • Fix: Flush DHCP lease on boot up
  • Fix: Disable persistent debug log for ifquery
  • Fix:
  • Fix: Vxlan clear last fdb entry when remoteip is removed from user config
  • Fix: Vxlan reset local and group ip when removed from user config
  • Fix: Re-applying link-speed to reset link-lanes to default when removed
  • Fix: Missing json import in networkinterfaces.py and vxlan.py
  • Fix: Nlmanager Invalid operation on null-like value range_flag
  • Deprecated: remove bridge-hashel default value

julienfortin and others added 30 commits October 30, 2024 21:38
Default MAC addresses can now be defined as iface_default policy

$ cat /var/lib/ifupdown2/policy.d/mac.json
{
  "address": {
    "iface_defaults": {
      "swp1": {"hwaddress": "7a:43:9e:c0:e0:42"}
    }
  }
}

The usecase being, how to revert to a base mac once the hwaddress
attribute is removed from ENI.

Signed-off-by: Julien Fortin <[email protected]>
In diff mode SVI won't be processed if their config hasn't changed.
We need to do a specific fdb check during bridge processing and purge
stale macs.

This commit includes an incremental fix by Scott Laffer:
Fix logic in bridge stale perm fdb handling not to delete VRR vlan entries

In the scenario where only a bridge interface is up'd (i.e. it's the only
thing in the run queue in a diff-based apply), permanent fdb entries for
VRR interfaces were being incorrectly marked as stale and deleted from the fdb.

This patch updates the logic to not only match the bridge's own MAC address
but any permanent entry on the bridge device itself.

Signed-off-by: Julien Fortin <[email protected]>
When a switch port is enslaved to a bond we don't manage its
mac address anymore - all port have the same mac.

Signed-off-by: Julien Fortin <[email protected]>
…plied when it is part of a bond

Changing bond member port mac addr should not get applied when it is part of a bond

Problem description: Changing the hwaddress of a bond slave is not updating the bond interface's hwaddress.

Fix description: Block changing the hwaddress of a bond slave

Testcases covered:

1. change the hwaddress of an existing bond slave through nvue
2. Edit the eni file to add the port in bridge, see the hwaddress set through ifquery and 'ip link show', remove the port from bridge and add it to bond interface and change the hwaddress. do 'ifreload -a' and ifquery displays the changed hwaddress but 'ip link show' displays the older hwaddress and so does the bond intf.

Signed-off-by: Julien Fortin <[email protected]>
…l in e/n/i stanza is rendered with values like "none"

Signed-off-by: Julien Fortin <[email protected]>
Previous commit 4cfd51f broke test_bridge7_macvlans which is using
mac address with single digit segments: 42:38:39:FF:0:1

The regex is also compiled and moved to init to only do it once.

Signed-off-by: Julien Fortin <[email protected]>
DAD must be disabled on macvlan/VRR interfaces as they share the
same MAC (and thus link-local IPv6 address).

The sysctl accept_dad must be set to 0 before setting the link UP
otherwise DAD might trigger before we reset the sysctl to 0.

Signed-off-by: Andy Roulin <[email protected]>
Signed-off-by: Julien Fortin <[email protected]>
if the interface is down we won't be able to get the speed
skip the speed check

Signed-off-by: Julien Fortin <[email protected]>
The bond slave speed check has been causing issues over the past few months
It is not critical to have it so I prefer to remove it for now.

Signed-off-by: Julien Fortin <[email protected]>
…sion ^_?([A-Z_][a-zA-Z0-9]*|[a-z_][a-z0-9_]*)$.

Signed-off-by: Julien Fortin <[email protected]>
IFLA_BR_MCAST_HASH_ELASTICITY:
Set multicast database hash elasticity, It is the maximum chain length in the
multicast hash table. This attribute is deprecated and the value is always 16.

Signed-off-by: Julien Fortin <[email protected]>
If the policy is enabled (true/false) dhclient wont wait (-nw)
(except in case of networking restart or reboot)

Signed-off-by: Julien Fortin <[email protected]>
…egular expression ^[_a-z][a-z0-9_]*$.

Signed-off-by: Julien Fortin <[email protected]>
Issue: 3364956

Signed-off-by: Julien Fortin <[email protected]>
Default route is missing after the dhcp interface is cycled through link-down yes/no
This requires a full dhcp down-up cycle as well.

Signed-off-by: Julien Fortin <[email protected]>
…h is already caught.

ImportError is the parent classs of ModuleNotFoundError

Signed-off-by: Julien Fortin <[email protected]>
@julienfortin
Copy link
Contributor Author

@aderumier @sohorx @svenauhagen @BarbarossaTM @wido @lachbaer @vincentbernat @virtualized-human @lawli3t @jkklemm @OlivierB @itzwam @tomvil @moepman

FYI, here is version 3.9.0 (about 100 commits, fixes and new features). I will keep it in the dev branch for a few weeks if you guys want to test it. The goal is to merge it to master in Jan 2025.

Version 3.10 will have some of the community PRs.

@aderumier
Copy link
Contributor

oh this is huge :)

I'll try to take time to test it next month. Perfect time for debian13 (and proxmox 9 ;)

@virtualized-human
Copy link

i will start compiling it and deploy it to my current setup

@virtualized-human
Copy link

@julienfortin

when building the depedencys where not right from the readme.md:

e.g.

======================================================================
ERROR: tests.test_l3 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_l3
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/home/jaromir/Nextcloud/cloud.virtualized.app/Dokumente/GIT/github.com/virtualized-human/ifupdown2/.pybuild/cpython3_3.10_ifupdown2/build/tests/test_l3.py", line 1, in <module>
    from .conftest import ENI, assert_identical_json
  File "/home/jaromir/Nextcloud/cloud.virtualized.app/Dokumente/GIT/github.com/virtualized-human/ifupdown2/.pybuild/cpython3_3.10_ifupdown2/build/tests/conftest.py", line 11, in <module>
    from scp import SCPClient
ModuleNotFoundError: No module named 'scp'


----------------------------------------------------------------------
Ran 3 tests in 0.000s

fix: install python3-scp

also python3-pytest seems to be new as well as deepdiff and some others.

the installation command is e.g. apt install python3-deepdiff python3-scp python3-pytest python3-coverage but it may be some more depedencys that are not in readme?

Also im currently running into annother problem when using make deb to build a .deb file:

error: can't copy 'ifupdown2/ifupdown2d': doesn't exist or not a regular file

while compiling. It seems that the path is wrong. it does not exist in reality and also not in the repo.

@julienfortin
Copy link
Contributor Author

@virtualized-human thanks for the feedback, i will look into that!

@julienfortin
Copy link
Contributor Author

@virtualized-human please give it another try, i have updated debian/rules to ignore tests during the build.

@virtualized-human
Copy link

debian/rules:20: *** Missing separator.  Conclusion.
dpkg-buildpackage: error: subprocess fakeroot debian/rules clean returned exit status 2
debuild: fatal error in line 1182:
dpkg-buildpackage -rfakeroot -us -uc -ui -b failed
make: *** [Makefile:96: deb] error 29

@julienfortin

@virtualized-human
Copy link

i commented out

#override_dh_auto_test:
#       @echo "Skipping tests during the build process."

in the debian/rules file and now it seems to work (the build).

@julienfortin
Copy link
Contributor Author

The debian/rules files requires tabs and not spaces, for some reason my IDE replaces the tab with spaces before i pushed the commit. It should be good now.

@virtualized-human
Copy link

i pulled the last release it still drops the same error

@virtualized-human
Copy link

#!/usr/bin/make -f

#export DH_VERBOSE=1
export PYBUILD_NAME=ifupdown2
export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/ --install-scripts=/usr/share/

%:
	dh $@ --with=python3 --with systemd --buildsystem=pybuild

override_dh_installman:
	./ifupdown2/man/genmanpages.sh ./ifupdown2/man ./man
	dh_installman

override_dh_install:
	dh_install
	mkdir -p debian/ifupdown2/lib/systemd/system/
	install --mode=644 debian/[email protected] debian/ifupdown2/lib/systemd/system/

override_dh_auto_test:
       @echo "Skipping tests during the build process."

override_dh_systemd_start:
	dh_systemd_start --name=networking --no-start

override_dh_systemd_enable:
	dh_systemd_enable --name=networking

override_dh_compress:
	dh_compress -X.py

@virtualized-human
Copy link

well i think the ide pushed wrong aigan. i replaced it with the right tab char and it works

@virtualized-human
Copy link

yea its fine now :D

@virtualized-human virtualized-human mentioned this pull request Jan 24, 2025
@sohorx
Copy link
Contributor

sohorx commented Mar 12, 2025

ohh, it's really nice to see tests being added, I'll have to look into it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants