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

zfs: 2.2.0 -> 2.2.1; zfsUnstable: 2.2.1-unstable-2023-10-21 -> 2.2.1 #269097

Merged
merged 2 commits into from
Nov 26, 2023

Conversation

amarshall
Copy link
Member

@amarshall amarshall commented Nov 22, 2023

Description of changes

https://github.com/openzfs/zfs/releases/tag/zfs-2.2.1

Notably:

We recommend that anyone running zfs-2.2.0 to please update to this release. Gentoo users have identified a block cloning bug (openzfs/zfs#15526) that can result in data corruption in zfs-2.2.0. To workaround this, zfs-2.2.1 disables block cloning by default (see openzfs/zfs#15529 and openzfs/zfs@479dca5). Users running the 2.1.x branch or older are unaffected, as block cloning is a 2.2.x-only feature.

Things done

nix-build -A zfs.passthru.tests, and am also running with this patch on x86_64-linux.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Priorities

Add a 👍 reaction to pull requests you find important.

Copy link
Contributor

@adamcstephens adamcstephens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This release adds support for 6.6 kernels. Please update the versions above in this same file.

@amarshall
Copy link
Member Author

@adamcstephens Done! FYI I am also running nixpkgs-review, but needs a bit longer to complete.

@amarshall
Copy link
Member Author

nixpkgs-review output
71 packages updated:
appvm-unstable booster ceph ceph ceph-client ceph-csi check_zfs collectd diffoscope docker-machine-kvm docker-machine-kvm2 easysnap-unstable gnome-boxes guestfs-tools libguestfs libguestfs librenms libvirt libvirt-glib mgmt-unstable minikube minishift multipass nixops-unstable ocaml-libvirt partitionmanager perl5.36.1-Sys-Virt perl5.38.0-Sys-Virt python3.10-guestfs python3.10-libvirt python3.10-py-libzfs python3.11-guestfs python3.11-libvirt python3.11-py-libzfs qemu ruby3.1.4-ruby-libvirt ruby3.2.2-ruby-libvirt ruby3.3.0-preview3-ruby-libvirt samba sanoid vagrant virt-manager virt-manager-qt virt-top virt-viewer linuxKernel.packages.linux_4_19_hardened.zfs (2.2.0-4.19.297 → 2.2.1-4.19.297) linuxKernel.packages.linux_4_19.zfs (2.2.0-4.19.299 → 2.2.1-4.19.299) linuxKernel.packages.linux_5_10_hardened.zfs (2.2.0-5.10.199 → 2.2.1-5.10.199) linuxKernel.packages.linux_5_10.zfs (2.2.0-5.10.201 → 2.2.1-5.10.201) linuxKernel.packages.linux_5_15_hardened.zfs (2.2.0-5.15.137 → 2.2.1-5.15.137) linuxKernel.packages.linux_5_15.zfs (2.2.0-5.15.139 → 2.2.1-5.15.139) linuxKernel.packages.linux_5_4_hardened.zfs (2.2.0-5.4.259 → 2.2.1-5.4.259) linuxKernel.packages.linux_5_4.zfs (2.2.0-5.4.261 → 2.2.1-5.4.261) linuxKernel.packages.linux_hardened.zfs (2.2.0-6.1.61 → 2.2.1-6.1.61) linuxKernel.packages.linux_6_1_hardened.zfs (2.2.0-6.1.61 → 2.2.1-6.1.61) linuxKernel.packages.linux_xanmod.zfs (2.2.0-6.1.62 → 2.2.1-6.1.62) linuxKernel.packages.linux_libre.zfs (2.2.0-6.1.63 → 2.2.1-6.1.63) linuxKernel.packages.linux_6_1.zfs (2.2.0-6.1.63 → 2.2.1-6.1.63) linuxKernel.packages.linux_6_5_hardened.zfs (2.2.0-6.5.10 → 2.2.1-6.5.10) linuxKernel.packages.linux_lqx.zfs (2.2.0-6.5.11 → 2.2.1-6.5.11) linuxKernel.packages.linux_xanmod_latest.zfs (2.2.0-6.5.11 → 2.2.1-6.5.11) linuxKernel.packages.linux_xanmod_stable.zfs (2.2.0-6.5.11 → 2.2.1-6.5.11) linuxKernel.packages.linux_6_5.zfs (2.2.0-6.5.12 → 2.2.1-6.5.12) linuxKernel.packages.linux_testing_bcachefs.zfs (2.2.0-6.5.12-bcachefs-unstable-2023-06-28 → 2.2.1-6.5.12-bcachefs-unstable-2023-06-28) linuxKernel.packages.linux_zen.zfs (2.2.0-6.6.1 → 2.2.1-6.6.1) linuxKernel.packages.linux_6_6.zfs (2.2.0-6.6.2 → 2.2.1-6.6.2) linuxKernel.packages.linux_latest_libre.zfs (2.2.0-6.6.2 → 2.2.1-6.6.2) zfs (2.2.0 → 2.2.1) zfstools zpool-auto-expand-partitions zxfer

$ nix build --nix-path nixpkgs=/home/amarshall/.cache/nixpkgs-review/rev-3ac3a21f7918b09440debc526a4a3003d6f9edaa/nixpkgs nixpkgs-overlays=/run/user/1000/tmpjnuj9di1 --extra-experimental-features nix-command no-url-literals --no-link --keep-going --no-allow-import-from-derivation --option build-use-sandbox relaxed -f /home/amarshall/.cache/nixpkgs-review/rev-3ac3a21f7918b09440debc526a4a3003d6f9edaa/build.nix -j3
91 packages built:
appvm booster ceph ceph-client ceph-csi ceph.dev ceph.doc libceph ceph.man check_zfs collectd diffoscope diffoscope.dist diffoscope.man docker-machine-kvm docker-machine-kvm2 easysnap gnome.gnome-boxes guestfs-tools libguestfs libguestfs-with-appliance librenms libvirt libvirt-glib libvirt-glib.dev libvirt-glib.devdoc linuxKernel.packages.linux_4_19.zfs linuxKernel.packages.linux_4_19_hardened.zfs linuxKernel.packages.linux_5_10.zfs linuxKernel.packages.linux_5_10_hardened.zfs linuxKernel.packages.linux_5_15.zfs linuxKernel.packages.linux_5_15_hardened.zfs linuxKernel.packages.linux_5_4.zfs linuxKernel.packages.linux_5_4_hardened.zfs linuxKernel.packages.linux_6_1.zfs linuxKernel.packages.linux_hardened.zfs linuxKernel.packages.linux_6_5.zfs linuxKernel.packages.linux_6_5_hardened.zfs linuxKernel.packages.linux_6_6.zfs linuxKernel.packages.linux_latest_libre.zfs linuxKernel.packages.linux_libre.zfs linuxKernel.packages.linux_lqx.zfs linuxKernel.packages.linux_testing_bcachefs.zfs linuxKernel.packages.linux_xanmod.zfs linuxKernel.packages.linux_xanmod_latest.zfs linuxKernel.packages.linux_zen.zfs mgmt minikube minishift multipass nixops_unstable nixops_unstable.dist ocamlPackages.ocaml_libvirt partition-manager perl536Packages.SysVirt perl536Packages.SysVirt.devdoc perl538Packages.SysVirt perl538Packages.SysVirt.devdoc python310Packages.guestfs python310Packages.guestfs.dist python310Packages.libvirt python310Packages.libvirt.dist python310Packages.py-libzfs python310Packages.py-libzfs.dist python311Packages.guestfs python311Packages.guestfs.dist python311Packages.libvirt python311Packages.libvirt.dist python311Packages.py-libzfs python311Packages.py-libzfs.dist qemu_full qemu_full.debug qemu_full.ga rubyPackages.ruby-libvirt rubyPackages_3_2.ruby-libvirt rubyPackages_3_3.ruby-libvirt samba4Full samba4Full.dev samba4Full.man sanoid vagrant virt-manager virt-manager-qt virt-manager.dist virt-top virt-viewer zfs zfs.dev zfstools zpool-auto-expand-partitions zxfer


error: build log of '/nix/store/k4xj39lfkmndmp5dk6qi6wr1ylv738i5-zfs-user-2.2.1.drv^*' is not available
error: build log of '/nix/store/k4xj39lfkmndmp5dk6qi6wr1ylv738i5-zfs-user-2.2.1.drv^*' is not available
error: build log of '/nix/store/q1xvfj2v6l63ymdd5ljnks27qrcgpl0v-zfstools-0.3.6.drv^*' is not available

@kirillrdy
Copy link
Member

Result of nixpkgs-review pr 269097 run on x86_64-linux 1

2 packages marked as broken and skipped:
  • libvmi
  • rubyPackages_2_7.ruby-libvirt
91 packages built:
  • appvm
  • booster
  • ceph (ceph-dev)
  • ceph-client
  • ceph-csi
  • ceph.dev (ceph-dev.dev)
  • ceph.doc (ceph-dev.doc)
  • libceph (ceph.lib ,libceph.dev ,libceph.doc ,libceph.lib ,libceph.man)
  • ceph.man (ceph-dev.man)
  • check_zfs
  • collectd
  • diffoscope
  • diffoscope.dist
  • diffoscope.man
  • docker-machine-kvm
  • docker-machine-kvm2
  • easysnap
  • gnome.gnome-boxes
  • guestfs-tools
  • haskellPackages.libvirt-hs
  • haskellPackages.libvirt-hs.doc
  • libguestfs
  • librenms
  • libvirt
  • libvirt-glib
  • libvirt-glib.dev
  • libvirt-glib.devdoc
  • linuxKernel.packages.linux_4_19.zfs (linuxKernel.packages.linux_4_19.zfsStable)
  • linuxPackages_4_19_hardened.zfs (linuxKernel.packages.linux_4_19_hardened.zfs ,linuxPackages_4_19_hardened.zfsStable)
  • linuxKernel.packages.linux_5_10.zfs (linuxKernel.packages.linux_5_10.zfsStable)
  • linuxPackages_5_10_hardened.zfs (linuxKernel.packages.linux_5_10_hardened.zfs ,linuxPackages_5_10_hardened.zfsStable)
  • linuxKernel.packages.linux_5_15.zfs (linuxKernel.packages.linux_5_15.zfsStable)
  • linuxPackages_5_15_hardened.zfs (linuxKernel.packages.linux_5_15_hardened.zfs ,linuxPackages_5_15_hardened.zfsStable)
  • linuxKernel.packages.linux_5_4.zfs (linuxKernel.packages.linux_5_4.zfsStable)
  • linuxPackages_5_4_hardened.zfs (linuxKernel.packages.linux_5_4_hardened.zfs ,linuxPackages_5_4_hardened.zfsStable)
  • linuxPackages.zfs (linuxKernel.packages.linux_6_1.zfs ,linuxPackages.zfsStable)
  • linuxPackages_hardened.zfs (linuxPackages_6_1_hardened.zfs ,linuxPackages_hardened.zfsStable)
  • linuxKernel.packages.linux_6_5.zfs (linuxKernel.packages.linux_6_5.zfsStable)
  • linuxPackages_6_5_hardened.zfs (linuxKernel.packages.linux_6_5_hardened.zfs ,linuxPackages_6_5_hardened.zfsStable)
  • linuxPackages_latest.zfs (linuxKernel.packages.linux_6_6.zfs ,linuxPackages_latest.zfsStable)
  • linuxPackages_latest-libre.zfs (linuxKernel.packages.linux_latest_libre.zfs ,linuxPackages_latest-libre.zfsStable)
  • linuxPackages-libre.zfs (linuxKernel.packages.linux_libre.zfs ,linuxPackages-libre.zfsStable)
  • linuxPackages_lqx.zfs (linuxKernel.packages.linux_lqx.zfs ,linuxPackages_lqx.zfsStable)
  • linuxPackages_testing_bcachefs.zfs (linuxKernel.packages.linux_testing_bcachefs.zfs ,linuxPackages_testing_bcachefs.zfsStable)
  • linuxPackages_xanmod.zfs (linuxKernel.packages.linux_xanmod.zfs ,linuxPackages_xanmod.zfsStable)
  • linuxPackages_xanmod_latest.zfs (linuxKernel.packages.linux_xanmod_latest.zfs ,linuxPackages_xanmod_latest.zfsStable ,linuxPackages_xanmod_stable.zfs ,linuxPackages_xanmod_stable.zfsStable)
  • linuxPackages_zen.zfs (linuxKernel.packages.linux_zen.zfs ,linuxPackages_zen.zfsStable)
  • mgmt
  • minikube
  • minishift
  • multipass
  • nixops_unstable
  • nixops_unstable.dist
  • partition-manager
  • perl536Packages.SysVirt
  • perl536Packages.SysVirt.devdoc
  • perl538Packages.SysVirt
  • perl538Packages.SysVirt.devdoc
  • python310Packages.guestfs
  • python310Packages.guestfs.dist
  • python310Packages.libvirt
  • python310Packages.libvirt.dist
  • python310Packages.py-libzfs
  • python310Packages.py-libzfs.dist
  • python311Packages.guestfs
  • python311Packages.guestfs.dist
  • python311Packages.libvirt
  • python311Packages.libvirt.dist
  • python311Packages.py-libzfs
  • python311Packages.py-libzfs.dist
  • qemu_full
  • qemu_full.debug
  • qemu_full.ga
  • rubyPackages.ruby-libvirt (rubyPackages_3_1.ruby-libvirt)
  • rubyPackages_3_2.ruby-libvirt
  • rubyPackages_3_3.ruby-libvirt
  • sambaFull (samba4Full)
  • sambaFull.dev (samba4Full.dev)
  • sambaFull.man (samba4Full.man)
  • sanoid
  • vagrant
  • virt-manager
  • virt-manager-qt
  • virt-manager.dist
  • virt-top
  • virt-viewer
  • zfs (zfsStable)
  • zfs.dev (zfsStable.dev)
  • zfstools
  • zpool-auto-expand-partitions
  • zxfer

@Mic92
Copy link
Member

Mic92 commented Nov 22, 2023

We also should bump unstable to the same version: https://github.com/NixOS/nixpkgs/blob/3ac3a21f7918b09440debc526a4a3003d6f9edaa/pkgs/os-specific/linux/zfs/unstable.nix
Otherwise it's actually older than stable.

@Mic92
Copy link
Member

Mic92 commented Nov 22, 2023

From 40e9f366584d143e1b748e95c0b668b4842e7499 Mon Sep 17 00:00:00 2001                                                                
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <[email protected]>                                                                            
Date: Wed, 22 Nov 2023 09:23:11 +0100                                                                                                 
Subject: [PATCH] zfsUnstable: 2.2.1-unstable-2023-10-21 -> 2.2.1                                                                                          
MIME-Version: 1.0                                                                                                                     
Content-Type: text/plain; charset=UTF-8                                                                                               
Content-Transfer-Encoding: 8bit                                                                                                       
                                                                                                                                      
Signed-off-by: Jörg Thalheim <[email protected]>                                                                                      
---                                                                                                                                   
 pkgs/os-specific/linux/zfs/unstable.nix | 9 ++++-----                                                                                
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/pkgs/os-specific/linux/zfs/unstable.nix b/pkgs/os-specific/linux/zfs/unstable.nix
index 9c7e14c31bf3..18d1ae7f9d17 100644
--- a/pkgs/os-specific/linux/zfs/unstable.nix
+++ b/pkgs/os-specific/linux/zfs/unstable.nix
@@ -12,21 +12,20 @@ in
 callPackage ./generic.nix args {
   # check the release notes for compatible kernels
   kernelCompatible = if stdenv'.isx86_64 || removeLinuxDRM
-    then kernel.kernelOlder "6.6"
+    then kernel.kernelOlder "6.7"
     else kernel.kernelOlder "6.2";
 
   latestCompatibleLinuxPackages = if stdenv'.isx86_64 || removeLinuxDRM
-    then linuxKernel.packages.linux_6_5
+    then linuxKernel.packages.linux_6_6
     else linuxKernel.packages.linux_6_1;
 
   # this package should point to a version / git revision compatible with the latest kernel release
   # IMPORTANT: Always use a tagged release candidate or commits from the
   # zfs-<version>-staging branch, because this is tested by the OpenZFS
   # maintainers.
-  version = "2.2.1-unstable-2023-10-21";
-  rev = "95785196f26e92d82cf4445654ba84e4a9671c57";
+  version = "2.2.1";
 
-  sha256 = "sha256-s1sdXSrLu6uSOmjprbUa4cFsE2Vj7JX5i75e4vRnlvg=";
+  sha256 = "sha256-2Q/Nhp3YKgMCLPNRNBq5r9U4GeuYlWMWAsjsQy3vFW4=";
 
   isUnstable = true;
 }
-- 
2.42.0

@amarshall
Copy link
Member Author

Added zfsUnstable change, ran zfsUnstable.passthru.tests (ofc drvs are effectively identical).

@amarshall amarshall changed the title zfs: 2.2.0 -> 2.2.1 zfs: 2.2.0 -> 2.2.1; zfsUnstable: 2.2.1-unstable-2023-10-21 -> 2.2.1 Nov 22, 2023
@RaitoBezarius
Copy link
Member

Our tests are not passing, can someone look into them?

@amarshall
Copy link
Member Author

zfs{,unstable}.passthru.tests pass for me on x86_64-linux, so I cannot replicate the ofborg failure.

@eadwu
Copy link
Member

eadwu commented Nov 23, 2023

Looks like it might be still broken and/or even more broken.
openzfs/zfs#15533

The fix appears to maybe be unrelated to block cloning (zfs.zfs_dmu_offset_next_sync=0).

It may be better to inject that parameter in since it is incompatible with 2.1 at this point (it appears bug may also be present in 2.1 as well).

@amarshall
Copy link
Member Author

@eadwu Unfortunately at least one person indicated that tunable did not fix the errors they saw.

For me personally, I’m switching to 2.2.0 with patches to disable block cloning only. We could do the same.

@Mic92
Copy link
Member

Mic92 commented Nov 23, 2023

zfs{,unstable}.passthru.tests pass for me on x86_64-linux, so I cannot replicate the ofborg failure.

Those tests also worked for me yesterday.

@eadwu
Copy link
Member

eadwu commented Nov 23, 2023

Ah sorry, the tuneable is meant to resolve the data corruption from block cloning (if it is from block cloning) openzfs/zfs#15526 (comment). But yeah disabling block cloning as well is probably better at this point.

v2.2.1 surfaces another problem (on a specific setup) which does not seem to be related.

@RaitoBezarius
Copy link
Member

I opened #269452 related to this. If you want to continue maintaining the 2.2.x series, please step up in that PR so I can add you. I am not planning to address the 2.2.x series situation as a maintainer of ZFS as I am effectively removing myself from 2.2.x.

@amarshall
Copy link
Member Author

I’ve opened #269465 as an alternative to this PR that only applies the patches to disable block cloning onto 2.2.0 for zfsStable.

@gaykitty
Copy link
Contributor

@qubitnano
Copy link
Contributor

qubitnano commented Nov 25, 2023

2.2.1 affects users with zfs on LUKS, see openzfs/zfs#15533

Reverting the commit mentioned in openzfs/zfs#15533 (comment) seems to fix it but only the user who bisected it confirmed it so far.

Until that gets more testing or investigation I would be more inclined for a 2.2.0 with the patches discussed from openzfs/zfs#15526

@adamcstephens

This comment was marked as duplicate.

Copy link
Contributor

@adamcstephens adamcstephens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a minimum, I think we need to bump this version to disable block cloning. Then if we want to patch, my thoughts are here: #269465 (comment)

amarshall and others added 2 commits November 26, 2023 12:26
Now supports Kernel 6.6.
amarshall added a commit to amarshall/nixpkgs that referenced this pull request Nov 26, 2023
This helps mitigate a data corruption bug. This was previously defaulted
to zero prior to upstream commit
05b3eb6d232009db247882a39d518e7282630753, and it is already a tunable,
so doing this seems safe. Initially data corruption was thought to be
introduced with v2.2, but further upstream investigation currently
believes that changes in v2.2 only exacerbated the issue that already
existed.

A longer-term fix is likely to be
openzfs/zfs#15571, though that is not yet
merged. The zfs_2_1 package has already backported that, so do not apply
the tunable default change there.

Positioning of `extraPatches` is to avoid merge conflicts with
NixOS#269097.

Patch is nearly identical to the [Gentoo][1] patch, but better patch
formatting.

See openzfs/zfs#11900
See openzfs/zfs#15526

[1]: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/zfs-kmod/files/zfs-kmod-2.2.1-Disable-zfs_dmu_offset_next_sync-tunable-by-default.patch
@amarshall
Copy link
Member Author

I agree; hopefully the upstream PR to fix will be merged early this week and we can backport then.

In the meantime I’ve opened #270275 to change the tunable default only, and it is conflict-free with this PR so either can go first. I’ve closed #269465 as well since that doesn’t seem the best course anymore. This PR has also been updated to resolve merge conflicts with master.

Copy link
Contributor

@adamcstephens adamcstephens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been running this 2.2.1 since originally opened. Waiting on last test run to complete.

@adamcstephens adamcstephens merged commit 45827fa into NixOS:master Nov 26, 2023
20 of 22 checks passed
Copy link
Contributor

Backport failed for release-23.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-23.11
git worktree add -d .worktree/backport-269097-to-release-23.11 origin/release-23.11
cd .worktree/backport-269097-to-release-23.11
git switch --create backport-269097-to-release-23.11
git cherry-pick -x 365cc96597f674e9c1c70eb08fc84f0d2f9b25b3 55b737831baa6080203ec490a8bfe5f9df420ae0

@amarshall amarshall deleted the zfs-221 branch November 26, 2023 23:15
adamcstephens pushed a commit to adamcstephens/nixpkgs that referenced this pull request Nov 27, 2023
This helps mitigate a data corruption bug. This was previously defaulted
to zero prior to upstream commit
05b3eb6d232009db247882a39d518e7282630753, and it is already a tunable,
so doing this seems safe. Initially data corruption was thought to be
introduced with v2.2, but further upstream investigation currently
believes that changes in v2.2 only exacerbated the issue that already
existed.

A longer-term fix is likely to be
openzfs/zfs#15571, though that is not yet
merged. The zfs_2_1 package has already backported that, so do not apply
the tunable default change there.

Positioning of `extraPatches` is to avoid merge conflicts with
NixOS#269097.

Patch is nearly identical to the [Gentoo][1] patch, but better patch
formatting.

See openzfs/zfs#11900
See openzfs/zfs#15526

[1]: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/zfs-kmod/files/zfs-kmod-2.2.1-Disable-zfs_dmu_offset_next_sync-tunable-by-default.patch

(cherry picked from commit 9670ddc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants