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

flaky DNSService unit-test #8563

Closed
smira opened this issue Apr 8, 2024 · 0 comments · Fixed by #8577
Closed

flaky DNSService unit-test #8563

smira opened this issue Apr 8, 2024 · 0 comments · Fixed by #8577
Assignees

Comments

@smira
Copy link
Member

smira commented Apr 8, 2024

#212 34.91 === RUN   TestDNSServer
#212 34.91 === RUN   TestDNSServer/TestResolving
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	DEBUG	controller starting	{"controller": "network.DNSResolveCacheController"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	DEBUG	controller starting	{"controller": "network.DNSUpstreamController"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	INFO	created dns upstream	{"controller": "network.DNSUpstreamController", "addr": "8.8.8.8"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	INFO	created dns upstream	{"controller": "network.DNSUpstreamController", "addr": "1.1.1.1"}
#212 34.91 === NAME  TestDNSServer
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	DEBUG	starting dns server	{"net": "udp", "addr": "127.0.0.53:34013"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	WARN	error creating UDPv6 listener	{"net": "udp6", "addr": "[::1]:34013", "error": "listen udp6 [::1]:34013: bind: cannot assign requested address"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	DEBUG	starting dns server	{"net": "tcp", "addr": "127.0.0.53:34013"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	WARN	error creating TCPv6 listener	{"net": "tcp6", "addr": "[::1]:34013", "error": "listen tcp6 [::1]:34013: bind: cannot assign requested address"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	DEBUG	dns request	{"data": ";; opcode: QUERY, status: NOERROR, id: 39128\n;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0\n\n;; QUESTION SECTION:\n;google.com.\tIN\t A\n"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	WARN	error serving dns request	{"error": "no destination available"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.234Z	INFO	updated dns server nameservers	{"addrs": ["1.1.1.1:53", "8.8.8.8:53"]}
#212 34.91 === NAME  TestDNSServer/TestResolving
#212 34.91     dns_resolve_cache_test.go:89: 
#212 34.91         	Error Trace:	/src/internal/app/machined/pkg/controllers/network/dns_resolve_cache_test.go:89
#212 34.91         	Error:      	Not equal: 
#212 34.91         	            	expected: 0
#212 34.91         	            	actual  : 2
#212 34.91         	Test:       	TestDNSServer/TestResolving
#212 34.91         	Messages:   	;; opcode: QUERY, status: SERVFAIL, id: 39128
#212 34.91         	            	;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
#212 34.91         	            	
#212 34.91         	            	;; QUESTION SECTION:
#212 34.91         	            	;google.com.	IN	 A
#212 34.91     ctest.go:100: tear down
#212 34.91 === NAME  TestDNSServer
#212 34.91     logger.go:146: 2024-04-08T16:23:05.235Z	WARN	error creating UDPv6 listener	{"net": "udp6", "addr": "[::1]:34013", "error": "listen udp6 [::1]:34013: bind: cannot assign requested address"}
#212 34.91 === NAME  TestDNSServer/TestResolving
#212 34.91     logger.go:146: 2024-04-08T16:23:05.235Z	INFO	destroyed dns upstream	{"controller": "network.DNSUpstreamController", "addr": "1.1.1.1"}
#212 34.91 === NAME  TestDNSServer
#212 34.91     logger.go:146: 2024-04-08T16:23:05.235Z	WARN	error creating TCPv6 listener	{"net": "tcp6", "addr": "[::1]:34013", "error": "listen tcp6 [::1]:34013: bind: cannot assign requested address"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.235Z	INFO	updated dns server nameservers	{"addrs": []}
#212 34.91 === NAME  TestDNSServer/TestResolving
#212 34.91     logger.go:146: 2024-04-08T16:23:05.235Z	INFO	destroyed dns upstream	{"controller": "network.DNSUpstreamController", "addr": "8.8.8.8"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.236Z	DEBUG	controller finished	{"controller": "network.DNSUpstreamController"}
#212 34.91 === NAME  TestDNSServer
#212 34.91     logger.go:146: 2024-04-08T16:23:05.236Z	DEBUG	dns server stopped	{"net": "udp", "addr": "127.0.0.53:34013"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.236Z	DEBUG	dns listener closed	{"net": "udp", "addr": "127.0.0.53:34013"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.236Z	DEBUG	dns server stopped	{"net": "tcp", "addr": "127.0.0.53:34013"}
#212 34.91     logger.go:146: 2024-04-08T16:23:05.236Z	DEBUG	dns listener closed	{"net": "tcp", "addr": "127.0.0.53:34013"}
#212 34.91 === NAME  TestDNSServer/TestResolving
#212 34.91     logger.go:146: 2024-04-08T16:23:05.236Z	DEBUG	controller finished	{"controller": "network.DNSResolveCacheController"}
#212 34.91 --- FAIL: TestDNSServer (0.00s)
#212 34.91     --- FAIL: TestDNSServer/TestResolving (0.00s)
#212 34.91 FAIL
DmitriyMV added a commit to DmitriyMV/talos that referenced this issue Apr 10, 2024
Optimize `DNSResolveCacheController` type, including `dns.Server` optimization for easy start/stop. This PR ensures that we
delete server from runners on stop (even unexpected) and restart it properly. Also fixes incorrect assumption on unit-tests.

Fixes siderolabs#8563

This PR also does those things:
- Removes `utils.Runner`
- Removes `ctxutil.MonitorFn`
- Removes `dns.Runner`
- Removes `network.dnsRunner`

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
smira pushed a commit to smira/talos that referenced this issue Apr 12, 2024
Optimize `DNSResolveCacheController` type, including `dns.Server` optimization for easy start/stop. This PR ensures that we
delete server from runners on stop (even unexpected) and restart it properly. Also fixes incorrect assumption on unit-tests.

Fixes siderolabs#8563

This PR also does those things:
- Removes `utils.Runner`
- Removes `ctxutil.MonitorFn`
- Removes `dns.Runner`
- Removes `network.dnsRunner`

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
(cherry picked from commit ba7cdc8)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants