View previous topic :: View next topic |
Author |
Message |
Hrk Tux's lil' helper
Joined: 24 May 2003 Posts: 90 Location: Rome, Italy
|
Posted: Mon Jan 26, 2009 8:21 pm Post subject: [SOLVED] services depending on wrong network interface |
|
|
Hi,
I have a headless server with multiple network cards: eth0 (lan1), eth1 (lan2), eth2 (bridged to ppp0 for ADSL). The problem is that if ppp0 goes down, either manually or -and here lies the problem- if the ADSL line goes down, all the "net" requiring services go down: apache, dovecot, sshd.
You can see the problem by yourself. I don't understand (don't know where to look) why if only one interface goes down, all the services go down too. They should stay up, since there are other active interfaces.
Is this caused by a misconfiguration on my part? The network interfaces have all been added to the default runlevel, so they're all brought up at the same time.
I'm using openrc and baselayout-2, but I am 50% positive that this happened before I moved to baselayout-2 too (Yeah, 50% means "Maybe yes, maybe not").
Where should I look?
Last edited by Hrk on Thu Feb 05, 2009 10:05 pm; edited 1 time in total |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Hrk Tux's lil' helper
Joined: 24 May 2003 Posts: 90 Location: Rome, Italy
|
Posted: Mon Jan 26, 2009 9:41 pm Post subject: |
|
|
Thank you for the answer. I've added the definition in rc.conf and I'll see what happens, but I want to stress that all the network interfaces are already in the default runlevel (all of them).
If I confirm that:
- all the interfaces are in the default runlevel
- there is no "rc_net_provide_xxx="!net"
- stopping one interface causes all the services to go down
should I reprot it as a bug in the tracker? |
|
Back to top |
|
|
Hrk Tux's lil' helper
Joined: 24 May 2003 Posts: 90 Location: Rome, Italy
|
Posted: Mon Jan 26, 2009 9:54 pm Post subject: |
|
|
Ok, here it goes. :\ (different computer, this is a workstation with a more up-to-date openrc)
Current situation:
Code: | aiace ~ # rc-status default | grep net
net.ath0 [ started ]
net.eth0 [ started ]
netmount [ started ]
aiace ~ # |
I stop the wired interface:
Code: | aiace ~ # /etc/init.d/net.eth0 stop
ntpd |* Stopping ntpd...
sshd |* Stopping sshd...
netmount |* Unmounting network filesystems... [ ok ]
distccd |* Stopping distccd... [ ok ]
net.eth0 |* Bringing down interface eth0
net.eth0 |* Stopping dhcpcd on eth0... [ ok ]
net.eth0 |* Removing addresses
|
No "provide" option has been defined since both network cards are in the default runlevel:
Code: | aiace ~ # grep provide /etc/rc.conf
#rc_provide="!net"
# This is mainly used for saying which servies do NOT provide net.
#rc_net_tap0_provide="!net"
|
ath0 is up and working:
Code: | aiace ~ # ifconfig ath0 | grep inet
inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0
aiace ~ # ping forums.gentoo.org
PING forums.gentoo.org (140.211.166.170) 56(84) bytes of data.
64 bytes from dove.gentoo.osuosl.org (140.211.166.170): icmp_seq=1 ttl=44 time=401 ms
64 bytes from dove.gentoo.osuosl.org (140.211.166.170): icmp_seq=2 ttl=44 time=263 ms
|
Sadly (or "as expected"?) if I start eth0, the services don't go up.
Code: | aiace ~ # /etc/init.d/net.eth0 start
net.eth0 |* Bringing up interface eth0
net.eth0 |* dhcp...
net.eth0 |* Running dhcpcd...
net.eth0 |eth0: dhcpcd 4.0.7 starting
net.eth0 |eth0: broadcasting for a lease
net.eth0 |eth0: offered 192.168.0.3 from 192.168.0.2
net.eth0 |eth0: checking 192.168.0.3 is available on attached networks
net.eth0 |eth0: acknowledged 192.168.0.3 from 192.168.0.2
net.eth0 |eth0: leased 192.168.0.3 for 43200 seconds [ ok ]
net.eth0 |* received address 192.168.0.3/24 [ ok ]
|
Ok, based on this output, should I write a bug report? |
|
Back to top |
|
|
Hrk Tux's lil' helper
Joined: 24 May 2003 Posts: 90 Location: Rome, Italy
|
Posted: Thu Feb 05, 2009 10:05 pm Post subject: |
|
|
Ok, solved.
The behaviour depends on the value of the variable "rc_depend_strict" in /etc/rc.conf (I am using openrc-4.2). Setting it to "NO" provides the behaviour I was wishing for. |
|
Back to top |
|
|
|