Bug 1187383 - Leap 15.3: can't remove kernel-default-5.3.18 without also removing other kernel
Leap 15.3: can't remove kernel-default-5.3.18 without also removing other kernel
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Kernel
Leap 15.3
x86-64 openSUSE Leap 15.3
: P5 - None : Normal (vote)
: ---
Assigned To: openSUSE Kernel Bugs
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-15 21:45 UTC by Jimmie Mayfield
Modified: 2021-06-19 21:14 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmie Mayfield 2021-06-15 21:45:58 UTC
I have a Leap system that I've configured to pull kernels from Kernel:/stable:/Backport/standard because I have need to test against recent stable kernels.

Today I upgraded this machine to from 15.2 to 15.3 and, in the process, a number of 5.3.18 kernel packages were re-installed.  I was able to manually remove all but one: kernel-default-5.3.18.  Attempts to remove that package results in some unexpected behavior:

/tmp # uname -r
5.12.10-lp152.5.g332b26c-default

So we're currently running the kernel from Kernel:stable repo...


/tmp # rpm -qa | grep kernel-default
kernel-default-5.12.10-lp152.5.1.g332b26c.x86_64
kernel-default-5.3.18-59.5.2.x86_64

So there are presently 2 kernels installed.  I only ever want this machine to run kernels from Kernel:stable so let's delete that 5.3.18 kernel...

/tmp # zypper remove kernel-default-5.3.18
Reading installed packages...
Resolving package dependencies...

The following 2 packages are going to be REMOVED:
  kernel-default-5.3.18-59.5.2 kernel-default-5.12.10-lp152.5.1.g332b26c

2 packages to remove.


For some reason, using zypper to delete 5.3.18 would also delete 5.12.10 (which would leave me with no kernels installed).


For giggles, let's try to use 'rpm' to delete that 5.3.18 package the old way...

/tmp # rpm -e kernel-default-5.3.18
error: Failed dependencies:
	(kmod(dm_multipath.ko) if kernel) is needed by (installed) multipath-tools-0.8.5+80+suse.73c50f5-3.3.1.x86_64
	(kmod(msr.ko) if kernel) is needed by (installed) fwupd-1.5.8-1.13.x86_64
	(kmod(scsi_dh_alua.ko) if kernel) is needed by (installed) multipath-tools-0.8.5+80+suse.73c50f5-3.3.1.x86_64
	(kmod(scsi_dh_emc.ko) if kernel) is needed by (installed) multipath-tools-0.8.5+80+suse.73c50f5-3.3.1.x86_64
	(kmod(scsi_dh_rdac.ko) if kernel) is needed by (installed) multipath-tools-0.8.5+80+suse.73c50f5-3.3.1.x86_64
	(kmod(sg.ko) if kernel) is needed by (installed) suse-module-tools-15.3.6-1.1.x86_64

I'm not sure what to make of this..

Upshot seems to be that I cannot remove kernel-default-5.3.18 without also removing kernel-default-5.12.10
Comment 1 Takashi Iwai 2021-06-16 08:49:06 UTC
Adding Michal and Martin to Cc.

Relevant with the topic we've recently discussed?
Comment 2 Michal Suchanek 2021-06-16 09:31:12 UTC
The question is why a kernel from kernel-stable does not provide kmod(dm_multipath.ko) or why zypper does not take that into account. Sounds like a bug is lurking somewhere.
Comment 3 Michal Suchanek 2021-06-16 09:32:10 UTC
rpm -q --provides kernel-default-5.12.9-1.1.x86_64 | grep multipath
kmod(dm_multipath.ko)
kmod(multipath.ko)
Comment 4 Michal Suchanek 2021-06-16 09:33:28 UTC
yes, you probably need

kernel-default-5.12.10-lp153.5.1.g332b26c

rather than

kernel-default-5.12.10-lp152.5.1.g332b26c
Comment 5 Martin Wilck 2021-06-16 09:37:10 UTC
Ok, but why does zypper want to remove kernel-default-5.12.10-lp152.5.1.g332b26c?
Comment 6 Michal Suchanek 2021-06-16 09:38:28 UTC
built against old rom-config-SUSE
Comment 7 Michal Suchanek 2021-06-16 09:42:35 UTC
Triggered a rebuild of https://build.opensuse.org/project/show/Kernel:HEAD:Backport against 15.3
Comment 8 Jimmie Mayfield 2021-06-16 12:14:39 UTC
(In reply to Michal Suchanek from comment #4)
> yes, you probably need
> 
> kernel-default-5.12.10-lp153.5.1.g332b26c
> 
> rather than
> 
> kernel-default-5.12.10-lp152.5.1.g332b26c

Where might one find kernel-default-*-lp153-*?  Is there a separate backports repo for 15.3?  I didn't see one when I looked this morning.
Comment 9 Michal Suchanek 2021-06-16 12:18:24 UTC
(In reply to Jimmie Mayfield from comment #8)
> (In reply to Michal Suchanek from comment #4)
> > yes, you probably need
> > 
> > kernel-default-5.12.10-lp153.5.1.g332b26c
> > 
> > rather than
> > 
> > kernel-default-5.12.10-lp152.5.1.g332b26c
> 
> Where might one find kernel-default-*-lp153-*?  Is there a separate
> backports repo for 15.3?  I didn't see one when I looked this morning.

There isn't which is the problem. As said in the previous comment I set a repo to build against 15.3 and installing e kernel from there should fix the issue.
Comment 10 Diethard Janssen 2021-06-17 15:46:21 UTC
It seems that also at least correct syms and default-base are missing when installing linux kernel development.
Comment 11 Martin Wilck 2021-06-17 19:07:40 UTC
(In reply to Diethard Janssen from comment #10)
> It seems that also at least correct syms and default-base are missing when
> installing linux kernel development.

Please be more specific.
Comment 12 Diethard Janssen 2021-06-17 19:56:34 UTC
I try, but it is difficult.
For compiling own modules I need kernel-default-devel, kernel-devel, kernel-syms and kernel-source. With stable-backports kernel-default, default-devel and syms are only lp152 and not lp153. I just tried it with the newest version some minutes ago.
This afternoon I tried kernel head. And there I needed kernel-syms and kernel-default-devel for lp153, but yast only found the version lp152 and therefore wanted to install parts of kernel 5.3.x. I can't get rid of kernel 5.3.x.
I hope, I'm clear. Sorry.
Comment 13 Martin Wilck 2021-06-17 20:07:00 UTC
These repos aren't made for Leap. I can't install kernel-default-devel on Leap at all:

> zypper in kernel-default-devel-5.13~rc6-2.1.gb5e23d2 
> Loading repository data...
> Reading installed packages...
> Resolving package dependencies...
> 
> Problem: nothing provides 'libc.so.6(GLIBC_2.33)(64bit)' needed by the to be installed kernel-default-devel-5.13~rc6-2.1.gb5e23d2.x86_64

The standard choice of kernels on my Leap 15.3 system looks like this (somewhat confusing indeed):

> # zypper se -s kernel-default-devel
> Loading repository data...
> Reading installed packages...
> 
> S | Name                 | Type    | Version           | Arch   | Repository
--+----------------------+---------+-------------------+--------+-------------------------------------------------------------
> i | kernel-default-devel | package | 5.3.18-lp152.75.1 | x86_64 | (System Packages)
> v | kernel-default-devel | package | 5.3.18-59.5.2     | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
> i | kernel-default-devel | package | 5.3.18-57.3       | x86_64 | leap
> v | kernel-default-devel | package | 5.3.18-24.67.3    | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
> v | kernel-default-devel | package | 4.12.14-197.92.1  | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
> v | kernel-default-devel | package | 4.12.14-197.89.2  | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
Comment 14 Michal Suchanek 2021-06-17 20:17:35 UTC
(In reply to Martin Wilck from comment #13)
> These repos aren't made for Leap. I can't install kernel-default-devel on
> Leap at all:
> 
> > zypper in kernel-default-devel-5.13~rc6-2.1.gb5e23d2 
> > Loading repository data...
> > Reading installed packages...
> > Resolving package dependencies...
> > 
> > Problem: nothing provides 'libc.so.6(GLIBC_2.33)(64bit)' needed by the to be installed kernel-default-devel-5.13~rc6-2.1.gb5e23d2.x86_64

That's not a kernel built on leap so it's not installable. That's a known problem.

You should be able to install a kernel built on Leap from the repo mentioned above.
Comment 15 Michal Suchanek 2021-06-17 20:24:46 UTC
(In reply to Diethard Janssen from comment #12)
> I try, but it is difficult.
> For compiling own modules I need kernel-default-devel, kernel-devel,
> kernel-syms and kernel-source. With stable-backports kernel-default,
> default-devel and syms are only lp152 and not lp153. I just tried it with
> the newest version some minutes ago.
> This afternoon I tried kernel head. And there I needed kernel-syms and
> kernel-default-devel for lp153, but yast only found the version lp152 and
> therefore wanted to install parts of kernel 5.3.x. I can't get rid of kernel
> 5.3.x.
> I hope, I'm clear. Sorry.

yes, the kernel-source and kernel-syms were not rebuilt.
Comment 16 Jimmie Mayfield 2021-06-18 03:16:29 UTC
(In reply to Michal Suchanek from comment #14)
> That's not a kernel built on leap so it's not installable. That's a known
> problem.
> 
> You should be able to install a kernel built on Leap from the repo mentioned
> above.

This discussion thread seems to boil down to the following question:  which repo should Leap users point to if they want to track various upstream kernels?  

Kernel:/stable:/Backport/standard tracks stable for 15.2 users

Kernel:HEAD:Backport appears to track mainline for 15.3 users

Is there a corresponding repo that tracks stable for 15.3 users?

(I guess things were simpler in the past before the kernel began to depend on glibc 2.33...)
Comment 17 Michal Suchanek 2021-06-18 08:38:24 UTC
(In reply to Jimmie Mayfield from comment #16)

> Kernel:/stable:/Backport/standard tracks stable for 15.2 users
> 
> Kernel:HEAD:Backport appears to track mainline for 15.3 users
> 

Both should be updated to 15.3 now.

There was a change in the kmod() dependencies between 15.2 an 15.3 so the 15.2 kernel does not work for 15.3. It may work the other way around but there was a glibc update so the -devel packages probably won't work on 15.2
Comment 18 Jimmie Mayfield 2021-06-18 13:06:22 UTC
(In reply to Michal Suchanek from comment #17)

> Both should be updated to 15.3 now.
> 
> There was a change in the kmod() dependencies between 15.2 an 15.3 so the
> 15.2 kernel does not work for 15.3. It may work the other way around but
> there was a glibc update so the -devel packages probably won't work on 15.2

Kernel:/stable:Backport/standard updated to 5.12.11 yesterday it's not obvious to me whether it's 15.2 or 15.3 (the package names still suggest 15.2).  In any event, attempting to remove the 15.3 kernel-default-5.3.18 had the same effect as before:

# zypper remove kernel-default-5.3.18
Reading installed packages...
Resolving package dependencies...

The following 5 packages are going to be REMOVED:
  kernel-default-5.3.18-59.5.2 kernel-default-5.12.11-lp152.2.1.g522e416 kernel-default-5.12.11-lp152.3.1.g6980d8f
  kernel-default-extra kernel-default-optional

5 packages to remove.


This has turned into a good test of zypper's sanity-checking.  With 3 kernels installed, zypper's boot-time "purge old kernels" action tried to purge 5.3.18 (and all the other kernels).  Happily, zypper fails the operation citing files-in-use.

It does, however, mean that a zypper config with multiversion.kernels set to, say, "latest,latest-1,running" will probably never auto-purge any kernels since the operation will fail.  Adding "oldest" to that list to preserve that 5.3.18 kernel will probably workaround...
Comment 19 Michal Suchanek 2021-06-18 14:31:38 UTC
State of standard for Kernel:HEAD:Backport / kernel-default
 Go to download repository
  Delete all built binaries
 x86_64
_buildenv (109 KB)	
 Download  Details
kernel-default-5.13~rc6-lp153.3.2.gb5e23d2.nosrc.rpm (552 KB)	
 Download  Details
kernel-default-5.13~rc6-lp153.3.2.gb5e23d2.x86_64.rpm (91.6 MB)	
 Download  Details
kernel-default-debuginfo-5.13~rc6-lp153.3.2.gb5e23d2.x86_64.rpm (1.36 GB)	
 Download  Details
kernel-default-debugsource-5.13~rc6-lp153.3.2.gb5e23d2.x86_64.rpm (76.8 MB)	
 Download  Details
kernel-default-devel-5.13~rc6-lp153.3.2.gb5e23d2.x86_64.rpm (3.38 MB)	
 Download  Details
kernel-default-devel-debuginfo-5.13~rc6-lp153.3.2.gb5e23d2.x86_64.rpm (671 KB)	
 Download  Details
kernel-default-livepatch-devel-5.13~rc6-lp153.3.2.gb5e23d2.x86_64.rpm (2.55 MB)	
 Download  Details
make-stderr.log (0 Bytes)	
 Download  Details
Comment 20 Diethard Janssen 2021-06-18 20:41:29 UTC
Status with kernel-head-bp some minutes ago:
Yast still wants to install kernel-default-base of 5.3.18-59.5.2. And kernel-makros of 5.3.18-59.5.2.
The same is with stable-bp. I just tried it.
Comment 21 Michal Suchanek 2021-06-19 06:26:25 UTC
State of standard for Kernel:stable:Backport / kernel-default
 Go to download repository
 x86_64
_buildenv (109 KB)	
 Download  Details
kernel-default-5.12.12-lp153.2.1.g0e46a2c.nosrc.rpm (3.77 MB)	
 Download  Details
kernel-default-5.12.12-lp153.2.1.g0e46a2c.x86_64.rpm (92.6 MB)	
 Download  Details
kernel-default-debuginfo-5.12.12-lp153.2.1.g0e46a2c.x86_64.rpm (1.33 GB)	
 Download  Details
kernel-default-debugsource-5.12.12-lp153.2.1.g0e46a2c.x86_64.rpm (78.7 MB)	
 Download  Details
kernel-default-devel-5.12.12-lp153.2.1.g0e46a2c.x86_64.rpm (6.26 MB)	
 Download  Details
kernel-default-devel-debuginfo-5.12.12-lp153.2.1.g0e46a2c.x86_64.rpm (3.09 MB)	
 Download  Details
kernel-default-livepatch-devel-5.12.12-lp153.2.1.g0e46a2c.x86_64.rpm (4.98 MB)	
 Download  Details
Comment 22 Michal Suchanek 2021-06-19 06:30:08 UTC
zypper in --allow-vendor-change kernel-default kernel-default-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 3 NEW packages are going to be installed:
  kernel-default-5.12.12-lp153.2.1.g0e46a2c kernel-default-devel-5.12.12-lp153.2.1.g0e46a2c kernel-devel-5.12.12-lp153.2.1.g0e46a2c

The following package requires a system reboot:
  kernel-default-5.12.12-lp153.2.1.g0e46a2c

3 new packages to install.
Overall download size: 115.3 MiB. Already cached: 0 B. After the operation, additional 242.1 MiB will be used.

    Note: System reboot required.
Continue? [y/n/v/...? shows all options] (y):
Comment 23 Diethard Janssen 2021-06-19 20:32:05 UTC
This seems to be ok. It's a little bit tricky, but after some restarts one gets rid of the old kernel. Even building modules works.
Thank you very much!
Comment 24 Jimmie Mayfield 2021-06-19 21:14:26 UTC
I concur.  5.3.18 was auto-purged upon reboot and things look good.  Thanks much for taking so much time to straighten this out.

I'll mark this bug as 'resolved:fixed'