Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Starting dnsmasq after docker
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dr.nil
n00b
n00b


Joined: 18 Jul 2007
Posts: 47

PostPosted: Thu Sep 13, 2018 1:24 am    Post subject: Starting dnsmasq after docker Reply with quote

Hi,

I'm running dnsmasq on my laptop and I recently added the docker0 interface to dnsmasq's supported interface as I want DNS resolution inside the containers, too.

Now I'm having trouble during startup: without proper service dependency declaration dnsmasq will start before docker. I added
Code:
rc_after="docker"
to /etc/conf.d/dnsmasq and that makes dnsmasq indeed start after docker.

However at startup dnsmasq still complains about the missing docker0 interface. I was expecting the docker service to create said interface but I must be missing something obvious.

Help!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Sep 13, 2018 8:23 am    Post subject: Re: Starting dnsmasq after docker Reply with quote

dr.nil wrote:
I'm running dnsmasq on my laptop and I recently added the docker0 interface to dnsmasq's supported interface as I want DNS resolution inside the containers, too. Now I'm having trouble during startup: without proper service dependency declaration dnsmasq will start before docker.

dr.nil ... but that dependency is correct no, docker depends on their being network/dhcpd, and dnsmasq provides that. I expect that what you need is to create the docker0 interface via netifrc (similarly to bond0) see /usr/share/doc/netifrc-*/net.example.bz2.

best ... khay
Back to top
View user's profile Send private message
dr.nil
n00b
n00b


Joined: 18 Jul 2007
Posts: 47

PostPosted: Thu Sep 13, 2018 8:38 am    Post subject: Re: Starting dnsmasq after docker Reply with quote

khayyam wrote:
dr.nil ... but that dependency is correct no, docker depends on their being network/dhcpd, and dnsmasq provides that.


I'm afraid I was not completely clear: I use dnsmasq for DNS resolution on the laptop only. DHCP will be handled in the upstream network.

So let me rephrase the question: I thought that docker creates the docker0 interface. But dnsmasq starting directly after docker complains about the interface missing. So either anything else creates the docker0 interface (what?) or the docker init script terminates (and the boot process continues) before docker is fully initialized.

-dirk
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum