Files
napalm-openmediavault/CHANGELOG.md
T
Christian Manivong deb233617c
driver / standard (pull_request) Successful in 21s
driver / lint (pull_request) Successful in 18s
driver / types (pull_request) Successful in 1m17s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / test (3.13) (pull_request) Successful in 1m7s
driver / lowest (pull_request) Successful in 42s
driver / build (pull_request) Successful in 51s
driver / security (pull_request) Successful in 1m35s
CI / driver (pull_request) Successful in 3m26s
driver / publish (pull_request) Skipped
fix(disks): raise on a failed lsblk, warn on failed smartctl calls
get_disks swallowed a failed or garbled lsblk and returned [], the
answer for a NAS without disks, so every disk vanished on a transient
error. It now raises CommandErrorException; a failed /proc/mdstat read
raises too instead of dropping every pool.

A smartctl call that timed out, was refused by sudo or could not open
the device was logged at debug level and read like a disk without
SMART. It is now logged as a warning with the reason (exit status bits
0 and 1; the disk-state bits 2-7 are not a failed call).

A disk whose verdict passed but that counts reallocated, pending or
offline-uncorrectable sectors (ATA), grown defects (SAS), or sets a
critical warning or counts media errors (NVMe) is reported as
"warning", as the contract allows.

get_disks shrinks below its baseline entries, which are tightened.

Closes #16
2026-11-02 08:42:48 +01:00

4.3 KiB
Raw Blame History

Changelog

All notable changes to this driver. The format follows Keep a Changelog, versions follow Semantic Versioning.

[Unreleased]

Added

  • netOrk's own account with a fixed uid is not made on OMV yet (NetOrk/netork#1817): _account_create_with_uid raises NotImplementedError, as the keys go through UserMgmt, which knows only the users it made.
  • Personal accounts the way OMV's web UI makes them (NetOrk/netork#1793), on top of napalm-linux's get_local_accounts(), add_local_account() and lock_local_account(). OMV's sshd lets in only root and _ssh, and OMV keeps a user's keys in its own database, deploying them to /var/lib/openmediavault/ssh/authorized_keys/<user>. So a new account is made by UserMgmt.setUser in _ssh, an account made outside OMV joins _ssh when it is opened, and keys are added and removed through setUser. Each call applies the modules it made dirty (postfix, ssh) and nothing else: changes left pending in the web UI stay pending. setUser takes a plain password, which netOrk does not have, so the hash is set with usermod -p. Like the web UI, setUser gives the account OMV's primary group users. Checked on a fresh OMV 8 (Debian 13) with the real driver over SSH. Requires the napalm-device-types and napalm-linux releases with personal accounts.
  • set_hostname() the way OMV's web UI renames the NAS: Network.setGeneralSettings (an FQDN sets the domain too, a bare name keeps it), then Config.applyChanges for the modules the rename made dirty plus the hostname modules already dirty. Changes left pending in the web UI are not deployed with it. Replaces the inherited napalm-linux rename (NAPALM/napalm-linux#45), whose /etc/hostname and /etc/hosts OMV would regenerate on its next apply.

Changed

  • Python 3.12 is the floor (requires-python = ">=3.12"): netOrk runs every driver on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6).

Fixed

  • get_disks() reports each disk's SMART verdict: healthy when smartctl's overall self-assessment passed (SCSI/SAS: health status OK), failed when it failed or a SCSI disk predicts a failure, unknown only when the disk gives none. The driver asked smartctl without -H, which never prints the verdict: a disk read unknown, and an ATA disk with an attribute table read failed from that table's WHEN_FAILED column, whatever its state.
  • get_disks() puts a disk in the md array only when the disk itself or one of its partitions is a member: sda no longer joins the array of sdaa1, nor nvme0n1 that of nvme0n11. /proc/mdstat is read once per call instead of once per disk.
  • get_disks() reports a SCSI/SAS disk's temperature (Current Drive Temperature); it read -1 for every SAS disk. A disk that prints 0 C there, as QEMU's virtual disks do, still reads -1.
  • get_disks() raises CommandErrorException when lsblk fails or prints no device list, and lets a failed /proc/mdstat read raise; it returned [], the answer for a NAS without disks, so every disk vanished on a transient error (#16).
  • get_disks() reports warning for a disk whose verdict passed but that counts lost or unreadable sectors: ATA reallocated, pending or offline-uncorrectable sectors, SAS grown defects, an NVMe critical-warning flag or NVMe media errors (#16).
  • A failed smartctl call (timeout, sudo refused, device not opened) is logged at warning level with the reason; it was logged at debug level and looked like a disk without SMART. The disk still reads unknown (#16).

[0.3.0] - 2026-10-23

The first release on PyPI.

Changed

  • The driver follows the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, mypy, the tests on Python 3.10–3.13 and at the lowest declared versions, bandit, pip-audit and a build check, and a release tag publishes to PyPI. The package now ships py.typed, a README and a LICENSE file. It needs napalm-device-types 4.22.0 and napalm-linux 0.15.0. Python 3.9 is no longer supported; napalm-device-types never ran on it.
  • Failures the driver deliberately ignores (the OpenMediaVault version, smartctl for one disk, /proc/mdstat, mdadm --detail, a shared folder lookup) are now logged at debug level.