summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
2025-01-15remote: T7048: merge git environment with the os environmentRobert Gingras
allows utilizing ssh-agent and other environment-variable-based behavior customizations
2025-01-09nhrp: T2326: NHRP migration to FRRaapostoliuk
NHRP migration to FRR
2025-01-08Merge pull request #4284 from indrajitr/simplify-T7016Daniil Baturin
T7016: Simplify logic for force deleting dynamic IPv4 address from interface
2025-01-07vyos.ifconfig: T7018: drop 'iftype' class attribute (#4280)Christian Breunig
Under very rare cases we can run into a race condition where interfaces are still in creation phase but are already referenced.. This can trigger: File "/usr/libexec/vyos/conf_mode/system_conntrack.py", line 270, in <module> apply(c) File "/usr/libexec/vyos/conf_mode/system_conntrack.py", line 249, in apply call_dependents() File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 147, in call_dependents f() File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 118, in func_impl run_config_mode_script(script, config) File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 106, in run_config_mode_script mod.verify(c) File "/usr/libexec/vyos//conf_mode/service_conntrack-sync.py", line 72, in verify if len(get_ipv4(interface)) < 1: ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/vyos/template.py", line 458, in get_ipv4 return Interface(interface).get_addr_v4() ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 334, in __init__ if not self.iftype: ^^^^^^^^^^^ AttributeError: 'Interface' object has no attribute 'iftype' This commit removes the code path in question and the class attribute check. The reason for the iftype attribute in the past was a common _create() method serving for all interface types. As we already have a lot of derived implementations and not all honor the classes iftype/type member - or even worse honor it only in 50% of the occurrences it's time to drop it.
2025-01-07Merge pull request #4253 from natali-rs1985/T6975Daniil Baturin
utils: T6975: Add 'vrf' and 'netns' arguments to functions in 'vyos.utils.process'
2025-01-06T7016: Simplify logic for force deleting dynamic IPv4 address from interfaceIndrajit Raychaudhuri
2025-01-06utils: T6975: Add 'vrf' and 'netns' arguments to functions in ↵Nataliia Solomko
'vyos.utils.process'
2025-01-06T6841: firewall: improve config parsing for ZBF when using VRFs and ↵Nicolas Fort
interfaces attached to VRFs
2025-01-05T7016: force delete only dynamic IPv4 address from interfaceAdam Smith
2024-12-31frrender: T6991: do not loose DHCP default route when no static route is definedChristian Breunig
The reason is that DHCP routes are not re-generated during FRRrender as long as there is no protocols static entry in the configuration at all. Move out the DHCP configuration read-in from the static section.
2024-12-30frr: T6746: additional improvements after 10.2 upgrade (#4259)Christian Breunig
* smoketest: T6746: add substring search in getFRRconfig() Some daemons (e.g. bgpd) have several nested substrings/sections like router bgp 100 address-family ipv4 unicast .. exit-address-family exit We can now use getFRRconfig() with the substring option to extract only address-family ipv4 unicast .. exit-address-family Making config validation more granular * frrender: T6746: only re-render FRR config if config_dict did change * frrender: T6746: fix naming glitch isis/eigrp * frrender: T6746: add --stdout option when running with debug flags * smoketest: T6746: remove unneeded commit_guard time It was an invalid workarround as the underlaying issue seems to be a race condition in CStore. The commit process is not finished until all pending files from VYATTA_CHANGES_ONLY_DIR are copied to VYATTA_ACTIVE_CONFIGURATION_DIR. This is done inside libvyatta-cfg1 and the FUSE UnionFS part. On large non-interactive commits FUSE UnionFS might not replicate the real state in time, leading to errors when querying the working and effective configuration. TO BE DELETED AFTER SWITCH TO IN MEMORY CONFIG
2024-12-24T6944: fix unrelated formattingNicolas Vollmar
2024-12-24T6944: adds option to enable switchdev mode on ethernet interfaceNicolas Vollmar
2024-12-22ifconfig: T6972: smoketests fail as IP address is not removed in timeChristian Breunig
From time to time integration tests fail as the DHCP assigned IP address is not removed in time then dhclient stops. Add an explicit code path cleaning dynamic assigned addresses from interface when disabling DHCP - if such a dynamic address is remaining. ====================================================================== FAIL: test_dhcp_vrf (__main__.EthernetInterfaceTest.test_dhcp_vrf) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/libexec/vyos/tests/smoke/cli/test_interfaces_ethernet.py", line 72, in tearDown self.assertNotIn(AF_INET, ifaddresses(interface)) AssertionError: 2 unexpectedly found in {17: [{'addr': '52:54:00:00:00:00', 'broadcast': 'ff:ff:ff:ff:ff:ff'}], 2: [{'addr': '192.0.2.103', 'netmask': '255.255.255.0', 'broadcast': '192.0.2.255'}], 10: [{'addr': 'fe80::5054:ff:fe00:0%eth0', 'netmask': 'ffff:ffff:ffff:ffff::/64'}]}
2024-12-20Merge pull request #4246 from natali-rs1985/T6930Christian Breunig
pppoe: T6930: Remove unnecessary code
2024-12-20pppoe: T6930: Remove unnecessary codeNataliia Solomko
In case of changes in config that require reconnect PPPoEIF.remove() function is called and old default routes are removed. So we do not need to do it once again.
2024-12-19Merge pull request #4243 from c-po/frr-10Christian Breunig
frrender: T6746: runtime improvements
2024-12-18ifconfig: fix AttributeError caused by internal race conditionChristian Breunig
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 342 if not self.iftype: ^^^^^^^^^^^ AttributeError: 'Interface' object has no attribute 'iftype'
2024-12-18frrender: T6746: move get_frrender_dict from vyos.configdict to this moduleChristian Breunig
Keep all FRRender stuff in one place.
2024-12-18Merge pull request #4225 from natali-rs1985/T6767Christian Breunig
op_mode: T6767: Check latest image version in VRF context for "add system image latest vrf <name>"
2024-12-18Merge pull request #4223 from HollyGurza/T6874Christian Breunig
T6874: [QoS] Add class filter by ether
2024-12-18vyos-configd: T6746: render resulting FRR configuration only onceChristian Breunig
Previously the FRR configuration was rendered via Jinja2 on every call to get_frrendet_dict() - but it was used/applied only once. We save the CPU cycles and render the FRR configuration only once prior to applying it in FRR.
2024-12-18frrender: T6746: rename config -> config_dictChristian Breunig
2024-12-18frrender: T6746: support dynamic enable/disable of debug outputChristian Breunig
Always evaluate if the debug file exsits and not once during module init. Thus we can always eanble/disable FRR command debugging during runtime even under vyos-configd.
2024-12-18Merge branch 'frr-10' into currentChristian Breunig
* frr-10: op-mode: T6746: add "show log frr" and "monitor log frr" commands frrender: T6746: do not render candidate FRR config to running FRR config file path frrender: T6746: ensure there are no empty lines in the rendered FRR configuration bgp: T6746: remove debug code
2024-12-18T6874: [QoS] Add class filter by etherkhramshinr
Implement a command to configure QoS policy filters by ether properties. The supported match types include: - Destination: Specify the Ethernet destination address. - Protocol: Define the Ethernet protocol. - Source: Set the Ethernet source address. `set qos policy <type> <name> class <id> match <match-id> ether <destination|protocol|source> <val>`
2024-12-17frrender: T6746: do not render candidate FRR config to running FRR config ↵Christian Breunig
file path
2024-12-17frrender: T6746: ensure there are no empty lines in the rendered FRR ↵Christian Breunig
configuration
2024-12-17Merge pull request #4175 from HollyGurza/T6800Christian Breunig
T6799: QoS: Improve Priority-Queue Policy
2024-12-16frr: T6746: reference common daemon definition in vyos.frrenderChristian Breunig
Do not use custom daemon definitions like bgpd - re-use them from e.g. vyos.frrender.bgp_daemon
2024-12-16rpki: T6746: FRRender needs to calculate SSH key pathChristian Breunig
2024-12-16frr: T6746: remove superseeded vyos.frr moduleChristian Breunig
2024-12-16vrf: T6746: bugfix change of VNIChristian Breunig
VNI was always retrieved via effective configuration and not active configuration.
2024-12-16frr: T6746: handle "system ip" and "system ipv6" with FRRender classChristian Breunig
FRR 10.2 will use "[no] ip forwarding" and "[no] ipv6 forwarding" to enable or disable IP(v6) forwarding. We no longer rely on sysctl as this was overridden by FRR later on. Remove code path for sysctl setting and solely rely on FRR.
2024-12-16configd: T6746: handle FRR config reload as last step in commitChristian Breunig
2024-12-16frr: T6746: integrate FRRender class into vyos-configdChristian Breunig
When running under vyos-configd only a single apply() is done as last step in the commit algorithm. FRRender class address is provided via an attribute from vyos-configd process.
2024-12-16frr: T6746: add default entry for config debug fileChristian Breunig
A lot of services have dynamic debug capabilities which will be turned on by creating a file in /tmp. These scripts have the path hardcoded and sometimes accross multiple places (bad). This commit introduces vyos.defaults.frr_debug_enable to get the path for the debug file from a single location.
2024-12-16frr: T6747: migrate protocols to unified FRRender classChristian Breunig
With FRR 10.0 daemons started to be migrated to integrated FRR mgmtd and a northbound interface. This led to some drawbacks in the current state how changes to FRR are handled. The current implementation will use frr-reload.py and specifies excatly WHICH daemon needs a config update and will only replace this part inside FRR. With FRR10 and mgmtd when a partial configuration is sent to mgmtd, it will remove configuration parts from other daemons like bgpd or ospfd which have not yet been migrated to mgmtd. It's not possible to call frr-reload.py with daemon mgmtd - it will error out. This commit will also change the CLI for static routes: CLI command "set protocols static route 10.0.0.0/8 next-hop 1.2.3.4 bfd multi-hop source 1.1.1.1" will be split into: * set protocols static route 10.0.0.0/8 next-hop 1.2.3.4 bfd source-address 1.1.1.1 * set protocols static route 10.0.0.0/8 next-hop 1.2.3.4 bfd multi-hop To make the XML blocks reusable, and comply with the FRR CLI - this was actually a wrong implementation from the beginning as you can not have multiple BFD source addresses. CLI command "set protocols static route 10.0.0.0/8 next-hop 1.2.3.4 bfd multi-hop source 1.1.1.1 profile bar" is changed to: * set protocols static route 10.0.0.0/8 next-hop 1.2.3.4 bfd profile bar CLI commands "set protocols static multicast interface-route" is moved to: * set protocols static multicast route <x.x.x.x/x> interface To have an identical look and feel with regular static routes.
2024-12-16frr: T6747: make daemon definitions re-usable for both conf-mode and smoketestsChristian Breunig
2024-12-11op_mode: T6767: Check latest image version in VRF context for "add system ↵Nataliia Solomko
image latest vrf <name>"
2024-12-11T6790: QoS: Improve CAKE Policykhramshinr
- Fixed handling of flow isolation parameters. - Corrected support for `nat` and `nonat` in flow isolation. - Extended RTT values to cover the full range supported by `tc`.
2024-12-10vyconf: T6718: use vy_set/delete in configsession and utilJohn Estabrook
2024-12-10vyconf: T6718: add reftree internal cacheJohn Estabrook
As we are generating the reference tree from the XML definitions during build, save an internal representation for vyconfd to load on startup.
2024-12-06vyconf: T6718: add keyword default for change in libvyosconfig bindingJohn Estabrook
Adjust signature of reference_tree_to_json for change in the ctypes binding.
2024-12-02T6917: fix RPS ethernet settings for CPUs with more than 32 coresViacheslav Hletenko
The maximun value theat could be written for the 'rpc_cpu' is 4294967295 or 0xffffffff in the chunk splitted by commas
2024-11-29Merge pull request #4204 from sarthurdev/T6809Simon
2024-11-26Merge pull request #4198 from sever-sever/T264Christian Breunig
T264: IPsec add base64 encoded secret-type feature
2024-11-22pki: T6809: Support system install of CA certificatessarthurdev
2024-11-21T264: IPsec add base64 encoded secret-type featureViacheslav Hletenko
Add the ability to configure base64 encoded passwords for VPN IPSec site-to-site peers authentication psk PSK secret 'xxxxx==' authentication psk PSK secret-type <base64|plaintext>
2024-11-21T6806: Rework QoS Policy for HFSC Shaper (#4181)Roman Khramshin
- Removed default `m1` and `m2` values from interface definitions - Adjusted filter priorities for shapers - Fixed SFQ qdisc and HFSC class creation to fully support `m1`, `d`, and `m2` parameters - Added validation logic similar to VyOS 1.3 to improve error handling and user experience