[Bug 1184399] New: purge-kernels.service might conflict with other background services using zypper as well
http://bugzilla.opensuse.org/show_bug.cgi?id=1184399 Bug ID: 1184399 Summary: purge-kernels.service might conflict with other background services using zypper as well Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: marius.kittler@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I observed the following problem on a Leap 15.2 system (used as openQA worker): ``` martchus@openqaworker3:/srv/salt> sudo systemctl status purge-kernels.service purge-kernels.service - Purge old kernels Loaded: loaded (/usr/lib/systemd/system/purge-kernels.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2021-03-15 06:51:54 CET; 1 day 4h ago Main PID: 1166 (code=exited, status=7) Mar 15 06:51:36 openqaworker3 systemd[1]: Starting Purge old kernels... Mar 15 06:51:54 openqaworker3 zypper[1166]: System management is locked by the application with pid 1286 (zypper). Mar 15 06:51:54 openqaworker3 zypper[1166]: Close this application before trying again. Mar 15 06:51:54 openqaworker3 systemd[1]: purge-kernels.service: Main process exited, code=exited, status=7/NOTRUNNING Mar 15 06:51:54 openqaworker3 systemd[1]: Failed to start Purge old kernels. Mar 15 06:51:54 openqaworker3 systemd[1]: purge-kernels.service: Unit entered failed state. Mar 15 06:51:54 openqaworker3 systemd[1]: purge-kernels.service: Failed with result 'exit-code'. ``` Maybe this can be improved, e.g. by adding a retry? Unfortunately I don't know what the conflicting process was because I only found out about the problem when it had already terminated. Related openQA project ticket: https://progress.opensuse.org/issues/90170 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1184399 http://bugzilla.opensuse.org/show_bug.cgi?id=1184399#c1 Oliver Kurz <okurz@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |okurz@suse.com --- Comment #1 from Oliver Kurz <okurz@suse.com> --- Well, the conflicting process was zypper as visible in "System management is locked by the application with pid 1286 (zypper)." which in the case of openqaworker3 was likely triggered by a salt action or also manually. But I think that does not matter because a system service should not fail if a user calls zypper. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1184399 http://bugzilla.opensuse.org/show_bug.cgi?id=1184399#c2 --- Comment #2 from Michael Andres <ma@suse.com> --- JFYI a service is able to detect this by looking at the zypper return code: 7 - ZYPPER_EXIT_ZYPP_LOCKED The ZYPP library is locked, e.g. packagekit is running. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1184399 http://bugzilla.opensuse.org/show_bug.cgi?id=1184399#c3 --- Comment #3 from Michal Suchanek <msuchanek@suse.com> --- what other zypper based services do we have? is retry necessary or can we assume that on some next purge-kernels run purge-kernels wins the race? How should we retry? Should we add a shell loop or is there a zypper option to wair for the lock rather than failing right away? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1184399 http://bugzilla.opensuse.org/show_bug.cgi?id=1184399#c13 Nick Singer <nsinger@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |ma@suse.com, | |nsinger@suse.com Resolution|FIXED |--- Flags| |needinfo?(ma@suse.com) --- Comment #13 from Nick Singer <nsinger@suse.com> --- I currently ran in the same issue again. Checking the service it seems that it successfully made it into Leap15.2 but libzypp is still on `libzypp-17.25.10-lp152.2.28.1.x86_64` and https://build.opensuse.org/package/show/zypp:Head/libzypp doesn't show any new or pending MR. Is this expected? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1184399 http://bugzilla.opensuse.org/show_bug.cgi?id=1184399#c14 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(ma@suse.com) | --- Comment #14 from Michael Andres <ma@suse.com> --- Unfortunately libzypp-17.25.11 delayed, but I guess we're able to release it this week. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1184399 http://bugzilla.opensuse.org/show_bug.cgi?id=1184399#c25 Oliver Kurz <okurz@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED --- Comment #25 from Oliver Kurz <okurz@suse.com> --- I tested myself within `podman run --pull=always --rm -it registry.opensuse.org/opensuse/leap:15.2` by installing the according packages and running `zypper in htop` in one shell, waiting at the "y/n/���" prompt and I did not confirm that selection. Then in another shell I ran `time env ZYPP_LOCK_TIMEOUT=-1 /usr/bin/zypper -n purge-kernels`, waited two minutes (way past the original 30s timeout), then confirmed the prompt in the first shell, ending the interactive zypper process. In the second shell the "purge-kernels" call quickly continued and succeeded, real time overall 2m1s. So I consider this bug verification successful. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com