feat: set_hostname through OMV's own database #11

Merged
christianmanivong merged 1 commits from feat/set-hostname into main 2026-10-29 22:17:35 +00:00
Owner

set_hostname() the way OMV's web UI renames the NAS, instead of the napalm-linux rename it inherits since NAPALM/napalm-linux#45 (OMV regenerates /etc/hostname and /etc/hosts from conf.system.network.dns, so that one would not last).

  • Network.setGeneralSettings — an FQDN sets the domain too, a bare name keeps it
  • Config.applyChanges with an explicit module list: the modules the rename made dirty, plus the hostname modules (hostname, hosts, postfix, avahi, samba, proftpd, systemdnetworkd) that already were. Other pending web-UI changes stay pending — on netOrk's test NAS apt and rsyslog were pending at the time.
  • RFC 1123 validation before anything runs

Checked read-only against OMV 8.6.0 on a real NAS (getGeneralSettings, the RPC sources of setGeneralSettings/applyChanges, the modules listening to conf.system.network.dns). Not renamed live, on purpose.

Tests: 21 passed, also against napalm-linux 0.15.0 (the floor); ruff, mypy, ratchet, napalm-standard check green locally. netOrk side: NetOrk/netork#1671.

`set_hostname()` the way OMV's web UI renames the NAS, instead of the napalm-linux rename it inherits since NAPALM/napalm-linux#45 (OMV regenerates `/etc/hostname` and `/etc/hosts` from `conf.system.network.dns`, so that one would not last). - `Network.setGeneralSettings` — an FQDN sets the domain too, a bare name keeps it - `Config.applyChanges` with an explicit module list: the modules the rename made dirty, plus the hostname modules (`hostname`, `hosts`, `postfix`, `avahi`, `samba`, `proftpd`, `systemdnetworkd`) that already were. Other pending web-UI changes stay pending — on netOrk's test NAS `apt` and `rsyslog` were pending at the time. - RFC 1123 validation before anything runs Checked read-only against OMV 8.6.0 on a real NAS (`getGeneralSettings`, the RPC sources of `setGeneralSettings`/`applyChanges`, the modules listening to `conf.system.network.dns`). Not renamed live, on purpose. Tests: 21 passed, also against napalm-linux 0.15.0 (the floor); ruff, mypy, ratchet, `napalm-standard check` green locally. netOrk side: NetOrk/netork#1671.
christianmanivong added 1 commit 2026-10-29 22:11:20 +00:00
feat: set_hostname through OMV's own database
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / lowest (pull_request) Successful in 26s
driver / security (pull_request) Successful in 1m9s
driver / build (pull_request) Successful in 31s
driver / test (3.12) (pull_request) Successful in 1m9s
CI / driver (pull_request) Successful in 1m9s
driver / publish (pull_request) Skipped
de8f041100
napalm-linux now renames a host through hostnamectl, /etc/hostname and
/etc/hosts (NAPALM/napalm-linux#45). OMV regenerates those files from
conf.system.network.dns on its next apply, so the inherited rename would
not last.

set_hostname() goes where OMV's web UI goes: Network.setGeneralSettings
(an FQDN sets the domain too, a bare name keeps it), then
Config.applyChanges with an explicit module list -- the modules the
rename made dirty, plus the hostname modules that already were. Changes
someone left pending in the web UI stay pending. Checked against the RPC
sources of OMV 8.6 (rpc/network.inc, rpc/config.inc).
christianmanivong merged commit 28e4a2a6e2 into main 2026-10-29 22:17:35 +00:00
christianmanivong deleted branch feat/set-hostname 2026-10-29 22:17:35 +00:00
Sign in to join this conversation.