gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.36k stars 543 forks source link

[Bug]: `coredns` is queued before `Corefile` is generated #1829

Closed shirok1 closed 4 months ago

shirok1 commented 1 year ago

Contact Details

me@shirok1.dev

What happened?

I was using docker-compose.yml to deploy netmaker, in which PORT_FORWARD_SERVICES is set to dns by default. After docker compose up, coredns complains about the missing of /root/dnsconfig/Corefile and netmaker says "Fatal: Unable to initialize iptables on host: lookup coredns on 127.0.0.11:53: no such host".

It seems that coredns is queued before Corefile is generated, according to code here:

https://github.com/gravitl/netmaker/blob/72526ebd32fcc590a66a59013a4c5553e31d18d4/main.go#L119-L130

Version

v0.17.0

What OS are you using?

Linux

Relevant log output

coredns      | loading Caddyfile via flag: open /root/dnsconfig/Corefile: no such file or directory
netmaker     | [netmaker] Fatal: Unable to initialize iptables on host: lookup coredns on 127.0.0.11:53: no such host

Contributing guidelines

abhishek9686 commented 4 months ago

@shirok1 this has been fixed on recent versions

vivekpd15 commented 2 months ago

I am still getting this. CoreDNS is stuck in restart loop. Using v0.24.1.

loading Caddyfile via flag: open /root/dnsconfig/Corefile: no such file or directory

@abhishek9686