Modify

Opened 2 years ago

Last modified 2 years ago

#20443 new defect

igmpproxy will not start at boot up

Reported by: paulc74 Owned by: developers
Priority: high Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

Even with /etc/init.d/igmpproxy enabled. It will not start up on boot up and no errors appear in the log.

If I enter the command /etc/init.d/igmpproxy start after booting. It starts fine with no errors.

currently using r46763

Any other info that might be needed let me know.

Attachments (0)

Change History (11)

comment:1 Changed 2 years ago by puleglot

This is probably due to the following code from init script:

	[ -n "$device" -a "$up" = "1" ] || {
		procd_append_param error "$network is not up"
		return;
	}

As a result $has_upstream in most cases is undefined and igmpproxy is not started.

comment:2 Changed 2 years ago by AlexanderA80

On Chaos Calmer 15.05 release this problem is still actual. Can't upgrade my router from 14.07 because of it.

comment:3 Changed 2 years ago by anonymous

Hmmm.. I was wrong. Interface status changes should trigger the restart of igmpproxy init script, but looks like this doesn't happen for some reason.

comment:4 Changed 2 years ago by anonymous

OK. I figured it out. It seems that triggers are being added to late in start_service(): after [ -n "$has_upstream" ] || return :)

comment:5 Changed 2 years ago by AlexanderA80

Can you post here correct variant?

comment:6 Changed 2 years ago by puleglot

I don't know if it is possible to register triggers without spawning the daemon. So quick and dirty fix is to just delete the following line:

    [ -n "$has_upstream" ] || return

The only problem is that procd will keep trying to spawn the daemon while upstream interface is down and spam the log:

Fri Sep 25 18:45:32 2015 user.err igmpproxy[6544]: There must be at least 2 Vif's where one is upstream.
Fri Sep 25 18:45:37 2015 user.err igmpproxy[6560]: There must be at least 2 Vif's where one is upstream.
Fri Sep 25 18:45:42 2015 user.err igmpproxy[6561]: There must be at least 2 Vif's where one is upstream.
Fri Sep 25 18:45:47 2015 user.err igmpproxy[6562]: There must be at least 2 Vif's where one is upstream.
Fri Sep 25 18:45:52 2015 user.err igmpproxy[6586]: There must be at least 2 Vif's where one is upstream.

comment:7 Changed 2 years ago by nbd

please try this patch: http://nbd.name/igmpproxy.patch

comment:8 Changed 2 years ago by puleglot

Well.. I already tried the same patch. I have two interfaces in igmpproxy config: upstream wan and downstream lan. As you can see trigger doesn't work:

$ pgrep igmpproxy
14484
$ sudo ifdown wan
$ pgrep igmpproxy
14484
$ pgrep igmpproxy
14484
$ pgrep igmpproxy
14484
$ sudo ifup wan
$ pgrep igmpproxy
14484
$ pgrep igmpproxy
14484

Probably needed some changes in procd to support this. I'm currently using an ugly workaround. :)

   if [ -n "$has_upstream" ]; then
       procd_set_param command $PROG
       [ -n "$OPTIONS" ] && procd_append_param command $OPTIONS
       procd_append_param command $CONFIGFILE
   else
       # Ugly hack. This way we register interface trigger
       # without spawning igmpproxy
       procd_set_param command /bin/sleep 3600
   fi

comment:9 Changed 2 years ago by paulc74

I tried the patch submitted by nbd. Made no difference that I can see.

After reboot the contents of the file /var/etc/igmpproxy.conf are

quickleave

phyint eth0 downstream ratelimit 0 threshold 1

After I run /etc/init.d/igmpproxy start the contents of /var/etc/igmpproxy.conf change to

quickleave

phyint eth0 downstream ratelimit 0 threshold 1

phyint eth1 upstream ratelimit 0 threshold 1
        altnet 0.0.0.0/0

It looks like the Wan interface is not coming up in time during boot for igmpproxy to start.

I get the same outcome with and without the patch supplied by nbd.

comment:10 Changed 2 years ago by AlexanderA80

My "solution":
In Web interface - System - Startup (or edit /etc/rc.local)

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
sleep 10
/etc/init.d/igmpproxy restart
exit 0

comment:11 Changed 2 years ago by anonymous

A better solution is to add file

/etc/hotplug.d/iface/40-igmpproxy with this content

#!/bin/sh
[ "$INTERFACE" = wan ] && [ "$ACTION" = ifup ] && /etc/init.d/igmpproxy restart

and run

/etc/init.d/igmpproxy disable

In this cast it will be started after the interface is up.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.