summaryrefslogtreecommitdiff
path: root/src/helpers
AgeCommit message (Collapse)Author
3 hoursMerge pull request #5551 from c-po/T9454-frr-render-after-commitJohn Estabrook
frrender: T9454: render FRR after a DHCP lease only once the commit completed
6 hoursMerge pull request #5341 from BradKollmyer/T-stuck-unicast-renewViacheslav Hletenko
dhcp: T9108: restart dhclient when unicast RENEW is overdue
5 daysfrrender: T9454: render FRR after a DHCP lease only once the commit completedChristian Breunig
A lease event during a commit rendered FRR from the active configuration, which the commit has not replaced yet. When the lease arrived after the commit's own FRR render but before the commit finished, the stale render was applied and nothing corrected it: moving a DHCP interface into a VRF left the VRF without its default route. The lease hook now starts the render detached and the render waits for the running commit to complete. Detaching is required, as a commit stopping the DHCP client waits for the release hook. Waiting is opt-in, as the commit itself uses the same helper when it cannot reach the configuration daemon.
8 daysfrrender: T9368: reconcile FRR after a DHCP lease without the commit socketChristian Breunig
Reconciling the FRR configuration after a DHCP lease event was requested from the configuration daemon over the socket the commit pipeline uses. The daemon serves one client at a time and assumes it is the running commit, so the request either landed in the middle of the handshake which hands over the configuration, or kept the daemon busy past the 10ms a commit waits for it. Either way the commit fell back to running the conf-mode scripts directly. Those never render FRR, only the daemon does, so the commit succeeded while FRR kept the configuration rendered before it, until the next lease event. A lease event now renders FRR in its own process, and a commit which could not use the daemon renders FRR itself instead of skipping the reload. Both take the same lock. A commit post-hook would remove the second case, for a full render on every commit.
2026-09-26dhcp: T9108: use VyOS helpers in the stuck-RENEW watchdogBrad Kollmyer
is_systemd_service_active, directories['isc_dhclient_dir'], rc_cmd, read_file/write_file for cooldown (skip restart if the marker cannot be written). Drop unused rebind from the lease-time regex. Shorter postinst enable/start for the timer.
2026-09-26dhcp: T9108: record cooldown before restarting dhclientBrad Kollmyer
A successful restart followed by a failed state-file write left no marker, so the next 5-minute tick restarted the same client again. Write the cooldown first and skip the restart if it cannot be recorded; unlink the marker if the restart itself fails.
2026-09-26dhcp: T9108: ship lease-watch helper in the vyos-1x packageBrad Kollmyer
debian/rules copies src/helpers/* into usr/libexec/vyos, but debian/vyos-1x.install only shipped *.py and *.sh. The extensionless watchdog was missing from images while its systemd unit and timer were installed, so the timer failed with ENOENT. Also drop the iface.endswith('v6') skip: VyOS IPv6 DHCP is dhcp6c, not a dhclient_*v6.conf file.
2026-09-26T9108: Update copyrightViacheslav Hletenko
2026-09-26dhcp: T9108: address CodeRabbit review on lease-watchBrad Kollmyer
- Parse ISC default lease civil times as UTC (not host local) - Write cooldown state only after a successful systemctl restart - postinst: log timer enable/start failures instead of silent || true
2026-09-26dhcp: T9108: restart dhclient when unicast RENEW is overdueBrad Kollmyer
ISC dhclient can sit in unicast RENEW to a server that has lost the session until the lease expires (hours), with the modem link still up. That is distinct from T9085 (successful RENEW that does not reinstall a missing default). Add a lightweight oneshot helper and systemd timer (every 5m) that parses each active interface ISC lease DB: if renew is more than 15 minutes in the past while expire is still in the future, restart dhclient@iface (30m cooldown). Enable the timer from the package postinst.
2026-09-24wwan: T9350: move session re-dial from cron into vyos-netlinkdChristian Breunig
/etc/cron.d/vyos-wwan re-ran the conf_mode script every 5 minutes via op-mode "connect interface wwanN" to re-establish a session lost to RF signal loss. Re-entering conf_mode from cron is unsafe: the cron job knows nothing about the boot commit or about a commit in flight, so when a tick lands before the running config is populated, get_config() returns nothing but {'ifname', 'deleted'} and apply() takes the teardown branch instead of dialling. It then stops the DHCP clients, stops ModemManager and unlinks its own cron file, leaving wwan0 down with no way to recover until the next commit: CRON[1869]: (root) CMD (/usr/libexec/vyos/vyos-check-wwan.py) systemd[1]: Stopping DHCP client on wwan0... systemd[1]: Stopping Modem Manager... This is timing dependent - it only bites when a */5 tick coincides with boot - which is why it presents as an intermittently dead WWAN interface. Move the re-dial into vyos-netlinkd, which already tracks these interfaces for DHCP and already gates all of its work behind boot_configuration_complete() and commit_in_progress2(). A re-dial can therefore no longer land on a half-applied configuration. It also dials ModemManager directly rather than re-entering conf_mode, so the teardown branch is no longer reachable from the recovery path at all.
2026-08-25Merge pull request #5399 from jeleel-muibi/t9145-wlb-health-script-envViacheslav Hletenko
wan-load-balance: T9145: add health script interface env
2026-08-20utils: T8868: Refactor kernel command-line arguments and memory infoOleksandr Kuchmystyi
- Replaced direct file reads from `/proc/cmdline` with `get_kernel_boot_arg()` for fetching kernel command-line arguments in multiple modules. - Improved memory information retrieval by utilizing `get_memory_info()`.
2026-08-20wan-load-balance: T9145: add health script interface envJeleel Muibi
2026-08-08T3871: make boot-time interface naming deterministic and hw-id awareChristian Breunig
Multi-vendor PCIe NIC systems could lose or rename Ethernet/wireless interfaces on boot, because naming was decided from a single per-device udev event before all hardware had a chance to enumerate. Replace that with one authoritative pass, run once configuration is available during router startup: wait for configured hardware, apply every hw-id binding, and name whatever has none yet by PCIe distance from the root complex and MAC address - the same result every boot. A node with its hw-id deleted (NIC replacement) or its whole configuration removed is treated as an ordinary open slot, filled the same way - recovering its original hardware whenever the interfaces that vacated slots this boot also show up as candidates. Boot now reports any interface still unresolved, and the pass is covered by a new test suite in vyos-build named: make testifname Assisted-by: Claude:claude-sonnet-5
2026-07-17utils: T9008: migrate remaining cmd() callers to cmdl() and remove cmd()Christian Breunig
Complete the safer-subprocess migration started by the cmdl()/ifconfig refactoring and convert every remaining vyos.utils.process.cmd() call site to the list-based cmdl(). Drop the vyos.utils.process.cmd() implementation as it is no longer in use.
2026-07-03T8344: Preserve symlinks when copying config to/from TPM encrypted volumeNataliia Solomko
shutil.copytree() defaults to symlinks=False, so it recurses into symlinked directories and recreates them as real directories instead of preserving the symlink. cloud-init creates /opt/vyatta/etc/config/cloud/instance as a symlink to instances/i-<id>. Enabling/disabling config encryption copied this tree with copytree() and silently turned that symlink into a real directory, causing cloud-init to fail on later runs with: IsADirectoryError: [Errno 21] Is a directory: '.../cloud/instance' Pass symlinks=True to preserve symlinks during the copy.
2026-06-29ci: T8490: fix typos in comments, strings, and local identifiersYuriy Andamasov
Reaches a clean typos baseline for the T8490 ruleset pilot. Categories: - Comments/docs: recursivly, taret, passsed, characted, arhive, AtrributeError; "ned" -> "new" (migration comments). - Messages/strings: writeable -> writable (x5); OCaml log "Commandis" -> "Command is". - Local variables (all refs in-function): commited, formating, presistent; inpt_range -> input_range; tz_datas -> tz_data_raw (avoids the tz_data collision). - Self-contained renames (definition + all references in-file): formated_stats, _get_formatted_output_conections -> ..._connections, expension_failure -> expansion_failure (ping + traceroute), snmpd_restart_reqired -> ..._required. False positives are allowlisted centrally (vyos/.github, separate PR), NOT changed here: mke2fs, Maya-calendar "Mak", RFC 4122 "IDentifier" (hostapd), and VPP's "U-Forwrd" bridge-domain column header (op_mode/vpp.py + the VPP smoketest assert the real upstream `vppctl` output). Verified: typos clean, py_compile of every edited .py, zero remaining old-identifier references. 🤖 Generated by [robots](https://vyos.io)
2026-06-25geoip: T8987: Support updates via source-address/vrfsarthurdev
2026-05-28T8502: add client support for config-sync excluded pathsJohn Estabrook
2026-05-12wan: T8480: make only-default-route opt-indoctorpangloss
2026-05-12wan: T8480: add suppress_prefixlength ip rules for internal routingdoctorpangloss
WLB per-interface routing tables only contain a default route. When LAN traffic is fwmarked by WLB nftables rules, ip rule policy routes it to these tables where internal destinations (BGP, connected, DNAT) have no matching route and incorrectly exit via WAN. Add ip rule with table main suppress_prefixlength 0 before each per-interface table rule. This checks the main routing table first for specific routes but suppresses the default route, so only internet-bound traffic falls through to WLB per-interface tables. Signed-off-by: doctorpangloss <2229300+doctorpangloss@users.noreply.github.com>
2026-05-12wan: T8481: scope flush-connections to WLB connection marks (#5163)Simon
* wan: T8481: scope flush-connections to WLB connection marks flush-connections runs conntrack --delete which destroys all conntrack entries system-wide, including unrelated NAT translations and established connections that have nothing to do with WLB. WLB tags every connection it manages with a conntrack mark via the wlb_mangle_isp_<ifname> chain (ct mark set 0xc9, 0xca, etc.). Scope the flush to these marks so only WLB-managed connections are affected. Signed-off-by: doctorpangloss <2229300+doctorpangloss@users.noreply.github.com> * wan: T8481: replace conntrack deletion from state changed block --------- Signed-off-by: doctorpangloss <2229300+doctorpangloss@users.noreply.github.com> Co-authored-by: doctorpangloss <2229300+doctorpangloss@users.noreply.github.com>
2026-04-26utils: T8541: add write-config-file-value helperChristian Breunig
Introduce src/helpers/write-config-file-value.py to patch a saved config.boot from scripts by writing a quoted CLI path with an optional value (omit --value to create a valueless node). Extend vyos.utils.config.write_saved_value() to safely update saved configs: create missing parent nodes before tagging (ConfigTree.set_tag requires nodes to exist) and then write the requested value/valueless leaf back to disk. Remove the legacy serial console activation script which is now replaced by the helper-based approach. The helper is run once during ISO Image assembly and will inject the approprate serial console defintiions into config.boot.default.
2026-04-15T8445: add revised boot activation script runnerJohn Estabrook
2026-03-24T8410: Fix typos and mistakes for operational and configuration commandsViacheslav Hletenko
Fix typos and mistakes in the commands and comments No functional changes
2026-03-13geoip: T6768: Add system name-server checksarthurdev
2026-02-05Merge pull request #4949 from sarthurdev/geoip_refactorDaniil Baturin
geoip: T7926: T8049: Refactor geoip code and add MaxMind support
2026-01-28http-api: T7090: Implement background configure operations for REST APIOleksandr Kuchmystyi
Large config commits (`service config-sync`) can block the REST API request path and sometimes must be deferred (e.g., when changing `service https`). This commit introduces an in-memory background operation manager that queues (FIFO) full configure operations (commands + commit/commit-confirm) as single jobs, tracks status/result, and exposes active operations via `/retrieve/background-operations`.
2026-01-21geoip: T8049: Add MaxMind database supportsarthurdev
2026-01-21geoip: T7926: Refactor geoip handlingsarthurdev
* Move core logic to separate vyos.geoip module * Use a sqlite database for storing and querying address ranges by country * Remove downloaded geoip ranges once loaded into sqlite db * No longer rebuild geoip sets on each commit unless necessary * Allows for extensibility using other geoip data vendors
2026-01-06Merge pull request #4935 from giga1699/T8146Daniil Baturin
T8146: Confirm the key when config encryption is configured without TPM
2026-01-03T8146: Encryption without TPM confirm keyGiga Murphy
2026-01-03T8145: LUKS Encryption Passphrase ObservableGiga Murphy
2025-12-23vpp: T8080: Fix handling of configuration system lock after vpp commit failureNataliia Solomko
2025-11-05T7910: add keyword extant, for use by teardown scriptJohn Estabrook
The standalone script teardown-config-session.py is called on CLI config-mode exit, to close the persistent vyconf config session. Instead of injecting the config-mode env var into the external script to indicate a non-ephemeral session, add keyword 'extant' to find existing session.
2025-11-03Merge pull request #4818 from l0crian1/wlb-defaultsViacheslav Hletenko
wlb: T7966: Restore default route when interface disconnects/reconnects
2025-10-30wlb: TT7966: Refactor dynamic nexthop resolutionl0crian1
2025-10-29pki: T7953: systemd certbot.service must not use PrivateTmpChristian Breunig
PrivateTmp needs to be disabled, otherwise we can not load the current VyOS configuration to reconfigure the service automatically when certbot runs.
2025-10-29wlb: T7966: Restore default route when interface disconnects/reconnectsl0crian1
2025-10-21T5811: Make static dhcp-interface routes robustKyrylo Yatsenko
Solves the problem that vyos-configs in FRRender caches configuation and DHCP changes are ignored. * Add src/helpers/vyos-request-configd-update.py that requests vyos-configd to update FRR configuration. * Make dhclient hooks use it instead of calling protocols_static.py * Make FRRender cache not only configuration but also DHCP gateways so that is any of them changes, FRR configuration is updated
2025-10-14T5942: Make failover support dhcp-interfaceKyrylo Yatsenko
* Refactor XML a little: move common dhcp-interface properties to separate include file * Add failover support for dhcp-interface * Add test for DHCP in failover protocol
2025-10-08T7803: Make failover route vrf-awareKyrylo Yatsenko
* Added 'protocol failover' to 'set vrf name': set vrf name red protocols failover route 10.11.0.110/32 next-hop 10.0.0.2 * Added vrf and interface to target: set ... next-hop 10.0.0.2 check target '10.120.0.21' vrf blue set ... next-hop 10.0.0.2 check target '10.120.0.21' interface eth1 Last two are needed when check VRF is not same as route VRF. In this case icmp can use any/both options, tcp requires `vrf` and arp requires `interface`
2025-09-30boot-config-loader: T7889: Inform user during login of config-load issuesChristian Breunig
As T7885 turns out to be a config load related bug the user will only be informed when entering conf mode that something is off. vyos@vyos:~$ configure WARNING: There was a config error on boot: saving the configuration now could overwrite data. You may want to check and reload the boot config More information is displayed on tty0 of the router - but not everyone has access to tty0. This change is about copying the message displayed on tty0 to the MOTD system.
2025-09-25Merge pull request #4753 from jestabro/config-save-sync-atomicDaniil Baturin
T7709: Add file sync and atomic write to config save script
2025-09-24T7709: use write_file_sync/atomic in vyos-save-config.py scriptJohn Estabrook
Config save is provided by the helper script in both CLI and configsession (hence also in the http api). Use utilities write_file_sync and write_file_atomic, in accordance with permissions and location: If the target is in /opt/vyatta/etc/config or /config, use write_file_sync; if, moreover, the caller has permissions, use write_file_atomic. Otherwise, fall back to util write_file.
2025-09-23tpm: T7726: Test TPM key or prompt recovery keysarthurdev
2025-09-23tpm: T7726: Prompt before overwriting existing TPM keysarthurdev
2025-09-23tpm: T7726: Prompt user before clearing TPM keysarthurdev
2025-09-23tpm: T4919: Use vyos module function for running image, single-line importssarthurdev