Bug#675854: dnsmasq: resolvconf overwrites entries in resolv.conf

2012-06-08 Thread Tollef Fog Heen
]] Ritesh Raj Sarraf 

> Tollef: The bug has a good amount of detail. I think there are use cases
> that systemd does not cover. In this case, it is reading the variables
> from the /etc/default/dnsmasq file. The bug has the details. Please
> correct if things have changed otherwise.

If you absolutely need to read the settings from the default file, put
that in a script and call that as the execstart command from the
.service file.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#675854: dnsmasq: resolvconf overwrites entries in resolv.conf

2012-06-08 Thread Simon Kelley
On 08/06/12 14:47, Ritesh Raj Sarraf wrote:
> On Friday 08 June 2012 01:05 PM, Tollef Fog Heen wrote:
>> ]] Ritesh Raj Sarraf 
>>
>>> Do you want this bug re-assigned to dnsmasq? I think it fits in on
>>> systemd. systemd should be a drop-in replacement.  But then, systemd
>>> doesn't claim to be a drop-in replacement. It states that applications
>>> need to be modified (systemd-ized) and adapt to systemd.
>> Given dnsmasq ships a .service file, it's dnsmasq's responsibility to
>> ensure it has the same behaviour with both service definitions.  So,
>> this bugs belongs in dnsmasq.
>>
> Tollef: The bug has a good amount of detail. I think there are use cases
> that systemd does not cover. In this case, it is reading the variables
> from the /etc/default/dnsmasq file. The bug has the details. Please
> correct if things have changed otherwise.
> 
> 

The real problem here is not /etc/default/dnsmasq, it's the code in
/etc/init.d/dnsmasq which links dnsmasq and resolvconf. What is required is:

1) Pass an extra command-line argument to dnsmasq iff /sbin/resolvconf
exists.

2) Run "echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.dnsmasq"
after dnsmasq has started succesfully  (ExecStartPost should do that)
but again, only if /sbin/resolvconf exists.

3) run "/sbin/resolvconf -d lo.dnsmasq" after dnsmasq has stopped.
(ExecStopPost)

The difficult part of this seems to be that different actions are needed
depending of if resolvconf is installed or not.

Simon.




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#675854: dnsmasq: resolvconf overwrites entries in resolv.conf

2012-06-08 Thread Ritesh Raj Sarraf
On Friday 08 June 2012 01:05 PM, Tollef Fog Heen wrote:
> ]] Ritesh Raj Sarraf 
>
>> Do you want this bug re-assigned to dnsmasq? I think it fits in on
>> systemd. systemd should be a drop-in replacement.  But then, systemd
>> doesn't claim to be a drop-in replacement. It states that applications
>> need to be modified (systemd-ized) and adapt to systemd.
> Given dnsmasq ships a .service file, it's dnsmasq's responsibility to
> ensure it has the same behaviour with both service definitions.  So,
> this bugs belongs in dnsmasq.
>
Tollef: The bug has a good amount of detail. I think there are use cases
that systemd does not cover. In this case, it is reading the variables
from the /etc/default/dnsmasq file. The bug has the details. Please
correct if things have changed otherwise.


-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."




signature.asc
Description: OpenPGP digital signature


Bug#675854: dnsmasq: resolvconf overwrites entries in resolv.conf

2012-06-08 Thread Tollef Fog Heen
]] Ritesh Raj Sarraf 

> Do you want this bug re-assigned to dnsmasq? I think it fits in on
> systemd. systemd should be a drop-in replacement.  But then, systemd
> doesn't claim to be a drop-in replacement. It states that applications
> need to be modified (systemd-ized) and adapt to systemd.

Given dnsmasq ships a .service file, it's dnsmasq's responsibility to
ensure it has the same behaviour with both service definitions.  So,
this bugs belongs in dnsmasq.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#675854: dnsmasq: resolvconf overwrites entries in resolv.conf

2012-06-07 Thread Ritesh Raj Sarraf
On Thursday 07 June 2012 08:53 PM, Simon Kelley wrote:
> We've been here before.
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640095
>
> is relevant, I think.
Yes, and you did talk about the resolvconf issue there. But there wasn't
a resolution I see.
Do you want this bug re-assigned to dnsmasq? I think it fits in on
systemd. systemd should be a drop-in replacement.  But then, systemd
doesn't claim to be a drop-in replacement. It states that applications
need to be modified (systemd-ized) and adapt to systemd.

-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."




signature.asc
Description: OpenPGP digital signature


Bug#675854: dnsmasq: resolvconf overwrites entries in resolv.conf

