Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439092 (need-net) - [tracker] services misusing "need net"
Summary: [tracker] services misusing "need net"
Status: CONFIRMED
Alias: need-net
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL: https://github.com/OpenRC/openrc/blob...
Whiteboard:
Keywords: Tracker
: 268688 444260 447156 (view as bug list)
Depends on: 439652 447996 482092 514858 228973 266386 439100 439564 439568 439572 439654 439656 439658 439660 439662 439664 447630 484658 490446 514860 514872 520294 525412 530828 542162
Blocks:
  Show dependency tree
 
Reported: 2012-10-20 18:48 UTC by William Hubbs
Modified: 2020-06-15 22:24 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sshd init script (sshd,2.00 KB, text/plain)
2013-03-24 19:53 UTC, mike
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Hubbs gentoo-dev 2012-10-20 18:48:35 UTC
This is to track the service scripts which are using "need net"
unnecessarily.

Most of the time services do not really "need net", and this should be
removed.

The problem with having it is that bringing down one interface
automatically brings down the services that have "need net" in their
dependencies.
Comment 1 William Hubbs gentoo-dev 2012-10-20 19:12:25 UTC
To test your service to see if it really needs net, do the following:

- bring down *all* of your network interfaces, including loopback.
- drop the "need net" line from your init script.
- bring up your service in its default configuration.
- If it comes up successfully, try cycling network interfaces and using
  your service with different interfaces up and down. If it works, you
  are done; commit your init script without the "need net" dependency.
  - If it doesn't work, you will need to add documentation to your
	conf.d/service file explaining to users how to  tie your service to
	which ever interface they are using it on with an rc_need line.

Feel free to contact me with questions.
Comment 2 William Hubbs gentoo-dev 2012-10-31 16:52:27 UTC
Flameeyes wrote the following blog post concerning this issue:

http://blog.flameeyes.eu/2012/10/may-i-have-a-network-connection-please
Comment 3 Jeroen Roovers gentoo-dev 2012-11-23 16:14:33 UTC
*** Bug 444260 has been marked as a duplicate of this bug. ***
Comment 4 A Collector 2012-11-25 06:52:20 UTC
Please see https://bugs.gentoo.org/show_bug.cgi?id=444652 and let me know if it's related. Thanks.
Comment 5 Jeroen Roovers gentoo-dev 2012-12-14 16:26:23 UTC
*** Bug 447156 has been marked as a duplicate of this bug. ***
Comment 6 mike 2012-12-15 18:49:49 UTC
/etc/init.d/netmount is triggering NetworkManager (+dbus +....) to start without any "need net". Looks like a hidden "need net" in some dependency.
Comment 7 mike 2013-03-24 19:53:37 UTC
Created attachment 343152 [details]
sshd init script

sshd does not need "need net"
Comment 8 Alex Xu (Hello71) 2015-06-11 16:23:45 UTC
*** Bug 268688 has been marked as a duplicate of this bug. ***