[Bug 287036] make 404.status-zfs return error when pools have problems

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 24 May 2025 06:54:54 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287036

Volodymyr Kostyrko <arcade@b1t.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #260673|0                           |1
        is obsolete|                            |

--- Comment #1 from Volodymyr Kostyrko <arcade@b1t.name> ---
Created attachment 260674
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=260674&action=edit
set rc=3 when pool is DEGRADED or has UNAVAIL components, and also when there
are damaged files

Add check for damaged data like in:
https://forum.proxmox.com/threads/zfs-errors.133388/:

```
root@pve:/# zpool status -v
  pool: rpool
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
  scan: scrub in progress since Sat Sep  9 10:05:15 2023
        7.84G scanned at 50.5M/s, 2.77G issued at 17.8M/s, 7.84G total
        0B repaired, 35.32% done, 00:04:51 to go
config:


        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          sda3      ONLINE       0     0    12


errors: Permanent errors have been detected in the following files:


        rpool/ROOT/pve-1:<0x25899>
```

-- 
You are receiving this mail because:
You are the assignee for the bug.