* [meta-networking][PATCH 1/2] dnsmasq: add info for port setting @ 2017-02-27 8:09 jackie.huang 2017-02-27 8:09 ` [meta-networking][PATCH 2/2] dnsmasq: disable the service by default jackie.huang 0 siblings, 1 reply; 7+ messages in thread From: jackie.huang @ 2017-02-27 8:09 UTC (permalink / raw) To: openembedded-devel From: Jackie Huang <jackie.huang@windriver.com> The info is taken from CentOS which is usefull when bind (provides named) and dnsmasq are both installed and one may fail to start: | dnsmasq: failed to create listening socket for port 53: Address already in use Signed-off-by: Jackie Huang <jackie.huang@windriver.com> --- meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf index 34d5135..9e5ab9f 100755 --- a/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf +++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf @@ -4,6 +4,11 @@ # as the long options legal on the command line. See # "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +# Listen on this specific port instead of the standard DNS port +# (53). Setting this to zero completely disables DNS function, +# leaving only DHCP and/or TFTP. +#port=5353 + # Change these lines if you want dnsmasq to serve MX records. # Only one of mx-host and mx-target need be set, the other defaults # to the name of the host running dnsmasq. -- 2.8.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [meta-networking][PATCH 2/2] dnsmasq: disable the service by default 2017-02-27 8:09 [meta-networking][PATCH 1/2] dnsmasq: add info for port setting jackie.huang @ 2017-02-27 8:09 ` jackie.huang 2017-02-27 14:39 ` Bruce Ashfield 0 siblings, 1 reply; 7+ messages in thread From: jackie.huang @ 2017-02-27 8:09 UTC (permalink / raw) To: openembedded-devel From: Jackie Huang <jackie.huang@windriver.com> The service will fail to start/stop when dnsmasq and bind (provides named) are both installed since they are using the same port 53: | dnsmasq: failed to create listening socket for port 53: Address already in use So disable the service by default, if the user really want to use two dns servives, the config needs to be changed to use different interfaces or ports. As reference, other distro like centos/fedora also disables the services by default on installation. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> --- meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 424a06b..9c2276f 100644 --- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc @@ -81,3 +81,4 @@ RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" SYSTEMD_SERVICE_${PN} = "dnsmasq.service" +SYSTEMD_AUTO_ENABLE ?= "disable" -- 2.8.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [meta-networking][PATCH 2/2] dnsmasq: disable the service by default 2017-02-27 8:09 ` [meta-networking][PATCH 2/2] dnsmasq: disable the service by default jackie.huang @ 2017-02-27 14:39 ` Bruce Ashfield 2017-02-28 1:12 ` Huang, Jie (Jackie) 0 siblings, 1 reply; 7+ messages in thread From: Bruce Ashfield @ 2017-02-27 14:39 UTC (permalink / raw) To: Huang, Jie (Jackie); +Cc: openembedded-devel On Mon, Feb 27, 2017 at 3:09 AM, <jackie.huang@windriver.com> wrote: > From: Jackie Huang <jackie.huang@windriver.com> > > The service will fail to start/stop when dnsmasq and > bind (provides named) are both installed since they > are using the same port 53: > > | dnsmasq: failed to create listening socket for port 53: Address already > in use > > So disable the service by default, if the user really > want to use two dns servives, the config needs to be > changed to use different interfaces or ports. > But what if the user is only using dnsmasq ? (which is the case in the images I use). This would be a behaviour change that they add dnsmasq, but don't actually get the service started. IMHO if someone is installing two packages that provide the same service, they are more aware of what is going on and can disable one (or the other) .. versus someone that adds a single package that provides a service .. and then find out that it doesn't actually start. Bruce > > As reference, other distro like centos/fedora also > disables the services by default on installation. > > Signed-off-by: Jackie Huang <jackie.huang@windriver.com> > --- > meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > index 424a06b..9c2276f 100644 > --- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > @@ -81,3 +81,4 @@ RPROVIDES_${PN} += "${PN}-systemd" > RREPLACES_${PN} += "${PN}-systemd" > RCONFLICTS_${PN} += "${PN}-systemd" > SYSTEMD_SERVICE_${PN} = "dnsmasq.service" > +SYSTEMD_AUTO_ENABLE ?= "disable" > -- > 2.8.3 > > -- > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-devel > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [meta-networking][PATCH 2/2] dnsmasq: disable the service by default 2017-02-27 14:39 ` Bruce Ashfield @ 2017-02-28 1:12 ` Huang, Jie (Jackie) 2017-02-28 1:17 ` Joe MacDonald 2017-02-28 17:30 ` Bruce Ashfield 0 siblings, 2 replies; 7+ messages in thread From: Huang, Jie (Jackie) @ 2017-02-28 1:12 UTC (permalink / raw) To: Bruce Ashfield; +Cc: openembedded-devel It can be overridden to enable the service in the conf file of the distro with witch only dnsmasq is used in the images. We can also disable the service in the distro conf file instead of in the recipe if it makes more sense. Thanks, Jackie From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com] Sent: Monday, February 27, 2017 10:39 PM To: Huang, Jie (Jackie) Cc: openembedded-devel Subject: Re: [oe] [meta-networking][PATCH 2/2] dnsmasq: disable the service by default On Mon, Feb 27, 2017 at 3:09 AM, <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> wrote: From: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> The service will fail to start/stop when dnsmasq and bind (provides named) are both installed since they are using the same port 53: | dnsmasq: failed to create listening socket for port 53: Address already in use So disable the service by default, if the user really want to use two dns servives, the config needs to be changed to use different interfaces or ports. But what if the user is only using dnsmasq ? (which is the case in the images I use). This would be a behaviour change that they add dnsmasq, but don't actually get the service started. IMHO if someone is installing two packages that provide the same service, they are more aware of what is going on and can disable one (or the other) .. versus someone that adds a single package that provides a service .. and then find out that it doesn't actually start. Bruce As reference, other distro like centos/fedora also disables the services by default on installation. Signed-off-by: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> --- meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc index 424a06b..9c2276f 100644 --- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc @@ -81,3 +81,4 @@ RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" SYSTEMD_SERVICE_${PN} = "dnsmasq.service" +SYSTEMD_AUTO_ENABLE ?= "disable" -- 2.8.3 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org<mailto:Openembedded-devel@lists.openembedded.org> http://lists.openembedded.org/mailman/listinfo/openembedded-devel -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [meta-networking][PATCH 2/2] dnsmasq: disable the service by default 2017-02-28 1:12 ` Huang, Jie (Jackie) @ 2017-02-28 1:17 ` Joe MacDonald 2017-02-28 3:35 ` Huang, Jie (Jackie) 2017-02-28 17:30 ` Bruce Ashfield 1 sibling, 1 reply; 7+ messages in thread From: Joe MacDonald @ 2017-02-28 1:17 UTC (permalink / raw) To: Huang, Jie (Jackie); +Cc: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 3622 bytes --] [Re: [oe] [meta-networking][PATCH 2/2] dnsmasq: disable the service by default] On 17.02.28 (Tue 01:12) Huang, Jie (Jackie) wrote: > It can be overridden to enable the service in the conf file of the > distro with witch only dnsmasq is used in the images. > > We can also disable the service in the distro conf file instead of in > the recipe if it makes more sense. I've been thinking about this and I think it would make more sense for dnsmasq to have a PROVIDE/CONFLICT option that would eliminate the risk, though I guess I can see a scenario where you might want to use bind for DNS services and use dnsmasq to provide just DHCP or something. It would be a weird setup, though. Seems to me that your patch is to cover a case where you want to have both on the system, though, so can you explain why we wouldn't make dnsmasq incompatible with bind? In that scenario, why not check for a PACKAGECONFIG option or for the presence of bind and only disable dnsmasq if you find bind as well? -J. > > Thanks, > Jackie > > From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com] > Sent: Monday, February 27, 2017 10:39 PM > To: Huang, Jie (Jackie) > Cc: openembedded-devel > Subject: Re: [oe] [meta-networking][PATCH 2/2] dnsmasq: disable the service by default > > > > On Mon, Feb 27, 2017 at 3:09 AM, <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> wrote: > From: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> > > The service will fail to start/stop when dnsmasq and > bind (provides named) are both installed since they > are using the same port 53: > > | dnsmasq: failed to create listening socket for port 53: Address already in use > > So disable the service by default, if the user really > want to use two dns servives, the config needs to be > changed to use different interfaces or ports. > > But what if the user is only using dnsmasq ? (which is the case in the images I use). > This would be a behaviour change that they add dnsmasq, but don't actually get the > service started. > IMHO if someone is installing two packages that provide the same service, they > are more aware of what is going on and can disable one (or the other) .. versus > someone that adds a single package that provides a service .. and then find out that > it doesn't actually start. > Bruce > > > As reference, other distro like centos/fedora also > disables the services by default on installation. > > Signed-off-by: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> > --- > meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > index 424a06b..9c2276f 100644 > --- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > @@ -81,3 +81,4 @@ RPROVIDES_${PN} += "${PN}-systemd" > RREPLACES_${PN} += "${PN}-systemd" > RCONFLICTS_${PN} += "${PN}-systemd" > SYSTEMD_SERVICE_${PN} = "dnsmasq.service" > +SYSTEMD_AUTO_ENABLE ?= "disable" > -- > 2.8.3 > > -- > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org<mailto:Openembedded-devel@lists.openembedded.org> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" -- -Joe MacDonald. :wq [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 484 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [meta-networking][PATCH 2/2] dnsmasq: disable the service by default 2017-02-28 1:17 ` Joe MacDonald @ 2017-02-28 3:35 ` Huang, Jie (Jackie) 0 siblings, 0 replies; 7+ messages in thread From: Huang, Jie (Jackie) @ 2017-02-28 3:35 UTC (permalink / raw) To: Joe MacDonald; +Cc: openembedded-devel > -----Original Message----- > From: Joe MacDonald [mailto:Joe_MacDonald@mentor.com] > Sent: Tuesday, February 28, 2017 9:17 AM > To: Huang, Jie (Jackie) > Cc: Bruce Ashfield; openembedded-devel > Subject: Re: [oe] [meta-networking][PATCH 2/2] dnsmasq: disable the service by default > > [Re: [oe] [meta-networking][PATCH 2/2] dnsmasq: disable the service by default] On 17.02.28 (Tue > 01:12) Huang, Jie (Jackie) wrote: > > > It can be overridden to enable the service in the conf file of the > > distro with witch only dnsmasq is used in the images. > > > > We can also disable the service in the distro conf file instead of in > > the recipe if it makes more sense. > > I've been thinking about this and I think it would make more sense for > dnsmasq to have a PROVIDE/CONFLICT option that would eliminate the risk, > though I guess I can see a scenario where you might want to use bind for > DNS services and use dnsmasq to provide just DHCP or something. It > would be a weird setup, though. > > Seems to me that your patch is to cover a case where you want to have > both on the system, though, so can you explain why we wouldn't make > dnsmasq incompatible with bind? We're using bind and dhcp as default DNS and DHCP service, but lxc depends on dnsmasq to provide these services, so if we add lxc we need to install both of them, but lxc doesn't need dnsmasq service to be started, it starts dnsmaq in its script to listen to a virtual address which won't cause conflicts. So I think bind and dnsmasq doesn't have to be incompatible. > > In that scenario, why not check for a PACKAGECONFIG option or for the > presence of bind and only disable dnsmasq if you find bind as well? It works as well if there is a way to check the presence of bind when building dnsmasq, could you give me a tip how to do that? Thanks! Thanks, Jackie > > -J. > > > > > Thanks, > > Jackie > > > > From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com] > > Sent: Monday, February 27, 2017 10:39 PM > > To: Huang, Jie (Jackie) > > Cc: openembedded-devel > > Subject: Re: [oe] [meta-networking][PATCH 2/2] dnsmasq: disable the service by default > > > > > > > > On Mon, Feb 27, 2017 at 3:09 AM, > <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> wrote: > > From: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> > > > > The service will fail to start/stop when dnsmasq and > > bind (provides named) are both installed since they > > are using the same port 53: > > > > | dnsmasq: failed to create listening socket for port 53: Address already in use > > > > So disable the service by default, if the user really > > want to use two dns servives, the config needs to be > > changed to use different interfaces or ports. > > > > But what if the user is only using dnsmasq ? (which is the case in the images I use). > > This would be a behaviour change that they add dnsmasq, but don't actually get the > > service started. > > IMHO if someone is installing two packages that provide the same service, they > > are more aware of what is going on and can disable one (or the other) .. versus > > someone that adds a single package that provides a service .. and then find out that > > it doesn't actually start. > > Bruce > > > > > > As reference, other distro like centos/fedora also > > disables the services by default on installation. > > > > Signed-off-by: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> > > --- > > meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes- > support/dnsmasq/dnsmasq.inc > > index 424a06b..9c2276f 100644 > > --- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > > +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > > @@ -81,3 +81,4 @@ RPROVIDES_${PN} += "${PN}-systemd" > > RREPLACES_${PN} += "${PN}-systemd" > > RCONFLICTS_${PN} += "${PN}-systemd" > > SYSTEMD_SERVICE_${PN} = "dnsmasq.service" > > +SYSTEMD_AUTO_ENABLE ?= "disable" > > -- > > 2.8.3 > > > > -- > > _______________________________________________ > > Openembedded-devel mailing list > > Openembedded-devel@lists.openembedded.org<mailto:Openembedded- > devel@lists.openembedded.org> > > http://lists.openembedded.org/mailman/listinfo/openembedded-devel > > > > > > > > -- > > "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" > -- > -Joe MacDonald. > :wq ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [meta-networking][PATCH 2/2] dnsmasq: disable the service by default 2017-02-28 1:12 ` Huang, Jie (Jackie) 2017-02-28 1:17 ` Joe MacDonald @ 2017-02-28 17:30 ` Bruce Ashfield 1 sibling, 0 replies; 7+ messages in thread From: Bruce Ashfield @ 2017-02-28 17:30 UTC (permalink / raw) To: Huang, Jie (Jackie); +Cc: openembedded-devel On Mon, Feb 27, 2017 at 8:12 PM, Huang, Jie (Jackie) < Jackie.Huang@windriver.com> wrote: > It can be overridden to enable the service in the conf file of the distro > > with witch only dnsmasq is used in the images. > > > Right .. I realized that you can turn it on, but my point was more that if you are only including dnsmasq, you wouldn't expect that you'd have to explicitly turn it on .. and it wasn't the case that you had to do that previously. Bruce > We can also disable the service in the distro conf file instead of in the > recipe > > if it makes more sense. > > > > Thanks, > > Jackie > > > > *From:* Bruce Ashfield [mailto:bruce.ashfield@gmail.com] > *Sent:* Monday, February 27, 2017 10:39 PM > *To:* Huang, Jie (Jackie) > *Cc:* openembedded-devel > *Subject:* Re: [oe] [meta-networking][PATCH 2/2] dnsmasq: disable the > service by default > > > > > > > > On Mon, Feb 27, 2017 at 3:09 AM, <jackie.huang@windriver.com> wrote: > > From: Jackie Huang <jackie.huang@windriver.com> > > The service will fail to start/stop when dnsmasq and > bind (provides named) are both installed since they > are using the same port 53: > > | dnsmasq: failed to create listening socket for port 53: Address already > in use > > So disable the service by default, if the user really > want to use two dns servives, the config needs to be > changed to use different interfaces or ports. > > > > But what if the user is only using dnsmasq ? (which is the case in the > images I use). > > This would be a behaviour change that they add dnsmasq, but don't actually > get the > > service started. > > IMHO if someone is installing two packages that provide the same service, > they > > are more aware of what is going on and can disable one (or the other) .. > versus > > someone that adds a single package that provides a service .. and then > find out that > > it doesn't actually start. > > Bruce > > > > > As reference, other distro like centos/fedora also > disables the services by default on installation. > > Signed-off-by: Jackie Huang <jackie.huang@windriver.com> > --- > meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > index 424a06b..9c2276f 100644 > --- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc > @@ -81,3 +81,4 @@ RPROVIDES_${PN} += "${PN}-systemd" > RREPLACES_${PN} += "${PN}-systemd" > RCONFLICTS_${PN} += "${PN}-systemd" > SYSTEMD_SERVICE_${PN} = "dnsmasq.service" > +SYSTEMD_AUTO_ENABLE ?= "disable" > -- > 2.8.3 > > -- > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-devel > > > > > -- > > "Thou shalt not follow the NULL pointer, for chaos and madness await thee > at its end" > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-02-28 17:30 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-02-27 8:09 [meta-networking][PATCH 1/2] dnsmasq: add info for port setting jackie.huang 2017-02-27 8:09 ` [meta-networking][PATCH 2/2] dnsmasq: disable the service by default jackie.huang 2017-02-27 14:39 ` Bruce Ashfield 2017-02-28 1:12 ` Huang, Jie (Jackie) 2017-02-28 1:17 ` Joe MacDonald 2017-02-28 3:35 ` Huang, Jie (Jackie) 2017-02-28 17:30 ` Bruce Ashfield
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.