[openFATE 300763] Warn about services using old libraries
Feature changed by: Ján Kupec (jkupec) Feature #300763, revision 65 Title: Warn about services using old libraries openSUSE-10.2: Rejected by Edith Parzefall (emapedl) reject date: 2006-10-02 16:05:01 reject reason: Not enough time for 10.2, rejecting with TPM approval. Priority Requester: Desirable Projectmanager: Desirable openSUSE-10.3: Rejected by Stanislav Visnovsky (visnov) reject date: 2007-07-31 12:35:05 reject reason: Postponing. Priority Requester: Important Projectmanager: Important openSUSE-11.0: Rejected by Stanislav Visnovsky (visnov) reject date: 2007-11-21 12:16:55 reject reason: Out of scope for 11.0 Priority Requester: Important openSUSE-11.1: Rejected by Federico Lucifredi (flucifredi) reject date: 2008-08-01 18:25:29 reject reason: Cutting scope to match project schedule. Priority Requester: Important openSUSE-11.2: Done Priority Requester: Important Projectmanager: Important Requested by: Martin Vidner (mvidner) Description: Fou4s has a useful feature: after installing updates, it runs "lsof | grep RPMDELETE" to see processes that are accessing the old libraries and recommends to restart them. Our update stack should do this as well, and notify users of processes that need to be restarted. I see this as both a zypper feature and a PK-UI pop-up. Documentation Impact: Software management documentaiton needs to be updated. Discussion: #7: Sherry Arnold (sfarnold) (2007-07-31 22:06:27) (reply to #4) The Debian outdated-libraries script that runs at package update time (perhaps only for libc?) only shows program names to the admin at the end. #5: Stanislav Visnovsky (visnov) (2006-09-06 10:57:53) Edith, Jiri, feel free to postpone this for 10.3 if out of resources. #6: Edith Parzefall (emapedl) (2007-07-31 11:49:06) Sorry, we had no time to look into this. Please reject for 10.3. #8: Federico Lucifredi (flucifredi) (2008-06-12 20:52:41) I like this. Stano, Klaus, please sanity-check. #9: Jiri Srain (jsrain) (2008-07-07 09:03:59) Jiri, please, add the check into YaST online update (I must admit that the suggested command didn't work for me, thus some investigation may be needed). Duncan, please, assign the applets. #10: Jiří Suchomel (jsuchome) (2008-07-14 15:55:27) Uhm, what should be the output of "lsof | grep RPMDELETE" and what should actually YaST do with the result? Or, if we use the command from comment 4: what should YaST do with these results? #11: Martin Vidner (mvidner) (2008-07-16 09:52:28) When packages are updated, the effect of the update may not be yet realized because the system is still using the old files (they are unlinked but still in use). A well known case is the kernel which needs a reboot (or kexec or ksplice...). For the apps, we can ask (in zypp app layer?) about all open files which are already unlinked. Then we can say "Updates will not take effect until these processes are restarted: sshd (pid 42), apache2 (pid 31337). If you are unsure, rebooting will do the job.". There can be a Details button or a reference to "zypper checkdeleted" (TODO) to show the gory details. It seems that RPMDELETE no longer works, but there is a simple fix (http://archives.neohapsis.com/archives/linux/suse/2006-q1/0034.html) for that. This thread (http://lists.opensuse.org/opensuse/2002-09/msg00532.html) shows how fou4s presents the info. Marcus has good points in comment 4 but we can address them when we have a prototype working. #12: Jiří Suchomel (jsuchome) (2008-07-16 10:04:16) (reply to #11) IMHO such check belongs to zypp, YaST/zypper/applets should show the results. Duncan, is it possible to assign this to someone from the zypp team? #13: Duncan Mac-Vicar (dmacvicar) (2008-07-30 17:09:22) (reply to #12) yes, will be done as part of the commit refactoring. #21: Duncan Mac-Vicar (dmacvicar) (2009-06-02 14:52:10) This will be implemented as a chain in the commit refactoring, by calling a external binary that will look in /proc for binaries with deleted libraries opened. The RPMDELETE stuff does not work in reality like it is described. Also may be good to create a good set of callbacks so libzypp can present a summary of services to restart and also config files that were modified. #22: Michael Andres (mlandres) (2009-08-07 11:02:30) libzypp-6.13.1 provides class CheckAccessDeleted and an example command zypp-CheckAccessDeleted to check for running processes which access meanwhile deleted files or libraries. This class may be used after commit, trying to figure out which services need to be restated. tools/zypp-CheckAccessDeleted.cc shows how to use the class, it's pretty easy. $ zypp-CheckAccessDeleted PID PPID UID LOGIN COMMAND SERVICE FILES 1900 1 216 ma wish - /lib/libexpat.so.1 3844 1 0 root fetchmail fetchmail /var/run/nscd/dbOioVty ... It's currently not integrated into the commit workflow, because it is a standalone usable fetaure. For the application it's probably far easier to use CheckAccessDeleted directly, than trying to communicate via a callback. At least unless we want to strip down the functionality to siply return a list of service names from commit, without further context. For this I can offer an option to commit, that simply returns a list of service names. #23: Ján Kupec (jkupec) (2009-08-07 12:04:52) OK, i'll do this check in zypper after each commit and advise users to restart the services. #24: Ján Kupec (jkupec) (2009-08-07 14:57:04) Hm... after an upgrade of zlib one gets quite a number of hits :O) The filelist can also be huge (is this the list of all files used by the process?). I guess showing an abbreviated (or at least terse) list of processes would be appropriate, with a hint how to view the complete list with all of the affected files. What about a separate command, or write the complete list to a file in ~/.zypp and tell the user to view this file? #27: Michael Andres (mlandres) (2009-08-26 12:03:33) (reply to #24) * I'm going to fix the filelist containing duplicate entries. * The default search looks for deleted open or memory mapped files. I can add an option to focus on detecting libs only. This will reduce the number of processes found. * We should keep in mind that this search might be a long running operation, and as it has to stat a lot of files, it may even block. IMO we should not call it automatically after each commit. And we should not store this volatile information in some file. Maybe we should just ask/encourage the user to call (/usr/bin/)zypp- CheckAccessDeleted, or offer this check as a separate command in zypper (zypper CheckAccessDeleted). #29: Michael Andres (mlandres) (2009-08-26 16:01:56) (reply to #27) libzypp-6.13.2 provides no more duplicates and tries harder to report libs and executables only. #30: Ján Kupec (jkupec) (2009-09-03 19:52:36) (reply to #29) Works nicely now. I also changed zypper to show the list only if there were packages to upgrade/downgrade or remove in the summary. It's in git; will be in zypper 1.2.4. The only thing that might be improved is that the processes are shown after each commit from the moment the file has been deleted until the process gets restarted or destroyed. So, if you e.g. do a zlib upgrade, you'll get a big table each time you do zypper up or zypper rm until you restart the machine (or all the processes). This could be annoying... do we want to try to improve it? #26: Duncan Mac-Vicar (dmacvicar) (2009-08-21 18:40:40) This requires to use 11.2 libzypp on SP1. Backport is basically adding all the 11.2 refactorings to the 11.1/SLE11 code. #28: Michael Andres (mlandres) (2009-08-26 12:15:16) (reply to #26) No, you can backport just the new class CheckAccessDeleted. It requires just 'lsof' being installed. #31: Ján Kupec (jkupec) (2009-09-21 10:41:31) 'zypper ps' added to show the list. The check will still be done after each upgrade/removal/downgrade, but only notification will be shown, suggeting to use 'zypper ps' to see the list. Marking 'done' for 11.2. #32: Stefan Behlert (sbehlert) (2009-11-18 12:40:14) (reply to #31) Any update on this? Keep in mind that feature freeze is this Friday. + #33: Ján Kupec (jkupec) (2009-11-18 15:30:03) (reply to #32) + We're putting 11.2 packages to SP1, so this feature comes there for + free. Closing as done. -- openSUSE Feature: https://features.opensuse.org/300763
participants (1)
-
fate_noreply@suse.de