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

T6701: Added ability to disable the container DNS plugin #4032

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

dvlogic
Copy link

@dvlogic dvlogic commented Sep 5, 2024

Add ability to set the container network with a disable-dns setting to disable the DNS plugin that is on be default.

Change Summary

This changes allows one to configure a container network without using the built-in DNS plugin.

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/T6701

Related PR(s)

Component(s) name

podman

Proposed changes

Adds ability to set disable-dns on a container network

set container network PODNET disable-dns

How to test

set container network PODNET prefix '10.10.10.0/24'
set container network PODNET disable-dns
commit

run show ip port | grep 10\.10\.10\.1 | grep 53

You should have no DNS port 53 shown on the ports used for the container network.

Without the "disable-dns" setting, you will see a UDP port 53 owned by the "aardvark-dns" process

udp 0 0 10.10.10.1:53 0.0.0.0:* 25950/aardvark-dns

Smoketest result

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

github-actions bot commented Sep 5, 2024

👍
No issues in PR Title / Commit Title

Copy link

github-actions bot commented Sep 5, 2024

✅ No issues found in unused-imports check.. Please refer the workflow run

@dvlogic dvlogic changed the title Added ability to disables the container DNS plugin T6701 T6701: Added ability to disables the container DNS plugin Sep 5, 2024
@sever-sever
Copy link
Member

Change please commit message
It still without task number

@dvlogic dvlogic force-pushed the Allow_Container_DNS_Disable branch 3 times, most recently from bc4c9c9 to 0306adf Compare September 5, 2024 21:43
interface-definitions/container.xml.in Outdated Show resolved Hide resolved
@dmbaturin dmbaturin changed the title T6701: Added ability to disables the container DNS plugin T6701: Added ability to disable the container DNS plugin Sep 10, 2024
@dvlogic
Copy link
Author

dvlogic commented Sep 11, 2024

Updated the commit to add the changes requested by Christian Breunig

@c-po c-po self-requested a review September 11, 2024 05:34
@c-po c-po force-pushed the Allow_Container_DNS_Disable branch from e2b9574 to bd12528 Compare September 11, 2024 05:42
@c-po
Copy link
Member

c-po commented Sep 11, 2024

[email protected]:~$ /usr/libexec/vyos/tests/smoke/cli/test_container.py
test_api_socket (__main__.TestContainer.test_api_socket) ... ok
test_basic (__main__.TestContainer.test_basic) ... ok
test_cpu_limit (__main__.TestContainer.test_cpu_limit) ... ok
test_dual_stack_network (__main__.TestContainer.test_dual_stack_network) ... ok
test_ipv4_network (__main__.TestContainer.test_ipv4_network) ... ok
test_ipv6_network (__main__.TestContainer.test_ipv6_network) ... ok
test_no_name_server (__main__.TestContainer.test_no_name_server) ... ok <- NEW
test_uid_gid (__main__.TestContainer.test_uid_gid) ... ok

----------------------------------------------------------------------
Ran 8 tests in 133.896s

OK

Add ability to set the container network with a disable-dns setting to disable
the DNS plugin that is on be default.

  set container network <network> no-name-server
@c-po c-po force-pushed the Allow_Container_DNS_Disable branch from bd12528 to 1d5625d Compare September 11, 2024 05:43
@c-po
Copy link
Member

c-po commented Sep 11, 2024

@Mergifyio backport sagitta circinus

Copy link

mergify bot commented Sep 11, 2024

backport sagitta circinus

✅ Backports have been created

@c-po c-po merged commit 4d2d431 into vyos:current Sep 12, 2024
14 of 16 checks passed
dmbaturin added a commit that referenced this pull request Sep 12, 2024
T6701: Added ability to disable the container DNS plugin  (backport #4032)
@dvlogic dvlogic deleted the Allow_Container_DNS_Disable branch September 12, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants