summaryrefslogtreecommitdiff
path: root/src/services/vyos-hostsd
AgeCommit message (Collapse)Author
2024-02-01dns: T5959: Streamline dns forwarding serviceIndrajit Raychaudhuri
Streamline configuration and operation of dns forwarding service in following ways: - Remove `dns_forwarding_reset.py` as its functionality is now covered by `dns.py` - Adjust function names in `dns.py` to disambiguate between DNS forwarding and dynamic DNS - Remove `dns_forwarding_restart.sh` as its functionality is inlined in `dns-forwarding.xml` - Templatize systemd override for `pdns-recursor.service` and move the generated override files in /run. This ensures that the override files are always generated afresh after boot - Simplify the systemd override file by removing the redundant overrides - Relocate configuration path for pdns-recursor to `/run/pdns-recursor` and utilize the `RuntimeDirectory` default that pdns-recursor expects - We do not need to use custom `--socket-dir` path anymore, the default path (viz., `/run/pdns-recursor` is fine) (cherry picked from commit 1c1fb5fb4bd7c0d205b28caf90357ad56423464f)
2023-07-14T5195: vyos.util -> vyos.utils package refactoring (#2093)Christian Breunig
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process * T5195: use read_file and write_file implementation from vyos.utils.file Changed code automatically using: find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} + find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} + * T5195: move chmod* helpers to vyos.utils.permission * T5195: use colon_separated_to_dict from vyos.utils.dict * T5195: move is_systemd_service_* to vyos.utils.process * T5195: fix boot issues with missing imports * T5195: move dict_search_* helpers to vyos.utils.dict * T5195: move network helpers to vyos.utils.network * T5195: move commit_* helpers to vyos.utils.commit * T5195: move user I/O helpers to vyos.utils.io
2023-03-28dns: T5115: Support custom port for name servers for forwarding zones.Indrajit Raychaudhuri
This would allow using custom ports in name server operating on non- default port for forwarding zones. This is a follow-up to T5113 for sake of completeness and having consistent treatment of all name servers configured in PowerDNS recursor. Additionally, migrate `service dns forwarding domain example.com server` to `service dns forwarding domain foo3.com name-server` for consistency and reusability.
2022-11-16Revert "Revert "dns: T4799: fix bug with not reloading powerdns config""Christian Poessinger
This reverts commit 44df1cea1ebc3296844c5c35cf053a92cda4b944.
2022-11-09Revert "dns: T4799: fix bug with not reloading powerdns config"Christian Poessinger
This reverts commit ff09d4f47e5f54fad8258cd27fb0adfaa4c552b3. Process name is actually: <bound method Process.name of psutil.Process(pid=5031, name='pdns-r/worker', status='sleeping', started='08:51:51')>
2022-11-05dns: T4799: fix bug with not reloading powerdns configinitramfs
PowerDNS version 4.7 and above has changed the main process name from 'pdns-r/worker' to 'pdns_recursor'. This commit updates the process name check to use the new name.
2022-04-16dns: T4353: fix Jinja2 linting errorsChristian Poessinger
2021-12-10T562: bugfix missing "," on variable listingChristian Poessinger
This prevented VyOS to actually boot as the configuration could not be loaded, as "system host-name" was unable to commit.
2021-12-09Merge pull request #1024 from lucasec/dns-authoritativeChristian Poessinger
T562: Config syntax for defining DNS forward authoritative zones
2021-10-22hosts: T2683: Allow multiple entries for static-host-mappingViacheslav
2021-10-12T562: Config syntax for defining DNS forward authoritative zonesLucas Christian
2020-11-03T2465: Fixing permissions on socket so DHCP workskroy
2020-09-25dns: forwarding: T2921: migrate to get_config_dict()Christian Poessinger
2020-06-11vyos-hostsd: T2583: partial rewriteJernej Jakob
- update copyright date - validate incoming JSON data against a schema with voluptuous - add usage help describing internal messages syntax at top of vyos-hostsd - move socket and state file to directory /run/vyos-hostsd - replace jinja2 rendering with vyos.template - move all templates out of the executable into dedicated data/templates dirs - move recursor.conf forward-zones-recurse to forward-zones-file - generate lua-config-file for pdns-recursor with addNTA - support adding custom forward zones for pdns-recursor with optional added NTA and/or recursion-desired - move search_domains from set_host_name to separate add/delete/get commands - unify functions to support abstracting them in the future - track number of internal changes in "changes" variable saved in state file (informational in apply function) - do not apply changes immediately, add apply function that applies all changes (to not reload pdns-recursor excessively for a large set of changes, users must call the apply function once at the end) - add pdns_rec_control function that supports sending arbitrary commands to rec_control (fix pdns-recursor process name that caused the old function to think pdns-recursor was never running) - create /run/powerdns if it doesn't exist (on boot vyos-hostsd starts before pdns-recursor but we need to put our generated conf files there) - abstract specific command functions (add_*/del_*) into general functions to manipulate various types of data in the state variable - add command types: - forward_zones (generate custom forward zones for pdns-recursor) - search_domains (move from set_host_name as dhcp client needs to change them too) - name_server_tags_recursor (to set tags whose nameservers are added to pdns-recursor) - name_server_tags_system (to set tags whose nameservers and search domains are added to /etc/resolv.conf) - change hosts data format to make more sense (move tag from within each host dict to the key for a list of host dicts) - do not remove state file when shut down cleanly, to not lose state when restarting vyos-hostsd service that's then impossible to restore without restarting the whole router - a reboot will remove the state file as it lives in a tmpfs (/run) - remove too verbose info log on every received message - set mode of socket to 770 to secure it against processes not in hostsd group
2020-05-28dhcp: T2465: T2483: fix DNS resolution (pdns restatt)kroy-the-rabbit
2020-05-19T2465: Permissions on vyos-hostsd socket incorrectkroy-the-rabbit
The DHCP server is unable to apply entries to the hosts file because the permissions on the socket are getting created wrong. ``` $ ls -al /run/vyos-hostsd.sock srwxrwxrwx 1 root vyattacfg 0 May 20 01:38 /run/vyos-hostsd.sock ``` This gives it the correct permissions so that the nobody/nobody user/group can change it.
2020-04-18[T2311] name servers via cmdline can't take effectMaple Wang
Please refer to https://phabricator.vyos.net/T2311
2019-12-19vyos-hostsd: T1885: Fixed crash if stdout PIPE connection lostzsdc
In case if stdout PIPE were lost (for example, after systemd-journald restart), using print() will raise the exception. This patch replaces print() to logging function, which is not sensitive to this problem. This makes vyos-hostd resistant to stdout disconnection, but of course, all logs after stdout disconnection will be lost.
2019-11-17dns: T1786: add proper processing of 'system disable-dhcp-nameservers'zdc
2019-09-29[vyos-hostsd] T1701 Fix check for delete domain-name and domain-searchDmitriyEshenko
2019-09-19T1638: generated hosts file fix for proper FQDN resolutionkroy
2019-08-26T1598: add a vyos-hostsd operation for retrieving name servers by tag.Daniil Baturin
2019-08-21T1598: clean up vyos-hostsd state dump on clean shutdown.Daniil Baturin
2019-08-21T1598: improve autogenerated file comments.Daniil Baturin
2019-08-20T1598: initial implementation of the hosts keeper daemon.Daniil Baturin