[Bug 736083] New: scpm doesn't properly switch services
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c0 Summary: scpm doesn't properly switch services Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dutchkind@txoriaskea.org QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0 On my desktop computer I have the traditional ifup method for my network. I use scpm to easily switch on and off apache, but also to change my ip-address to one that has an open port via my router for ssh. This way I can login from outside when there is a problem. Now with scpm in opensuse 12.1 some services are not restarted, as used to be. SO the network is not restarted and thus the new ip-address doesn't take effect. I found that on my laptop, where I use scpm to switch firewall, ssh and printer profiles, that cups is also not restarted, which means my home printers remain active even though I changed to travel profile. Is there a way to fix this new behavior? Or a way to force reloads of services? Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c zj jia <zjjia@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zjjia@suse.com AssignedTo|bnc-team-screening@forge.pr |hschaa@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c3 Jan Engelhardt <jengelh@medozas.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED CC| |jengelh@medozas.de Resolution|NORESPONSE | AssignedTo|bnc-team-screening@forge.pr |pan@iba-group.com |ovo.novell.com | --- Comment #3 from Jan Engelhardt <jengelh@medozas.de> 2012-03-15 14:35:50 UTC --- (Revert bogus close.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c4 --- Comment #4 from David Kerkhof <dutchkind@txoriaskea.org> 2012-03-15 16:13:50 UTC --- I was wondering, never got any feedback on this, and then a bug closed message! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c5 Philippe Andersson <pan@iba-group.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO InfoProvider| |dutchkind@txoriaskea.org --- Comment #5 from Philippe Andersson <pan@iba-group.com> 2012-03-15 17:20:26 UTC --- David, Could you please provide more information about your problem, such as: - since you mention running 12.1, do you use the new "systemd" (default choice if new install) or the old SysV init scripts ? - which services did you expect would be restarted but aren't ? - can you switch to one of your profiles where services are missing, but do so in text mode, with debug enabled, capturing the output of the following command: # scpm -d switch -r <profile> - then extract the relevant entries from /var/log/scpm (based on the timestamp, for instance, take all entries that refer to the switch opeation you performed with the previous command). Could you then attach both files (output of "scpm switch" and log) to this bug ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c6 --- Comment #6 from David Kerkhof <dutchkind@txoriaskea.org> 2012-03-20 16:12:14 UTC --- Created an attachment (id=482197) --> (http://bugzilla.novell.com/attachment.cgi?id=482197) scpm-desktop.txt -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c7 --- Comment #7 from David Kerkhof <dutchkind@txoriaskea.org> 2012-03-20 16:12:58 UTC --- Created an attachment (id=482198) --> (http://bugzilla.novell.com/attachment.cgi?id=482198) scpm-laptop.txt -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c8 David Kerkhof <dutchkind@txoriaskea.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |REOPENED InfoProvider|dutchkind@txoriaskea.org | --- Comment #8 from David Kerkhof <dutchkind@txoriaskea.org> 2012-03-20 16:13:45 UTC --- To start answering questions, - I use systemd - services that don't restart but should are: cups and network (maybe more) I will explain their use in my case: On my laptop I need to switch among things cups. At home I have networked printers. For my work I am away from home a lot, and when I want to print to pdf for example, it takes a long time because the system is looking for a network printer that is not there before it opens the print dialog. To solve this I made the system switch scpm profile automatically depending on the network, and when away all printers are removed, ssh stopped and firewall ssh port closed. As an ugly workaround I made a intermediate profile with cups disabled after which the external profile is started so cups is forced to restart in a way. On my desktop I have ssh only allowed from my laptop ip, and my router is set to open ssh to one ip only that is not in use in my network. Whenever there is a problem that I need to fix, all my wife has to do is switch to maintenance profile so the network gets this ip address and the firewall is opened for ssh to other ip addresses and I can enter and fix whatever needs fixing. To make this work the network needs to be restarted, but with systemd it is not, resulting in my desktop having 2 ip addresses at the same time and no access. Here same workaround as mentioned before works. - Here when I switch my laptop directly to the home profile from external: /usr/sbin/scpm -d switch -r Home Checking for modified resources Saving resources Checking for resources to start or shut down service mysql must be stopped service nxsensor must be stopped service sshd must be started service SuSEfirewall2 must be started Checking for dependencies Switching to profile Home stopping mysql (service) [ok] stopping nxsensor (service) [ok] restoring /etc/sysconfig/SuSEfirewall2 (file) restoring /etc/ssh/sshd_config (file) restoring /etc/cups/printers.conf (file) restoring mysql (service) restoring nxsensor (service) restoring sshd (service) restoring SuSEfirewall2 (service) [failed] starting SuSEfirewall2 (service) [ok] starting sshd (service) [ok] - And here my desktop (NOTE there was a problem with the firewall switching on the desktop, that is solved now and is not what was not working) /usr/sbin/scpm -d switch -r maint Checking for modified resources file /etc/sysconfig/network/dhcp is modified Saving resources saving /etc/sysconfig/network/dhcp (file) to profile default Checking for resources to start or shut down service SuSEfirewall2_setup must be started Checking for dependencies service SuSEfirewall2_init must be restarted service network must be restarted service sshd must be restarted Switching to profile maint stopping sshd (service) [ok] stopping network (service) [ok] stopping SuSEfirewall2_init (service) [ok] restoring /etc/hosts (file) restoring /etc/ssh/sshd_config (file) restoring /etc/sysconfig/SuSEfirewall2 (file) restoring /etc/sysconfig/network (file) restoring /etc/sysconfig/network/dhcp (file) restoring /etc/sysconfig/network/ifcfg-br0 (file) restoring SuSEfirewall2_setup (service) starting SuSEfirewall2_init (service) [ok] starting network (service) [ok] starting sshd (service) [ok] starting SuSEfirewall2_setup (service) ^C[ok] I have included 2 attachments with the log Regards, david -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c9 --- Comment #9 from Philippe Andersson <pan@iba-group.com> 2012-03-21 15:22:44 UTC --- I have a test 12.1 machine at home. I'll try to replicate your problem. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c10 --- Comment #10 from Philippe Andersson <pan@iba-group.com> 2012-04-10 10:58:24 UTC --- Quick status update: ==================== I tried to reproduce the problem over the week-end, and here are my findings so far. Methodology: ------------ - installed and enabled scpm - created 2 separate profiles with (different) fixed IP addresses - one of them has CUPS enabled, the other one has it disabled. Findings: --------- - I've also seen the problem of 2 IP addresses being assigned to the same card (as primary and secondary IP addresses) as described in comment #8 above. But at this stage I don't think that this problem comes from scpm as such, as this problem first manifested itself after reconfiguring the interface through YaST, right after switching to a new profile. I also see it when switching profiles. The nework configuration files seem OK, though, so doing an ifdown/ifup cycle brings the network connection to the expected state. - the issue with CUPS refusing to turn on or off when switching profile, I've not been able to reproduce. "scpm save" after disabling cups in one of the profiles does take the change into consideration, and the service then stops and starts as expected when switching profiles. I'll dig deeper into the double IP address issue, and try a few more things with SCPM. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c11 --- Comment #11 from David Kerkhof <dutchkind@txoriaskea.org> 2012-04-10 14:50:15 UTC --- About your findings: The idea that ifdown/ifup cycle fixes the network card issue defeats the purpose of scpm. As I wrote, that one is so my wife, who doesn't know the root password, can switch to the maintenance profile so the ip address is changed so I can log in to help fix an issue. She can not run ifdown/ifup as user. The other issue about cups is also a bit different. In my home profile I have cups enabled and some printers installed, in my away profiles I have cups also enabled, but no printers installed. Since both have cups enabled it is not restarted, which is exactly the problem. I know, I can restart cups, no problem, but scpm is there to do this quickly without needing a root password, all tasks done by scpm can be done by anyone having root access, but it's the convenience of switching everything you need to switch in one go, and in my laptop's case even automatically. These things like cups restart en the ip address issue did work before, I use it this way already a number of years. But it is not directly scpm but a systemd issue which is in this case a little too smart and doesn't see the need to restart a running service. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c12 --- Comment #12 from Philippe Andersson <pan@iba-group.com> 2012-04-10 15:18:29 UTC --- (In reply to comment #11)
As I said, there are other avenues I would like to explore before drawing any conclusion. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=736083 https://bugzilla.novell.com/show_bug.cgi?id=736083#c13 --- Comment #13 from Philippe Andersson <pan@iba-group.com> 2012-05-01 18:38:22 UTC --- Further status update (in reply to comment #11) At David's suggestion, I tested the scenario where CUPS service is active in both profiles, but one of them has no printers defined. In this case as well, the modification of the configuration files was correctly detected and saved, and the switch happened as expected. What I did notice as I re-configured CUPS in one of the profiles to remove the printers definition (it was a client-only configuration), was a message from YaST that existing printer advertisements might take up to 5 minutes to disappear. And indeed, when switching from from the profile "with printers" to the one without, the existing printer definitions remained visible to "lpstat -t" but eventually vanished. Due to this behaviour (and for the sake of economy), I would recommend disabling CUPS altogether in one of the profiles, instead of keeping it running but unused. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com