2012-06-07 Thread Simon Kelley
On 07/06/12 15:41, Ritesh Raj Sarraf wrote:
> reopen 675854
> retitle 675854 "systemd breaks dnsmasq"
> reassign 675854 systemd
> thanks
> 
> 
> Just verified it back with sysvinit. If the expectation is that every
> package maintainer has to adapt systemd, then this bug can be
> closed/reassigned. Otherwise, if systemd is expected to run sysv
> initscripts in compat mode without breaking them, then this is a bug.
> 
> 
> I see that systemd provides a dnsmasq service.  In the sysv init method,
> it sources /etc/default/dnsmasq for a couple of settings, one of which
> matters this use case. Looking at the systemd service file for dnsmasq,
> I do not see the equivalent.
> 
> How do we do that in systemd? This will be a common problem for many of
> my packages too which do a lot of shell work to bring sanity.
> 


We've been here before.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640095

is relevant, I think.


Simon.





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#675854: dnsmasq: resolvconf overwrites entries in resolv.conf

2012-06-07 Thread Ritesh Raj Sarraf
reopen 675854
retitle 675854 "systemd breaks dnsmasq"
reassign 675854 systemd
thanks


Just verified it back with sysvinit. If the expectation is that every
package maintainer has to adapt systemd, then this bug can be
closed/reassigned. Otherwise, if systemd is expected to run sysv
initscripts in compat mode without breaking them, then this is a bug.


I see that systemd provides a dnsmasq service.  In the sysv init method,
it sources /etc/default/dnsmasq for a couple of settings, one of which
matters this use case. Looking at the systemd service file for dnsmasq,
I do not see the equivalent.

How do we do that in systemd? This will be a common problem for many of
my packages too which do a lot of shell work to bring sanity.


On Thursday 07 June 2012 07:46 PM, Ritesh Raj Sarraf wrote:
> On Sunday 03 June 2012 11:12 PM, Ritesh Raj Sarraf wrote:
>> Package: dnsmasq
>> Version: 2.61-1
>> Severity: normal
>>
>> With dnsmasq, I am supposed to just see 127.0.0.1 in my
>> /etc/resolv.conf. The actual nameserver entries, based on my network
>> connection state, should be updated in /var/run/dnsmasq/resolv.conf.
>> This is the expectation when using dnsmasq + resolvconf.
>>
>> My config is customized as per the recommendations. But still,
>> resolvconf keeps committing changes into /etc/resolv.conf, which,
>> forfeits the whole idea of install dnsmasq.
>>
>>
>> At the time of this writing, with the attached dnsmasq settings in this
>> bug report, the following is the state of /etc/resolv.conf
>>
>> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by
>> # resolvconf(8)
>> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
>> nameserver 192.168.2.1
>> nameserver 10.73.158.106
>> nameserver 10.73.158.107
>>
>>
>> In its current state, how is dnsmasq supposed to be used? Or is it a
>> buggy behavior I am facing?
>>
>>
> Definitely something to do with the reboot warning that resolvconf
> mentions. Right now, like I'd have hoped, the resolv.conf is set up
> properly. Closing this bug.
>


-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."




signature.asc
Description: OpenPGP digital signature


Bug#675854: dnsmasq: resolvconf overwrites entries in resolv.conf

2012-06-03 Thread Ritesh Raj Sarraf
Package: dnsmasq
Version: 2.61-1
Severity: normal

With dnsmasq, I am supposed to just see 127.0.0.1 in my
/etc/resolv.conf. The actual nameserver entries, based on my network
connection state, should be updated in /var/run/dnsmasq/resolv.conf.
This is the expectation when using dnsmasq + resolvconf.

My config is customized as per the recommendations. But still,
resolvconf keeps committing changes into /etc/resolv.conf, which,
forfeits the whole idea of install dnsmasq.


At the time of this writing, with the attached dnsmasq settings in this
bug report, the following is the state of /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by
# resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.2.1
nameserver 10.73.158.106
nameserver 10.73.158.107


In its current state, how is dnsmasq supposed to be used? Or is it a
buggy behavior I am facing?

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.3.0-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dnsmasq depends on:
ii  adduser   3.113+nmu2
ii  dnsmasq-base  2.61-1
ii  netbase   5.0

dnsmasq recommends no packages.

Versions of packages dnsmasq suggests:
ii  resolvconf  1.65

-- Configuration Files:
/etc/default/dnsmasq changed:
ENABLED=1
CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
IGNORE_RESOLVCONF=yes

/etc/dnsmasq.conf changed:
resolv-file=/var/run/dnsmasq/resolv.conf


-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org