Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation order issue #12822

Closed
Moerten85 opened this issue Dec 4, 2021 · 7 comments · Fixed by #12832
Closed

Installation order issue #12822

Moerten85 opened this issue Dec 4, 2021 · 7 comments · Fixed by #12832
Labels
Type: Defect Incorrect behavior (e.g. crash, hang) Type: Documentation Indicates a requested change to the documentation

Comments

@Moerten85
Copy link

I broke three fresh Fedora 34/35 installations after having installed ZFS as mentioned in your documentation here:

https://openzfs.github.io/openzfs-docs/Getting%20Started/Fedora/index.html

The command...

dnf install -y kernel-devel zfs

...causes to the following error:

Loading new zfs-2.1.1 DKMS files...
Building for 5.15.6-100.fc34.x86_64
**Module build for kernel 5.15.6-100.fc34.x86_64 was skipped since the
kernel headers for this kernel does not seem to be installed.**

  Installieren          : zfs-2.1.1-1.fc34.x86_64                                                                                                                                                  203/204 
  Ausgeführtes Scriptlet: zfs-2.1.1-1.fc34.x86_64                                                                                                                                                  203/204 
Created symlink /etc/systemd/system/zfs-import.target.wants/zfs-import-cache.service → /usr/lib/systemd/system/zfs-import-cache.service.
Created symlink /etc/systemd/system/zfs.target.wants/zfs-mount.service → /usr/lib/systemd/system/zfs-mount.service.
Created symlink /etc/systemd/system/zfs.target.wants/zfs-share.service → /usr/lib/systemd/system/zfs-share.service.
Created symlink /etc/systemd/system/zed.service → /usr/lib/systemd/system/zfs-zed.service.
Created symlink /etc/systemd/system/zfs.target.wants/zfs-zed.service → /usr/lib/systemd/system/zfs-zed.service.
Created symlink /etc/systemd/system/multi-user.target.wants/zfs.target → /usr/lib/systemd/system/zfs.target.
Created symlink /etc/systemd/system/zfs.target.wants/zfs-import.target → /usr/lib/systemd/system/zfs-import.target.
Created symlink /etc/systemd/system/zfs-volumes.target.wants/zfs-volume-wait.service → /usr/lib/systemd/system/zfs-volume-wait.service.

  Installieren          : kernel-devel-5.15.6-100.fc34.x86_64                                                                                                                                      204/204 
  Ausgeführtes Scriptlet: kernel-devel-5.15.6-100.fc34.x86_64                                                                                                                                      204/204 
  Ausgeführtes Scriptlet: zfs-2.1.1-1.fc34.x86_64                                                                                                                                                  204/204 
  Ausgeführtes Scriptlet: kernel-devel-5.15.6-100.fc34.x86_64   

But as you can see this will fail because the kernel-devel becomes installed after ZFS. Thus the ZFS installation fails. And WHY THE HELL is this important information that the installation failed NOT MARKED RED so everyone can see this within this 100drets of terminal lines. I installed Fedora now for the third time not having seen this message before and wondering about the following error when executing modprobe:

modprobe: FATAL: Module zfs not found in directory /lib/modules/5.15.6-100.fc34.x86_64

I wasted a hole day on getting ZFS working again now and moved back to Fedora 34 finally because it is not working with Fedora 35 anymore. So PLEASE update the documentation or even better the install routine if possible. I am getting to old for this linux frickelzeug.

@Moerten85 Moerten85 added the Type: Defect Incorrect behavior (e.g. crash, hang) label Dec 4, 2021
@Moerten85
Copy link
Author

Yeah it's like I said. I did a

dnf remove ZFS

and

dnf install -y kernel-devel zfs

again -> Same error as before. Then I did the following

dnf install -y kernel-devel
dnf install -y ZFS

with separated calls and it worked. Unbelievable. AM I THE FIRST PERSON INSTALLING ZFS OR WHAT!

@Moerten85
Copy link
Author

PS: I am wondering why kernel-devel is not a dependency of the ZFS package. You can install ZFS without kernel-devel what will fail for sure.

@svde
Copy link

svde commented Dec 5, 2021

kernel-devel is required by zfs-dkms:

$ rpm -qR zfs-dkms-2.1.1-1.fc34.noarch | grep kernel
kernel-devel >= 3.10
kernel-devel <= 5.14.999

To be safe, install kernel-devel first (as you already mentioned).

@tyll
Copy link
Contributor

tyll commented Dec 10, 2021

Unfortunately @Moerten85 did not publish the lines preceeding the error message but looking at https://github.com/openzfs/zfs/blob/master/rpm/generic/zfs-dkms.spec.in it seems to me that the specfile is missing the Requires(post) dependency declarations for all the tools that are needed in %post and probably also dependencies for %preun delcared with Requires(preun) (probably here only gawk and dkms).

@behlendorf behlendorf added the Type: Documentation Indicates a requested change to the documentation label Dec 10, 2021
@tyll
Copy link
Contributor

tyll commented Dec 10, 2021

@behlendorf as I mentioned in my previous comment, this does not look like a documentation issue but incorrect dependency declarations in the spec file dnf/yum is capable of ensuring that packages are installed in the correct order when it gets the correct information.

tyll added a commit to tyll/zfs that referenced this issue Dec 10, 2021
To ensure that the necessary packages are available during the %post and
%preun scriptlets, require them properly.

Fixes openzfs#12822

Signed-off-by: Till Maas <opensource@till.name>
@tyll
Copy link
Contributor

tyll commented Dec 10, 2021

@behlendorf please see #12832

@behlendorf
Copy link
Contributor

behlendorf commented Dec 10, 2021

@tyll thanks for the fix. I didn't mean to imply this was solely a documentation issue, just that the related documentation should also be revisited. I've also gone ahead and opened #12833 to track some additional warnings I observed when installing the packages.

behlendorf pushed a commit that referenced this issue Dec 12, 2021
To ensure that the necessary packages are available during the %post and
%preun scriptlets, require them properly.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Till Maas <opensource@till.name>
Closes #12822
Closes #12832
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Dec 13, 2021
To ensure that the necessary packages are available during the %post and
%preun scriptlets, require them properly.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Till Maas <opensource@till.name>
Closes openzfs#12822
Closes openzfs#12832
gmelikov pushed a commit to openzfs/openzfs-docs that referenced this issue Dec 15, 2021
Closes #238
Also see openzfs/zfs#12822

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
To ensure that the necessary packages are available during the %post and
%preun scriptlets, require them properly.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Till Maas <opensource@till.name>
Closes openzfs#12822
Closes openzfs#12832
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
To ensure that the necessary packages are available during the %post and
%preun scriptlets, require them properly.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Till Maas <opensource@till.name>
Closes openzfs#12822
Closes openzfs#12832
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang) Type: Documentation Indicates a requested change to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants