[Bug 518219] New: sm-notify runs before dhcpcd sets hostname
http://bugzilla.novell.com/show_bug.cgi?id=518219 Summary: sm-notify runs before dhcpcd sets hostname Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: i586 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: zuziak@math.ku.dk QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.11) Gecko/2009060200 SUSE/3.0.11-0.1.1 Firefox/3.0.11 Sometimes sm-notify is run before the dhcp client has set the correct hostname. This means that the notify messages sent to nfs servers contain the wrong hostname so any locks held by the client are not released. This seems to happen on about every other boot when parallel execution of init scripts is disabled. Reproducible: Sometimes -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=518219
User meissner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c1
Marcus Meissner
http://bugzilla.novell.com/show_bug.cgi?id=518219
User zuziak@math.ku.dk added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c2
--- Comment #2 from Martin Zuziak
http://bugzilla.novell.com/show_bug.cgi?id=518219
User nfbrown@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c3
Neil Brown
http://bugzilla.novell.com/show_bug.cgi?id=518219
User mt@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c4
Marius Tomaschewski
http://bugzilla.novell.com/show_bug.cgi?id=518219
User mt@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c5
Marius Tomaschewski
http://bugzilla.novell.com/show_bug.cgi?id=518219
User mt@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c6
--- Comment #6 from Marius Tomaschewski
http://bugzilla.novell.com/show_bug.cgi?id=518219
User nfbrown@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c7
--- Comment #7 from Neil Brown
http://bugzilla.novell.com/show_bug.cgi?id=518219
User zuziak@math.ku.dk added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c8
--- Comment #8 from Martin Zuziak
http://bugzilla.novell.com/show_bug.cgi?id=518219
User zuziak@math.ku.dk added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c9
--- Comment #9 from Martin Zuziak
http://bugzilla.novell.com/show_bug.cgi?id=518219
User zuziak@math.ku.dk added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c10
--- Comment #10 from Martin Zuziak
http://bugzilla.novell.com/show_bug.cgi?id=518219
User zuziak@math.ku.dk added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c11
--- Comment #11 from Martin Zuziak
http://bugzilla.novell.com/show_bug.cgi?id=518219
User zuziak@math.ku.dk added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c12
Martin Zuziak
From the log: I've inserted a loop in the nfs init script just before sm-notify runs. It logs the current hostname and sleeps for 1 second until the hostname is correct.
Jul 10 13:25:13 linux ifup: eth0 device: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10) Jul 10 13:25:15 linux logger: nfs: hostname is linux Jul 10 13:25:15 linux SuSEfirewall2: SuSEfirewall2 not active Jul 10 13:25:15 linux dhcpcd[2501]: eth0: setting hostname to `pc000c292d9978.math.ku.dk' Jul 10 13:25:15 linux dhcpcd[2501]: eth0: forking to background Jul 10 13:25:15 linux dhcpcd[3012]: eth0: waiting for 1800 seconds Jul 10 13:25:15 linux dhcpcd[2501]: eth0: exiting Jul 10 13:25:16 linux logger: nfs: hostname is pc000c292d9978.math.ku.dk Jul 10 13:25:17 linux sm-notify[3018]: sm-notify running as root. chown /var/lib/nfs/sm to choose different us er Even when I set eth0 as mandatory it doesn't show in the following output. Is that a problem? # /etc/init.d/rc5.d/S*network start -o debug fake CONFIG = INTERFACE = AVAILABLE_IFACES = eth0 PHYSICAL_IFACES = eth0 BONDING_IFACES = VLAN_IFACES = DIALUP_IFACES = TUNNEL_IFACES = BRIDGE_IFACES = SLAVE_IFACES = MANDATORY_DEVICES = VIRTUAL_IFACES = SKIP = start order : eth0 ; ; Setting up network interfaces: ifup eth0 -o rc eth0 returned 0 done .. still waiting for hotplug devices: SUCCESS_IFACES= eth0 MANDATORY_DEVICES= .. final SUCCESS_IFACES= eth0 MANDATORY_DEVICES= FAILED=0 ifup-route noiface -o rc Setting up service network . . . . . . . . -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=518219
User nfbrown@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c13
Neil Brown
http://bugzilla.novell.com/show_bug.cgi?id=518219
zhu rensheng
http://bugzilla.novell.com/show_bug.cgi?id=518219
User tambet@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c14
Tambet Ingo
http://bugzilla.novell.com/show_bug.cgi?id=518219
User meissner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c15
Marcus Meissner
http://bugzilla.novell.com/show_bug.cgi?id=518219
User mt@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=518219#c16
Marius Tomaschewski
eth0 isn't set up as mandatory in /etc/sysconfig/network/config. I've tried doing that but it didn't help. I guess it should be mandatory automatically as a physical interface with STARTMODE='auto'.
Yes. When MANDATORY_DEVICES in network/config is not set, physical interfaces are added to the set. The documentation of MANDATORY_DEVICES variable does not have the "boot" option (set automatically when started via init). Without it, there are no mandatory devices -- waiting at boot isn't executed. Further, the network script runs twice with: localfs and remotefs filter. Please use instead: rcnetwork start -o boot debug fake localfs It should look like this (OK, this is more complex setup): # rcnetwork start -o boot debug fake localfs * Modifications by localfs filter: PHYSICAL_IFACES => eth0 eth1 eth2 + = eth0 eth1 eth2 NOT_PHYSICAL_IFACES => br0 br1 + = br0 br1 MANDATORY_DEVICES => eth0 eth1 + = eth0 eth1 MANDATORY_SLAVES => + = VIRTUAL_IFACES => br0 br1 + = br0 br1 CONFIG = INTERFACE = AVAILABLE_IFACES = br0 br1 eth0 eth1 eth2 PHYSICAL_IFACES = eth0 eth1 eth2 BONDING_IFACES = VLAN_IFACES = DIALUP_IFACES = TUNNEL_IFACES = BRIDGE_IFACES = br0 br1 SLAVE_IFACES = eth0 eth1 MANDATORY_DEVICES = eth0 eth1 __NSC__ VIRTUAL_IFACES = br0 br1 SKIP = start order : eth0 eth1 eth2 ; eth0 eth1 __NSC__ ; br0 br1 Setting up (localfs) network interfaces: ifup lo -o rc onboot lo returned 0 done ifup eth0 -o rc onboot eth0 returned 0 done ifup eth1 -o rc onboot eth1 returned 0 done ifup eth2 -o rc onboot eth2 returned 0 done .. still waiting for hotplug devices: SUCCESS_IFACES= lo eth0 eth1 eth2 MANDATORY_DEVICES=eth0 eth1 __NSC__ .. final SUCCESS_IFACES= lo eth0 eth1 eth2 MANDATORY_DEVICES= FAILED=0 ifup br0 -o rc onboot br0 returned 0 done ifup br1 -o rc onboot br1 returned 0 done ifup-route noiface -o rc onboot Setting up service (localfs) network . . . . . . . . . . done
Anyway, there's only a single ethernet adapter, it has no exotic configuration. I've attached boot.msg and config, dhcp and ifcfg-eth0 from /etc/sysconfig/network.
Yes, I don't see anything special in your configs. I guess I know where the problem is: ifup-dhcp does not know when exactly the dhcp client sets the hostname. It may return OK to the network script too early. I've to take a closer look how to fix this (synchonize them)... -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=518219#c17
--- Comment #17 from Marius Tomaschewski
http://bugzilla.novell.com/show_bug.cgi?id=518219
http://bugzilla.novell.com/show_bug.cgi?id=518219#c20
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=518219
http://bugzilla.novell.com/show_bug.cgi?id=518219#c21
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=518219
http://bugzilla.novell.com/show_bug.cgi?id=518219#c22
Marius Tomaschewski
http://bugzilla.novell.com/show_bug.cgi?id=518219
http://bugzilla.novell.com/show_bug.cgi?id=518219#c23
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=518219
http://bugzilla.novell.com/show_bug.cgi?id=518219#c24
--- Comment #24 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com