[Bug 984778] New: zypper (unlike YaST) gives no reboot warning after updating the kernel
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 Bug ID: 984778 Summary: zypper (unlike YaST) gives no reboot warning after updating the kernel Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.1 Hardware: x86-64 OS: openSUSE 42.1 Status: NEW Severity: Normal Priority: P5 - None Component: libzypp Assignee: zypp-maintainers@forge.provo.novell.com Reporter: antoine.mechelynck@gmail.com QA Contact: qa-bugs@suse.de Found By: Community User Blocker: --- After updating the kernel, zypper doesn't warn the user that a reboot is necessary (YaST does). Even "zypper ps" says "No processes using deleted files found" in that case, because the "old" kernel is left lying around in /boot. (I noticed it today when "zypper up" upgraded my kernel from 4.1.24-19 to 4.1.26-21 from the Leap 42.1 Update-Test repository.) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c2 --- Comment #2 from Michael Andres <ma@suse.com> --- Unfortunately the information to 'suggest a reboot' is not tied to a 'package', but to a 'patch'. A 'patch' describes the minimal versions of a bunch of packages which need to be installed in order to fix the issue addressed by the 'patch'. "zypper patch" is the operation which evaluates the patch metadata and which is able to suggest a reboot in the summary, if patch providing this hint was applied (i.e. all mentioned packages were updated accordingly). "zypper up" however is a pure package based operation trying to update each package individually to a higher version. The final result might be similar to "zypper patch", but the approach is different and the patch hints are not available here. @ the "old" kernel is left lying around in /boot Well, it's usually a bad idea to remove the running kernel from disk. That's why obsolete kernel packages are usually removed after reboot. The definition which kernel packages too keep is found in /etc/zypp/zypp.conf (see multiversion.kernels). Default is to keep the latest 2 kernel versions (and the booted one). I'll keep this open as 'enhancement' request. maybe we can teach 'up' to sneak into the patch matadata looking for reboot hints. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c3 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low Status|RESOLVED |REOPENED Resolution|INVALID |--- Severity|Normal |Enhancement --- Comment #3 from Michael Andres <ma@suse.com> --- Keep it as enhancement request. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c4 Andreas Stieger <astieger@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEW Summary|zypper (unlike YaST) gives |add option to zypper up to |no reboot warning after |recognize |updating the kernel |reboot_needed,relogin_neede | |d,zypp_restart_needed flags | |in update info, like | |"zypper patch" --- Comment #4 from Andreas Stieger <astieger@suse.com> --- The problem here would e detecting which patch was now suddenly implicitly installed. And it is not sufficient that the patch is no longer required, as a dependency solution could switch vendors and do other stuff that installs packages from a repository other than the update repository. Also note that there are three actions to account for: https://github.com/openSUSE/open-build-service/blob/master/docs/api/api/patc... * reboot_needed * relogin_needed * zypp_restart_needed The latter also triggers an installation of the zypper patches prior to all others. All of the above would make "zypper up" all but identical to "patch". :-) I adjusted the summary to reflect the enhancement request. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c5 --- Comment #5 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- (In reply to Michael Andres from comment #2)
Unfortunately the information to 'suggest a reboot' is not tied to a 'package', but to a 'patch'. A 'patch' describes the minimal versions of a bunch of packages which need to be installed in order to fix the issue addressed by the 'patch'. [...]
Thanks for the explanation. YaST online update indeed checks "patches", which explains the difference. @kernels lying around in /boot At the moment, /boot lists kernels 4.1.24-19 and 4.1.26-21 (for -default, -debug and -vanilla, which are the ones I currently keep around). Yesterday I had at least one older kernel (-default only) but it has indeed been removed. Again, thanks for the explanation. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c6 --- Comment #6 from Michael Andres <ma@suse.com> --- (In reply to Andreas Stieger from comment #4)
All of the above would make "zypper up" all but identical to "patch". :-) I adjusted the summary to reflect the enhancement request.
Even if the result is usually similar, the approach is different: - up: Is a 'best effort' approach. You get the latest version 'if it can be installed without conflicts'. There's no assertion - and no conflicts. - patch: A patch requires minimal package versions to be installed. If it can't be applied because packages are involved in a conflict, the conflict is reported. The enhancement could also include 'zypper patch --update'; an option to 'patch' which combines 'patch' and 'up' (assert patches get applied and update whatever else is possible in one go). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c7 --- Comment #7 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- (In reply to Michael Andres from comment #6) [...]
The enhancement could also include 'zypper patch --update'; an option to 'patch' which combines 'patch' and 'up' (assert patches get applied and update whatever else is possible in one go).
That would be a nice touch, considering that openSUSE's own repos usually have patches for everything while Packman "openSUSE" repos usually have updates but no patches. I've have examples of this, when, let's say, "zypper up && zypper lp" reports patches from Update-Test and additional updates from Packman: then I've run "zypper patch" followed by "zypper up" which is essentially running zypper twice to do what your proposed "zypper patch --update" would do in one step. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c8 --- Comment #8 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- oops: "zypper lu && zypper lp" -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c9 --- Comment #9 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- P.S. I haven't yet tried "zypper up -t patch -t package" but wouldn't it do what is wanted? (and in particular, update patches first and any additional packages afterwards, so that "reboot" or "restart" types of patches are handled appropriately) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c10 Tony Mechelynck <antoine.mechelynck@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86-64 |All Whiteboard| |[workaround for any OS: see | |comment #9 and 10] OS|openSUSE 42.1 |openSUSE 42.2 --- Comment #10 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- "zypper lu -t package -t patch" announced an incoming kernel patch, so I tried "zypper up -t patch -t package". Both commands warned me about a necessary reboot, and the update command finished with exit status 102 (ZYPPER_EXIT_INF_REBOOT_NEEDED) so I shall now reboot after making sure that my boot loader points to the new kernel-default. I expect this RFE to be RESOLVED in some forthcoming update for openSUSE Leap 42.2 on all platforms, but of course this workaround applies to any already deployed version of zypper, provided only that it supports multiple -t or --type arguments to the up (update) command. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c11 Tony Mechelynck <antoine.mechelynck@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ma@suse.com Flags| |needinfo?(ma@suse.com) --- Comment #11 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- Wouldn't it be enough to change the "default type" for the zypper lu and up commands to both "package" and "patch"? That way, "zypper lu" would show any needed restarts or reboots, and "zypper up" would warn about them at end-of-run, the way they already do when explicitly started with "-t package -t patch" on the command-line. This would be a change in behaviour, but I don't think it would break anything. Of course the manpage would have to be modified to mention the new behaviour, and to mention that this new behaviour applies "starting with zypper version x.xx". Any user wanting either to bypass package updates without patches (e.g. those of Packman) or OTOH to suppress reboot or restart warning messages (I don't think there would be many such users, but who knows?) could override this new default with an explicit -t argument. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c12 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(ma@suse.com) | --- Comment #12 from Michael Andres <ma@suse.com> --- JFYI: zypper-1.13.24 supports 'zypper patch --with-update' which will perform a combination of 'patch' and 'up'. This includes suppressing any package updates, if patches for the updatestack need to be applied first. @'zypper up including patches': not per default, because patch installation may raise dependency conflicts, which is not wanted in plain 'zupper up'. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c13 --- Comment #13 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- (In reply to Michael Andres from comment #12)
JFYI: zypper-1.13.24 supports 'zypper patch --with-update' which will perform a combination of 'patch' and 'up'. This includes suppressing any package updates, if patches for the updatestack need to be applied first.
JFYI: the current zypper version on Leap 42.2 (even with the Update-Test repo enabled) is 1.13.21. I hope the update will appear soon, but in the meantime I'm still explicitly specifying "-t patch -t package" to both "zypper lu" and "zypper up", and I usually notice dependency conflicts (of the kind you mentioned below) by the fact that a "needed" patch is silently not applied, or only partly, and reappears as "needed" the next time I check for updates (cf. bug 1034010).
@'zypper up including patches': not per default, because patch installation may raise dependency conflicts, which is not wanted in plain 'zupper up'.
Ah, OK. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c14 --- Comment #14 from Michael Andres <ma@suse.com> --- (In reply to Tony Mechelynck from comment #13)
(In reply to Michael Andres from comment #12) JFYI: the current zypper version on Leap 42.2 (even with the Update-Test repo enabled) is 1.13.21. I hope the update will appear soon, but in the
In case you want to give it a try: http://download.opensuse.org/repositories/zypp:/SLE-12-SP2-Branch/openSUSE_L... This repo always contains the latest updatestack (libsolv.libzypp/zypper) for SLE12-SP2/Leap-42.2 that has passed the developers test suite - i.e. the candidate for the next maintenance update. Nevertheless a developers repo, which has not yet passed the maintenance QA and does not include dependent packages like yast/packagekit (relevant in case the libzypp ABI would chane). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c15 --- Comment #15 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- (In reply to Michael Andres from comment #14) [...]
Nevertheless a developers repo, [...]
...and thus with a different "vendor" string. I've done this in the past (for a different package), and in the long run I've had unobvious difficulties because of it. Thank you, but this time I'll wait on the "official" 42.1 repositories, including Update-Test. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c17 Tony Mechelynck <antoine.mechelynck@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|Leap 42.1 |Leap 42.3 Whiteboard|[workaround for any OS: see |[workaround for any OS: see |comment #9 and 10] |comment #9 and 10 and | |comment #17] Flags| |needinfo?(ma@suse.com) OS|openSUSE 42.2 |openSUSE 42.3 --- Comment #17 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- Michael: You said in comment #3 "Keep it open as an RFE". Now the bug has been closed becaused openSUSE 42.1 is at EOL. Do you want to REOPEN it for 42.3 (or for Factory) as an RFE? In the meantime, adding "-t patch -t package" (or vice-versa) on the command-lines for "zypper lu" and "zypper up" looks to me like a satisfactory solution. However, unlike "zypper patch", "zypper up -t patch -t package" simply skips packages for which there is a conflict, rather than asking the user what to do. I suppose this is intentional. What I do is: if "zypper lu -t package -t patch" reports that a patch needs to be installed but that no package can be upgraded, then I run "zypper patch" to see what the conflict is (so I can report the problem to the appropriate developers and/or to Maintenance). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c18 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX |--- Flags|needinfo?(ma@suse.com) | --- Comment #18 from Michael Andres <ma@suse.com> --- (In reply to Tony Mechelynck from comment #17)
Michael: You said in comment #3 "Keep it open as an RFE". Now the bug has been closed becaused openSUSE 42.1 is at EOL. Do you want to REOPEN it for 42.3 (or for Factory) as an RFE?
Yes.
In the meantime, adding "-t patch -t package" (or vice-versa) on the command-lines for "zypper lu" and "zypper up" looks to me like a satisfactory solution.
However, unlike "zypper patch", "zypper up -t patch -t package" simply skips packages for which there is a conflict, rather than asking the user what to do. I suppose this is intentional.
Yes. The 'pro' of 'zypper patch' is, that that you are sure the affected/vulnerable packages mentioned in the patches are updated (otherwise you get a conflict reporting the problem). Zypper patch meanwhile allows you to 'update' the remaining packages: zypper patch --with-update Additionally try to update all packages not covered by patches. The option is ignored, if the patch command must update the update stack first. Can not be combined with --updatestack-only. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c19 --- Comment #19 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- (In reply to Michael Andres from comment #18)
zypper patch --with-update
Additionally try to update all packages not covered by patches. The option is ignored, if the patch command must update the update stack first. Can not be combined with --updatestack-only.
Ah, thanks for drawing my attention to this nice option. Previously I would cancel the update if "zypper up -t package -t patch" showed that one patch required reloading zypper, then run "zypper patch --updatestack-only" followed by "zypper up -t package -t patch". "zypper patch --with-update" is more streamlined (and more foolproof) in that it will do, in effect, either "up -t patch -t package" or "patch --updatestack-only" depending on whether or not a zypper reload is required. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 Tony Mechelynck <antoine.mechelynck@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|[workaround for any OS: see |[workaround for any OS: see |comment #9 and 10 and |comment #9 and 10 and |comment #17] |comment #17 and #18] -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c20 --- Comment #20 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- yay, it works! (unsurprisingly, I suppose) — even when there are updates but no patches: linux-2iyu:~ # (zypper lu -t package -t patch || echo 'exit status' $? ; date ) 2>&1 |tee -a ~/zypper.log Retrieving repository 'RWTH:Leap-42.3-Packman' metadata [...done] Building repository 'RWTH:Leap-42.3-Packman' cache [....done] Loading repository data... Reading installed packages... Patches No updates found. Package updates S | Repository | Name | Current Version | Available Version | Arch --+------------------------+-------------+----------------------+----------------------+------- v | RWTH:Leap-42.3-Packman | libx264-152 | 0.152svn20180305-2.1 | 0.152svn20180305-3.1 | x86_64 Mon 16 Apr 14:18:57 CEST 2018 linux-2iyu:~ # (zypper patch --with-update || echo 'exit status' $? ; date ) 2>&1 |tee -a ~/zypper.log Loading repository data... Reading installed packages... Resolving package dependencies... The following package is going to be upgraded: libx264-152 1 package to upgrade. Overall download size: 340.2 KiB. Already cached: 0 B. No additional space will be used or freed after the operation. Continue? [y/n/...? shows all options] (y): Retrieving package libx264-152-0.152svn20180305-3.1.x86_64 (1/1), 340.2 KiB (915.9 KiB unpacked) Retrieving: libx264-152-0.152svn20180305-3.1.x86_64.rpm [.done (99.0 KiB/s)] Checking for file conflicts: [...done] (1/1) Installing: libx264-152-0.152svn20180305-3.1.x86_64 [.........done] Mon 16 Apr 14:19:46 CEST 2018 linux-2iyu:~ # -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c21 --- Comment #21 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- Now that the version of zypper in the 42.3 Update-OSS repo accepts the "zypper patch --with-update" command, which in essence will do the same as "zypper up" except that it stops after installing a package manager patch if there is one, I, the reporter, regard this bug as FIXED. I'm only leaving it open in deference to Michael Andres's wish in comment #18. This option is even mentioned near the top of the "patch" section in the zypper manpage. Maybe a few examples of typical uses of zypper, including this one, could be added near the top of the manpage, let's say between the DESCRIPTION and CONCEPTS sections, but I'm not even sure of that, and for me it would just be a low-priority cherry-on-the-cake enhancement. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c22 --- Comment #22 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- P.S. IMHO the most useful uses of zypper are the following: * man zypper * zypper help * zypper help *command* * zypper info *packagename* * zypper lu -t package -t patch * zypper patch --with-update * zypper --releasever *nn.n* dup * but only after changing the URL (and optionally the name and/or alias: I personally use it in the name but not the alias) of all repository entries in the *.repo files (even Packman if present) so that the openSUSE version is replaced by the text "$releasever" (without the quotes of course) * It is possible (and IMHO less error-prone when tweaking the repositories' description manually, for instance to add $releasever) to have a single .repo file (named, for example, /etc/zypp/repos.d/all.repo) rather than a separate one for each repo, but this is only my own preference, and it admittedly makes the all.repo rather bulky; another user might prefer separate .repo files for this reason. For more complicated package management actions than the above, I find YaST more user-friendly. Again, YMMV. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c24 --- Comment #24 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- (In reply to Michael Andres from comment #23)
(In reply to Michael Andres from comment #2)
Unfortunately the information to 'suggest a reboot' is not tied to a 'package', but to a 'patch'.
This has meanwhile changed. Since zypper-1.14.15 packages also may carry a reboot-needed attribute. We added the `zypper needs-rebooting` command to check whether the system should be rebooted. Hints have also been added to the commit summary and `zypper ps`.
Closing it.
Ah, nice. The highest version of zypper currently available with openSUSE Leap 15.0 is 1.14.12, I hope an upgrade will soon come around -- or if it doesn't, it is bound to be included in openSUSE 15.1, "planned to be released in May 2019". -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c25 --- Comment #25 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- Upgraded yesterday to the current beta or RC of Leap 15.1. zypper version is 1.14.27 and its manpage mentions the needs-rebooting command. It says: No core libraries or services have been updated. Reboot is probably not necessary. and ends with status zero (indeed, ATM my system doesn't need rebooting). Note that it said the same thing at the end of "zypper --releasever=15.1 dup" even though the kernel had been updated as part of the distribution upgrade. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c26 Benjamin Zeller <bzeller@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bzeller@suse.com --- Comment #26 from Benjamin Zeller <bzeller@suse.com> --- (In reply to Tony Mechelynck from comment #25)
Upgraded yesterday to the current beta or RC of Leap 15.1.
zypper version is 1.14.27 and its manpage mentions the needs-rebooting command.
It says: No core libraries or services have been updated. Reboot is probably not necessary.
and ends with status zero (indeed, ATM my system doesn't need rebooting).
Note that it said the same thing at the end of "zypper --releasever=15.1 dup" even though the kernel had been updated as part of the distribution upgrade.
If the "needs rebooting" flag was set or not depends on the zypper version that did the upgrade. If you upgraded from a zypper version not having the feature to the one offering it, the flag can not be set. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=984778 http://bugzilla.opensuse.org/show_bug.cgi?id=984778#c27 --- Comment #27 from Tony Mechelynck <antoine.mechelynck@gmail.com> --- (In reply to Benjamin Zeller from comment #26)
If the "needs rebooting" flag was set or not depends on the zypper version that did the upgrade. If you upgraded from a zypper version not having the feature to the one offering it, the flag can not be set.
Ah, I see. I upgraded from whatever version of zypper was present day before yesterday on Leap 15.0, "zypper --releasever=15.1 dup" acted on more than 9000 packages including itself and the kernel, and IIUC it invoked its updated version when finishing, which couldn't see the flag because the earlier version didn't know about it. Thanks for explaining. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com