Summary: | >=sys-apps/openrc-0.9.9 default route fails on network boot | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Matthew Schultz <mattsch> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | pinkbyte |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
rc-0.9.8.4.log
rc-0.10.5.log |
Description
Matthew Schultz
2012-07-07 05:29:06 UTC
Please attach /var/log/rc.log of your system booting. Thanks, William Created attachment 317642 [details]
rc-0.9.8.4.log
rc.log using 0.9.8.4
Created attachment 317644 [details]
rc-0.10.5.log
rc.log using 0.10.5
rc-update show acpid | default alsasound | boot consolefont | boot cpufrequtils | default dbus | default devfs | sysinit dmesg | sysinit hostname | boot keymaps | boot killprocs | shutdown local | default nonetwork mount-ro | shutdown mtab | boot ntp-client | default ntpd | default savecache | shutdown sshd | default syslog-ng | default udev | sysinit udev-postmount | default (In reply to comment #4) The first thing I notice is that you do not have any network scripts in any runlevels. You should at least have net.lo in the boot runlevel. (In reply to comment #5) > (In reply to comment #4) > > The first thing I notice is that you do not have any network scripts in any > runlevels. > > You should at least have net.lo in the boot runlevel. Once again this is a network booting machine using nfs as root with the filesystem residing on another machine. The eth0 interface is already up since it has to be to be able to boot off the network. Enabling it fails anyway on 0.10.5 since I already tried that when I upgraded openrc. The lo interface already comes up automatically so it's not needed either. Again this set up works fine under openrc-0.9.8.4 but not under later versions. (In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > > The first thing I notice is that you do not have any network scripts in any > > runlevels. > > > > You should at least have net.lo in the boot runlevel. > > Once again this is a network booting machine using nfs as root with the > filesystem residing on another machine. The eth0 interface is already up > since it has to be to be able to boot off the network. Enabling it fails > anyway on 0.10.5 since I already tried that when I upgraded openrc. The lo > interface already comes up automatically so it's not needed either. Again > this set up works fine under openrc-0.9.8.4 but not under later versions. Also note this in the rc.log: * root filesystem is network mounted -- can't stop lo * ERROR: net.lo failed to stop This doesn't affect anything but it would be nice if openrc didn't attempt to stop lo since it can't stop it anyway due to the root filesystem being network mounted. This is one of the reasons why I don't have net.lo set to start/stop, since openrc doesn't have the ability to control that in this scenario and yet it tries to stop it anyway. Hi, Matthew. Thanks a lot for reporting the bug. The cause is that netmount needs "net", # /etc/init.d/netmount ineed ... net.wlan0... (this is my box, in yours it should be "network" instead of "net.wlan0") which is provided by "network" in your box. # /etc/init.d/network iprovide net And you want to tell OpenRC "hey you should not try to set up network for me, it is already there!" One way to do that is to put rc_provide="net" rc_depend_strict="NO" # this defaults to NO already into /etc/rc.conf, you can read the comments around rc.conf to get the idea. Have a try. I hope this can provide a solution. (In reply to comment #8) > Hi, Matthew. Thanks a lot for reporting the bug. > > The cause is that netmount needs "net", > > # /etc/init.d/netmount ineed > ... net.wlan0... > > (this is my box, in yours it should be "network" instead of "net.wlan0") > > which is provided by "network" in your box. > > # /etc/init.d/network iprovide > net This will be fixed in openrc-0.11 when we only install network if you have the "newnet" use flag turned on. > And you want to tell OpenRC "hey you should not try to set up network for > me, it is already there!" One way to do that is to put > > rc_provide="net" Actually, this is the line that would go in /etc/conf.d/network: rc_provide="!net" Then, for every service that fails because net doesn't start, you must add the following line to /etc/conf.d/<service>: rc_need="!net" (In reply to comment #9) > (In reply to comment #8) > > Hi, Matthew. Thanks a lot for reporting the bug. > > > > The cause is that netmount needs "net", > > > > # /etc/init.d/netmount ineed > > ... net.wlan0... > > > > (this is my box, in yours it should be "network" instead of "net.wlan0") > > > > which is provided by "network" in your box. > > > > # /etc/init.d/network iprovide > > net > > This will be fixed in openrc-0.11 when we only install network if you have > the "newnet" use flag turned on. > > > And you want to tell OpenRC "hey you should not try to set up network for > > me, it is already there!" One way to do that is to put > > > > rc_provide="net" > > Actually, this is the line that would go in /etc/conf.d/network: > > rc_provide="!net" > > Then, for every service that fails because net doesn't start, you must add > the following line to /etc/conf.d/<service>: > > rc_need="!net" (In reply to comment #9) > (In reply to comment #8) > > Hi, Matthew. Thanks a lot for reporting the bug. > > > > The cause is that netmount needs "net", > > > > # /etc/init.d/netmount ineed > > ... net.wlan0... > > > > (this is my box, in yours it should be "network" instead of "net.wlan0") > > > > which is provided by "network" in your box. > > > > # /etc/init.d/network iprovide > > net > > This will be fixed in openrc-0.11 when we only install network if you have > the "newnet" use flag turned on. > > > And you want to tell OpenRC "hey you should not try to set up network for > > me, it is already there!" One way to do that is to put > > > > rc_provide="net" > > Actually, this is the line that would go in /etc/conf.d/network: > > rc_provide="!net" > > Then, for every service that fails because net doesn't start, you must add > the following line to /etc/conf.d/<service>: > > rc_need="!net" I upgraded to 0.10.5 again by specifying this in /etc/init.d/network: rc_provide="!net" That worked. So I guess some configuration must have changed in 0.9.9 that was different from 0.9.8.4. I did not need rc_need="!net" either. This works better though since it doesn't bring lo up or down: route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gimli.home 0.0.0.0 UG 0 0 0 eth0 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 To answer the other question, this is the output now that I changed to rc_provide="!net" in /etc/conf.d/network: # /etc/init.d/netmount ineed staticroute # /etc/init.d/network iprovide (blank line here) I'm not sure what staticroute is for and is probably also not necessary but since it mentions it's deprecated in the rc.log, it's probably not an issue. To answer your question about staticroute, this is the part of the newnet scripts which sets up all of the static routes. It is not deprecated; it is just not supposed to be installed unless you are using it. Since you were able to find a fix, I an closing this worksforme. If there is still an issue, please feel free to re-open. (In reply to comment #11) > To answer your question about staticroute, this is the part of the > newnet scripts which sets up all of the static routes. It is not > deprecated; it is just not supposed to be installed unless you are using > it. > If it's not deprecated, why does the rc.log say it is? (In reply to comment #12) > (In reply to comment #11) > > To answer your question about staticroute, this is the part of the > > newnet scripts which sets up all of the static routes. It is not > > deprecated; it is just not supposed to be installed unless you are using > > it. > > > > If it's not deprecated, why does the rc.log say it is? Because I was planning on removing it. However, I have since found that people do use newnet, and I have found a way to not install it if it is not being used. I believe this will be taken care of by OpenRC having a separate script to start the loopback interface. It also will not try to stop the loopback interface any longer. |