[Bug 804454] New: NSCD daemon must be reloaded after changing config file in YaST2
https://bugzilla.novell.com/show_bug.cgi?id=804454 https://bugzilla.novell.com/show_bug.cgi?id=804454#c0 Summary: NSCD daemon must be reloaded after changing config file in YaST2 Classification: openSUSE Product: openSUSE 12.3 Version: RC 1 Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: P5 - None Component: YaST2 AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: joschibrauchle@gmx.de QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.70 Safari/537.17 When installing SSSD along with NSCD, YaST correctly changes the NSCD config file /etc/nscd.conf to disable caching if passwd & group entries, as this would interfere with SSSD (see bnc#789277). Unfortunately, NSCD seems to already be running at this point in time, thus is does not respect the changed configuration file. A "rcnscd reload" or systemd equivalent is needed to make NSCD aware of this change. See attached screenshot. Otherwise, the system will not be in the correct state after finishing the installation. A reboot of course will help, as the NSCD restarts and respects the new config. Reproducible: Always Steps to Reproduce: 1. Active SSSD along with NSCD 2. check "nscd --statistics" after installation finishes Actual Results: NSCD still caches passwd and group, although configured differently in config file Expected Results: NSCD is in correct state w.r.t. config file -- 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c1
--- Comment #1 from Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c
Xiaolong Li
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c
Xiaolong Li
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c3
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c4
--- Comment #4 from Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c5
Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c6
--- Comment #6 from Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c7
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c8
Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c9
--- Comment #9 from Jiří Suchomel
Would it not be possible for ldap_auto to simply restart nscd service if it is running?
It probably could, but it would be a hack against current autoYaST way of work.
I would simply tend to say in such cases final_reboot needs to be set to true. Alternately we can determine if it is possible to prevent in some way that nscd is running at all
So should we say that final_reboot is the correct answer here? Or that nscd is to blame instead of YaST? -- 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c10
--- Comment #10 from Thomas Fehr
It probably could, but it would be a hack against current autoYaST way of work.
But this "way of work" assumed services were not running (yet), which seems not to be true any more in 12.3.
So should we say that final_reboot is the correct answer here?
As long as we do not want to either introduce hacks like nscd restart or change something fundamentally, yes.
Or that nscd is to blame instead of YaST?
If nscd would recognize when its config file changes, this would also solve the problem, but I am sure if this is capability is really promised by the 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c11
--- Comment #11 from Joschi Brauchle
It probably could, but it would be a hack against current autoYaST way of work.
But this "way of work" assumed services were not running (yet), which seems not to be true any more in 12.3.
So, this poses the question again: - why is nscd running and who starts it? - should it not be automatically restarted anyways, because it was running during installation and thus it is likely that its configuration has changed? I think this is somewhat similar to the network service, which also is started and required during installation, but later needs to be restarted to adapt to its final configuration... Are there any other service that are both required during installation and configured during installation? How is it handled there? -- 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c12
--- Comment #12 from Thomas Fehr
So, this poses the question again: - why is nscd running and who starts it? - should it not be automatically restarted anyways, because it was running during installation and thus it is likely that its configuration has changed?
I just did a test install if you enable nscd in <runlevel> section, it gets started by systemd before YaST2-Second-Stage gets started.
I think this is somewhat similar to the network service, which also is started and required during installation, but later needs to be restarted to adapt to its final configuration...
Network is the exception here. It probably would work to add "nscd.service" to the "Before" list of YaST2-Second-Stage.service but we can hardly add all existing services there. Another solution would be to add network.target to "After" section of nscd.service. I am not sure if it even makes any sense to start nscd before network is up, in pre-Systemd times it was dependent on $remote-fs and therefore indirectly on network. yast2-runlevel correctly does not start services. From the y2log: RunlevelEd.ycp:768 All services will be started at the end, skipping for now...
Are there any other service that are both required during installation and configured during installation? How is it handled there?
So far these services were expected not to be running while YaST2-Second-Stage is executed unless yast2 start scripts starts them (as an excpetion like for network). With 12.3 this is not true any more and will most probably lead to lots of subtle problems. Therefore I would urge to use final_reboot=true. -- 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c13
--- Comment #13 from Jiří Suchomel
Are there any other service that are both required during installation and configured during installation? How is it handled there?
So far these services were expected not to be running while YaST2-Second-Stage is executed unless yast2 start scripts starts them (as an excpetion like for network). With 12.3 this is not true any more and will most probably lead to lots of subtle problems. Therefore I would urge to use final_reboot=true.
Do you propose any deeper change in autoYaST logic based on current behavior? For now, I'd just close it with the offical 'use final_reboot' advice. -- 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c14
Thomas Fehr
Do you propose any deeper change in autoYaST logic based on current behavior?
I had a new idea this morning and am experimenting with it. While autoyast cannot know which services need to be restarted due to configuration changes, it could simply restart all services that are in running state. This should solve all potential problems with changed config files for services already running. No modules beside autoyast would be affected and so far I see no disadvantages (the system is not (yet) in a usable state at this time anyway), but I did not try it yet.
For now, I'd just close it with the offical 'use final_reboot' advice.
I just reassigned it to me. I hope I will have something which Joschi Brauchle could test either today or early next week. -- 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c15
--- Comment #15 from Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c16
Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c17
--- Comment #17 from Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c18
Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c19
--- Comment #19 from Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c20
--- Comment #20 from Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c21
--- Comment #21 from Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c22
Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c23
--- Comment #23 from Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c24
--- Comment #24 from Jiří Suchomel
Jiri, I think there is some call "SCR::Write(.etc.nscd_conf, nil))" in function WriteNscdCache missing, otherwise SCR seems to delay the write until end of client invocation and during the "nscd try-restart" the filesystem still has old content of /etc/nscd.conf.
That makes sense. Try attached patch. -- 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c25
--- Comment #25 from Jiří Suchomel
That makes sense. Try attached patch.
Or better package: https://build.opensuse.org/package/show?package=yast2-ldap-client&project=home%3Ajsuchome -- 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=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c26
--- Comment #26 from Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c27
Joschi Brauchle
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c28
--- Comment #28 from Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c29
--- Comment #29 from Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c30
Thomas Fehr
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c31
Andrew Daugherity
https://bugzilla.novell.com/show_bug.cgi?id=804454
https://bugzilla.novell.com/show_bug.cgi?id=804454#c32
--- Comment #32 from Thomas Fehr
participants (1)
-
bugzilla_noreply@novell.com