[Bug 603291] New: To prevent issues with leases timing out, the network should be shut down when suspending
http://bugzilla.novell.com/show_bug.cgi?id=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c0 Summary: To prevent issues with leases timing out, the network should be shut down when suspending Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dieter.jurzitza@t-online.de QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=360055) --> (http://bugzilla.novell.com/attachment.cgi?id=360055) fix that should go into /usr/lib/pm-utils/sleep.d User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.3) Gecko/20100401 SUSE/3.6.3-1.1 Firefox/3.6.3 If you use the traditional way of managing your network, the network is not shut down when doing a suspend / resume. This is not an issue if you have fixed IP-Adresses or if you have DHCP with infinite lease times. However, given you have finite lease times and you shut down your pc during the night, you will run into issues in the morning. The dhcpd does not perform a new request when restarted but assumes the old IP to be valid. This may cause all kind of issues in a company network. The DHCP-server assumes the IP to be free, however, your computer thinks it is still valid. Therefore the network should be shut down prior to suspend. Reproducible: Always Steps to Reproduce: 1. run your pc in a dhcp-network with finite lease times, 2. suspend longer than the lease time 3. reboot and watch what happens Actual Results: machine is using invalid IP address Expected Results: dhcpd should request a new address after resume This files fixes the behaviour as it stops network prior to suspend and restarts it after a resume -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c yang xiaoyu <xyyang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xyyang@novell.com AssignedTo|bnc-team-screening@forge.pr |mt@novell.com |ovo.novell.com | -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|mt@novell.com |mvyskocil@novell.com -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c1 Michal Vyskocil <mvyskocil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Status|NEW |NEEDINFO InfoProvider| |mt@novell.com --- Comment #1 from Michal Vyskocil <mvyskocil@novell.com> 2010-05-07 08:53:28 UTC --- Well, in a first case the hook should leave a network in the same state, so if it has been stopped, it should be stopped after resume. Marius: what do you think about? Is the /etc/init.d/try-restart called from resume enough? -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c2 --- Comment #2 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2010-05-07 14:51:25 UTC --- Created an attachment (id=360513) --> (http://bugzilla.novell.com/attachment.cgi?id=360513) Improved script, detects whether or not the network is running. I modified the script so it detects whether the network is running or not. This is important as the network should not be started if it is down. -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c Dieter Jurzitza <dieter.jurzitza@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|mt@novell.com | -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c3 Michal Vyskocil <mvyskocil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |mt@novell.com Target Milestone|--- |Future 11.3 --- Comment #3 from Michal Vyskocil <mvyskocil@novell.com> 2010-05-10 11:25:00 UTC --- Dieter: thanks for your work, but it duplicate an existing functionality of pm-utils (pm/functions [1] contains functions for store and restore state between suspend/resume). I propose to add a following hook - this checks if nm is not running, otherwise it ends as Not applicable, because there's already 55NetworkManager hook for it. And I'm also not convinced it is necessary call rcnetwork stop on suspend, because assigned ip adresses will expire after some time. The try-restart will restart the network only if if has been already started. $ cat 50network #!/bin/sh # Resume network after sleep "${PM_FUNCTIONS}" # Sanity checks [ -x /etc/init.d/network ] || exit $NA [ -r /etc/sysconfig/network/config ] && . /etc/sysconfig/network/config [ -r /etc/sysconfig/network/scripts/functions ] && . /etc/sysconfig/network/scripts/functions # NetworkManager is handled by 55NetworkManager, so skip this script if # nm is enabled in sysconfig [ x"${NETWORKMANAGER}" -eq x"yes" ] && exit $NA # or is running command_exists nm_running && nm_running && exit $NA case "$1" in hibernate|suspend) exit 0 ;; thaw|resume) service network try-restart ;; *) exit $NA ;; esac Marius: do you have some comment? [1] http://cgit.freedesktop.org/pm-utils/tree/pm/functions.in -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c4 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW CC| |mt@novell.com InfoProvider|mt@novell.com | --- Comment #4 from Marius Tomaschewski <mt@novell.com> 2010-05-10 12:18:36 UTC --- Yes, we can try it with try-restart. But may be we need it harder, that is just check like this: netcontrol_running && network restart It just tests if the network has been started, not if also all mandatory interfaces are up, routes set, ... as status does. Question is, if it is correct to use status in try-restart... -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c5 --- Comment #5 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2010-05-10 17:58:10 UTC --- Hi Marius, hi Michal, I am not so familiar with pm-utils, so my scriptlett is somewhat "handwoven", any better solution is highly appreciated as long as this issue is adressed :-) Thank you for looking into this, take care Dieter Jurzitza -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c6 Michal Vyskocil <mvyskocil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #6 from Michal Vyskocil <mvyskocil@novell.com> 2010-05-11 14:11:23 UTC --- (In reply to comment #4)
Yes, we can try it with try-restart.
But may be we need it harder, that is just check like this:
netcontrol_running && network restart
It just tests if the network has been started, not if also all mandatory interfaces are up, routes set, ... as status does.
Question is, if it is correct to use status in try-restart...
Well, I don't have an idea what needs to be done. From my perspective we should implement some functionality will be able to save current status and restore it on resume. I don't think we need to change the existing command - some functions in /etc/sysconfig/network/scripts/functions would be enough. I'll read what status exactly does and try to propose something. -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c7 Michal Vyskocil <mvyskocil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |mt@novell.com --- Comment #7 from Michal Vyskocil <mvyskocil@novell.com> 2010-05-18 09:40:36 UTC --- Well, so my thinking is - there's no need to touch anything else than DHCP powered sevices, as already requested. This is a next version of the hook - it works only for DHCP interfaces - it's like stop-all-dhcp-clients and restart-all-dhcp-clients. There should be also a config option allowing user to skip this hook. Marius: do you think it's OK, or it might be improved? $ cat 50network #!/bin/sh # Prevent lease timing out for networks controlled by ifup/ifdown "${PM_FUNCTIONS}" # Sanity checks [ -x /etc/init.d/network ] || exit $NA [ -r /etc/sysconfig/network/config ] && . /etc/sysconfig/network/config [ -r /etc/sysconfig/network/scripts/functions ] && . /etc/sysconfig/network/scripts/functions # NetworkManager is handled by 55NetworkManager, so skip this script if # nm is enabled in sysconfig [ x"${NETWORKMANAGER}" -eq x"yes" ] && exit $NA # or is running command_exists nm_running && nm_running && exit $NA case "$1" in hibernate|suspend) command_exists dhcp_clients && save_state "dhcp_clients" "`dhcp_clients`" service network stop-all-dhcp-clients ;; thaw|resume) for interface in `restore_state "dhcp_clients"`; do service network restart ${interface} done ;; *) exit $NA ;; esac -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c8 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED CC| |vbotka@novell.com InfoProvider|mt@novell.com | --- Comment #8 from Marius Tomaschewski <mt@novell.com> 2010-05-25 08:40:54 UTC --- Yes, thanks! It looks fine AFAIS. Submit it, we have to test it. There may be some - hardware/driver related - issues with wireless. There are (many?) cases, where the driver does not support the power management capabilities of the hw or the hw does not behave well. Added Vladimir to Cc. -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c9 Michal Vyskocil <mvyskocil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #9 from Michal Vyskocil <mvyskocil@novell.com> 2010-06-14 13:34:42 UTC --- fixed by http://gitorious.org/opensuse/pm-utils-suse/commit/4508ff6d47dc3da36df830915... submitted by sr 41442 -- 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=603291 http://bugzilla.novell.com/show_bug.cgi?id=603291#c10 --- Comment #10 from Bernhard Wiedemann <bwiedemann@suse.com> --- This is an autogenerated message for OBS integration: This bug (603291) was mentioned in https://build.opensuse.org/request/show/41442 Factory / pm-utils -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com