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

wireguard: T7087: Fix vyos-domain-resolver failing if no wireguard interfaces defined #4317

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

Embezzle
Copy link
Contributor

Change summary

T4930 has introduced a bug where if no wireguard interfaces are defined, the vyos-domain-resolver process exits with failure. This PR implements a check in vyos-domain-resolver to see if output of dict_search_args is NoneType before attempting to iterate.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T7087
https://vyos.dev/T4930

Related PR(s)

How to test / Smoketest result

Test Steps

  1. Configure a domain-group, whilst having no wireguard interfaces configured:
vyos@vyos# set firewall group domain-group test address vyos.dev
vyos@vyos# delete interfaces wireguard
  1. Check vyos-domain-resolver starts correctly:
vyos@vyos# sudo systemctl status vyos-domain-resolver
● vyos-domain-resolver.service - VyOS firewall domain resolver
	 Loaded: loaded (/lib/systemd/system/vyos-domain-resolver.service; disabled; preset: enabled)
	 Active: active (running) since Sat 2025-01-25 12:45:18 GMT; 10s ago
   Main PID: 8272 (python3)
	  Tasks: 1 (limit: 1086)
	 Memory: 38.1M
		CPU: 290ms
	 CGroup: /system.slice/vyos-domain-resolver.service
			 └─8272 /usr/bin/python3 -u /usr/libexec/vyos/services/vyos-domain-resolver

Jan 25 12:45:18 vyos systemd[1]: Started vyos-domain-resolver.service - VyOS firewall domain resolver.
Jan 25 12:45:18 vyos vyos-domain-resolver[8272]: VyOS domain resolver
Jan 25 12:45:20 vyos vyos-domain-resolver[8272]: interval: 300s - cache: False
Jan 25 12:45:20 vyos vyos-domain-resolver[8272]: Updated 1 sets in firewall - result: 0
Jan 25 12:45:20 vyos vyos-domain-resolver[8272]: Updated 0 sets in nat - result: 0

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link

👍
No issues in PR Title / Commit Title

Copy link

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@c-po c-po merged commit 3a06711 into vyos:current Jan 30, 2025
14 checks passed
@Embezzle Embezzle deleted the T7087 branch January 30, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants