Bug#739363: does not properly start at bootup when systemd is used

2014-07-24 Thread Jarek Kamiński
On Tue, Feb 25, 2014 at 07:51:56PM +0100, Tomasz Buchert wrote:
 But, going back to our bug, it is caused by the missing DNS resolution at an 
 early
 phase of the boot. After=network.target is apparently not enough to have 
 DNS...
 I can't find any information how to ensure DNS resolution in systemd.
 The workaround for now is to replace name in miredo config with its IP address
 (it worked for me at least).

I had similar issue with miredo not starting under systemd today, but in
my case it was caused by the tun driver not being loaded. The init.d
script runs modprobe tun before starting miredo, but there is nothing
similar in the miredo.service.

Running modprobe tun manually helped in my case.


-- 
pozdr(); // Jarek


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



Bug#739363: does not properly start at bootup when systemd is used

2014-03-02 Thread Tomasz Buchert
On 01/03/14 12:59, Evgeni Golov wrote:
 Hi Tomasz,
 
 just a note, the Debian BTS does not automatically CC the bug-submitter,
 so I did not get your mail first.

Hi Evgeni,
sorry for that.

 
 On Tue, Feb 25, 2014 at 07:51:56PM +0100, Tomasz Buchert wrote:
  It is however present in journalctl:
 
 Ups, didn't look in there.
 
  Feb 25 13:41:49 debian miredo-checkconf[1229]: Invalid host name 
  “teredo-debian.remlab.net” at line 6: Temporary failure in name resolution
  Feb 25 13:41:49 debian miredo-checkconf[1229]: Server address not specified
  Feb 25 13:41:49 debian miredo-checkconf[1229]: Could not check config.
  Feb 25 13:41:49 debian miredo-checkconf[1229]: Fatal configuration error
  Feb 25 13:41:49 debian systemd[1]: miredo.service: control process exited, 
  code=exited status=255
  Feb 25 13:41:49 debian systemd[1]: Failed to start Teredo IPv6 tunneling.
  Feb 25 13:41:49 debian systemd[1]: Unit miredo.service entered failed state.
  
  Hmmm, we should inform systemd guys, I think.
  
  But, going back to our bug, it is caused by the missing DNS resolution at 
  an early
  phase of the boot. After=network.target is apparently not enough to have 
  DNS...
 
 Well, network.target asures to have working network, which may be as much
 as 127.0.0.1.
 
  I can't find any information how to ensure DNS resolution in systemd.
  The workaround for now is to replace name in miredo config with its IP 
  address
  (it worked for me at least).
  
  The real solution is either to:
 1) find a way to ensure DNS resolution via systemd (I think it may be
impossible)
 2) add a loop with timeout inside miredo checkconf that waits for DNS
to finish completely (presupposing that it's just a matter of time)
  
  I'll try to find 1), but ultimately I may go with 2).
 
 I'd go for not trying to resolve the DNS that hard. Imagine I boot my laptop
 initially in an environment, where I do not have (a real) network at all.
 2) would mean you'll loop for ever. How would miredo (without checkconfig)
 behave here? It would start and periodically wait to get a connection? That's
 at least what I would have expected (did not read the code).

Yes, I prepared a patch to not resolve DNS that hard and informed the
author of miredo. We are still discussing details of it.
And yes, miredo (but not its conf. check) handles such problems well.

 
 So iff miredo would do this, I'd suggest changing checkconfig to ignore DNS
 errors as non-fatal and allow miredo to start and connect at some later point.

Exactly. :)
I'll let you know when the bug is fixed.

 
 Regards
 Evgeni

Cheers,
Tomasz


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



Bug#739363: does not properly start at bootup when systemd is used

2014-03-01 Thread Evgeni Golov
Hi Tomasz,

just a note, the Debian BTS does not automatically CC the bug-submitter,
so I did not get your mail first.

On Tue, Feb 25, 2014 at 07:51:56PM +0100, Tomasz Buchert wrote:
 It is however present in journalctl:

Ups, didn't look in there.

 Feb 25 13:41:49 debian miredo-checkconf[1229]: Invalid host name 
 “teredo-debian.remlab.net” at line 6: Temporary failure in name resolution
 Feb 25 13:41:49 debian miredo-checkconf[1229]: Server address not specified
 Feb 25 13:41:49 debian miredo-checkconf[1229]: Could not check config.
 Feb 25 13:41:49 debian miredo-checkconf[1229]: Fatal configuration error
 Feb 25 13:41:49 debian systemd[1]: miredo.service: control process exited, 
 code=exited status=255
 Feb 25 13:41:49 debian systemd[1]: Failed to start Teredo IPv6 tunneling.
 Feb 25 13:41:49 debian systemd[1]: Unit miredo.service entered failed state.
 
 Hmmm, we should inform systemd guys, I think.
 
 But, going back to our bug, it is caused by the missing DNS resolution at an 
 early
 phase of the boot. After=network.target is apparently not enough to have 
 DNS...

Well, network.target asures to have working network, which may be as much
as 127.0.0.1.

 I can't find any information how to ensure DNS resolution in systemd.
 The workaround for now is to replace name in miredo config with its IP address
 (it worked for me at least).
 
 The real solution is either to:
1) find a way to ensure DNS resolution via systemd (I think it may be
   impossible)
2) add a loop with timeout inside miredo checkconf that waits for DNS
   to finish completely (presupposing that it's just a matter of time)
 
 I'll try to find 1), but ultimately I may go with 2).

I'd go for not trying to resolve the DNS that hard. Imagine I boot my laptop
initially in an environment, where I do not have (a real) network at all.
2) would mean you'll loop for ever. How would miredo (without checkconfig)
behave here? It would start and periodically wait to get a connection? That's
at least what I would have expected (did not read the code).

So iff miredo would do this, I'd suggest changing checkconfig to ignore DNS
errors as non-fatal and allow miredo to start and connect at some later point.

Regards
Evgeni


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



Bug#739363: does not properly start at bootup when systemd is used

2014-02-25 Thread Tomasz Buchert

Hi Evgeni,
just to let you know that I'm working on this.
I've tried with miredo in stable (1.2.3) and it starts fine.
With 1.2.6 I have the same problem as you, so it is some kind
of regression. I will find it. :)

Thanks for the bug report.

Cheers,
Tomasz


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



Bug#739363: does not properly start at bootup when systemd is used

2014-02-25 Thread Tomasz Buchert
On 25/02/14 18:43, Tomasz Buchert wrote:
 
 Hi Evgeni,
 just to let you know that I'm working on this.
 I've tried with miredo in stable (1.2.3) and it starts fine.
 With 1.2.6 I have the same problem as you, so it is some kind
 of regression. I will find it. :)
 
 Thanks for the bug report.
 
 Cheers,
 Tomasz

Hi again,
actually checkconf *outputs* something, but it is not visible in
systemctl status:

miredo.service - Teredo IPv6 tunneling
   Loaded: loaded (/lib/systemd/system/miredo.service; enabled)
   Active: failed (Result: exit-code) since Tue 2014-02-25 13:41:49 EST; 1min 
40s ago
  Process: 1229 ExecStartPre=/usr/sbin/miredo-checkconf -f 
/etc/miredo/miredo.conf (code=exited, status=255)

Feb 25 13:41:49 debian systemd[1]: miredo.service: control process exited, 
code=exited status=255
Feb 25 13:41:49 debian systemd[1]: Failed to start Teredo IPv6 tunneling.
Feb 25 13:41:49 debian systemd[1]: Unit miredo.service entered failed state.

It is however present in journalctl:

Feb 25 13:41:49 debian miredo-checkconf[1229]: Invalid host name 
“teredo-debian.remlab.net” at line 6: Temporary failure in name resolution
Feb 25 13:41:49 debian miredo-checkconf[1229]: Server address not specified
Feb 25 13:41:49 debian miredo-checkconf[1229]: Could not check config.
Feb 25 13:41:49 debian miredo-checkconf[1229]: Fatal configuration error
Feb 25 13:41:49 debian systemd[1]: miredo.service: control process exited, 
code=exited status=255
Feb 25 13:41:49 debian systemd[1]: Failed to start Teredo IPv6 tunneling.
Feb 25 13:41:49 debian systemd[1]: Unit miredo.service entered failed state.

Hmmm, we should inform systemd guys, I think.

But, going back to our bug, it is caused by the missing DNS resolution at an 
early
phase of the boot. After=network.target is apparently not enough to have 
DNS...
I can't find any information how to ensure DNS resolution in systemd.
The workaround for now is to replace name in miredo config with its IP address
(it worked for me at least).

The real solution is either to:
   1) find a way to ensure DNS resolution via systemd (I think it may be
  impossible)
   2) add a loop with timeout inside miredo checkconf that waits for DNS
  to finish completely (presupposing that it's just a matter of time)

I'll try to find 1), but ultimately I may go with 2).

Cheers,
Tomasz


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



Bug#739363: does not properly start at bootup when systemd is used

2014-02-17 Thread Evgeni Golov
Package: miredo
Version: 1.2.6-2
Severity: important

Hi,

today I decided to test systemd on my machine and noticed that miredo fails to
start at bootup, but does so fine afterwards:

evgeni@nana ~ % sudo systemctl status miredo
miredo.service - Teredo IPv6 tunneling
   Loaded: loaded (/lib/systemd/system/miredo.service; enabled)
   Active: failed (Result: exit-code) since Mon 2014-02-17 20:44:44 CET; 1min 
58s ago
  Process: 1079 ExecStartPre=/usr/sbin/miredo-checkconf -f 
/etc/miredo/miredo.conf (code=exited, status=255)

Feb 17 20:44:44 nana systemd[1]: Failed to start Teredo IPv6 tunneling.

evgeni@nana ~ % sudo systemctl start miredo

evgeni@nana ~ % sudo systemctl status miredo   
miredo.service - Teredo IPv6 tunneling
   Loaded: loaded (/lib/systemd/system/miredo.service; enabled)
   Active: active (running) since Mon 2014-02-17 20:51:56 CET; 5s ago
  Process: 2604 ExecStartPre=/usr/sbin/miredo-checkconf -f 
/etc/miredo/miredo.conf (code=exited, status=0/SUCCESS)
 Main PID: 2606 (miredo)
   CGroup: name=systemd:/system/miredo.service
   ├─2606 /usr/sbin/miredo -f
   ├─2617 /usr/sbin/miredo -f
   └─2619 /usr/lib/x86_64-linux-gnu/miredo/miredo-privproc 5

Feb 17 20:51:56 nana systemd[1]: Starting Teredo IPv6 tunneling...
Feb 17 20:51:56 nana systemd[1]: Started Teredo IPv6 tunneling.
Feb 17 20:51:56 nana miredo[2606]: miredo[2606]: Starting...
Feb 17 20:51:56 nana miredo[2606]: Starting...
Feb 17 20:51:56 nana miredo[2606]: miredo[2617]: New Teredo address/MTU
Feb 17 20:51:56 nana miredo[2606]: miredo[2617]: Teredo pseudo-tunnel started
Feb 17 20:51:56 nana miredo[2606]: miredo[2617]:  (address: 
2001:0:53aa:64c:c61:5c2c:a767:ac41, MTU: 1280)
Feb 17 20:51:56 nana miredo[2617]: New Teredo address/MTU
Feb 17 20:51:56 nana miredo[2617]: Teredo pseudo-tunnel started
Feb 17 20:51:56 nana miredo[2617]: (address: 
2001:0:53aa:64c:c61:5c2c:a767:ac41, MTU: 1280)


Looking at the source (checkconf.c), I have no idea where it bails out, as
it will always return -1 (=255) in case of an error.

If I can get you any more debugging output, please let me know.

Regerds
Evgeni

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12-1-amd64 (SMP w/4 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 miredo depends on:
ii  adduser  3.113+nmu3
ii  init-system-helpers  1.15
ii  iproute  1:3.12.0-2
ii  libc62.17-97
ii  libcap2  1:2.22-1.2
ii  libjudydebian1   1.0.5-1
ii  udev 204-7

miredo recommends no packages.

miredo suggests no packages.

-- 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