Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFix missing dkms modules after upgrades (try 2) #8216
Conversation
This comment has been minimized.
This comment has been minimized.
|
This is more complicated than it needs to be. Just use |
This comment has been minimized.
This comment has been minimized.
codecov
bot
commented
Dec 20, 2018
•
Codecov Report
@@ Coverage Diff @@
## master #8216 +/- ##
==========================================
- Coverage 78.56% 78.41% -0.16%
==========================================
Files 379 378 -1
Lines 114924 114759 -165
==========================================
- Hits 90286 89983 -303
- Misses 24638 24776 +138
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
|
@Conan-Kudo we already use |
This comment has been minimized.
This comment has been minimized.
|
@tonyhutter So then, this is just logic for dealing with updated releases of the same version? When do we ever do that? Aside from distro upgrades, obviously... |
This comment has been minimized.
This comment has been minimized.
|
@Conan-Kudo correct. It's for upgrading the same zfs version between OSs (zfs-dkms-0.7.12.fc28 -> zfs-dkms.0.7.12.fc29). |
behlendorf
added
the
Status: Code Review Needed
label
Dec 20, 2018
behlendorf
approved these changes
Dec 20, 2018
|
The logic here looks sound to me, though I didn't manually verify this fix. |
behlendorf
added
Status: Accepted
and removed
Status: Code Review Needed
labels
Dec 28, 2018
This comment has been minimized.
This comment has been minimized.
|
@Lalufu would you mind reviewing this fix. |
This comment has been minimized.
This comment has been minimized.
|
The logic looks OK to me, but I believe printing stuff in scripts is frowned upon. |
This comment has been minimized.
This comment has been minimized.
|
@Lalufu good point. @tonyhutter let's get this refreshed without the extraneous logging. |
behlendorf
added
Status: Revision Needed
and removed
Status: Accepted
labels
Jan 3, 2019
tonyhutter
force-pushed the
tonyhutter:upgrade-fix
branch
from
652d891
to
9e347b2
Jan 7, 2019
behlendorf
added
Status: Accepted
and removed
Status: Revision Needed
labels
Jan 8, 2019
behlendorf
merged commit 21e000a
into
zfsonlinux:master
Jan 8, 2019
23 of 24 checks passed
This comment has been minimized.
This comment has been minimized.
|
FTR, I just updated from F29 (running kernel-5.0.9-200.fc29.x86_64) to F30 (running kernel-5.0.9-301.fc30.x86_64), using spl-dkms-0.7.13-1.fc29.noarch and zfs-dkms-0.7.13-1.fc29.noarch, and ended up without SPL and ZFS modules in the F30 system. |
tonyhutter commentedDec 19, 2018
Motivation and Context
Make dkms upgrades work correctly when upgrading Fedora. This PR is a refactored version of #8160.
Description
If you were upgrading from say, fc28->fc29, on ZFS version X, the RPMs macros would get called like this:
This has the unfortunate side effect that the newly built f29 modules get removed by the f28
%preunstep, giving you no modules.This patch updates
%preun X.fc28to see if we're upgrading or uninstalling. If we're uninstalling, then remove our files. If we're upgrading, check to see if were updating to a new version (0.7.11 -> 0.7.12) or upgrading the same version to a new OS (zfs-dkms.0.7.12.fc28 -> zfs-dkms.0.7.12.fc29). If we're upgrading versions then uninstall the old files. If we're upgrading the OS, then do nothing, since we know our old modules are just going to get overwritten when they're rebuilt for the new OS.Fixes: #6902
How Has This Been Tested?
Did some unit tests using a reproducer similar to (#8089 (comment)). Also did the following:
Also:
Types of changes
Checklist:
Signed-off-by.