feat: file shares and network mounts, the kernel's NFS server, 4.58.0 (NetOrk/netork#3104) #147

Merged
christianmanivong merged 2 commits from feature/share-endpoints into main 2026-12-03 17:47:21 +00:00
Owner

For NetOrk/netork#3104: a file server's shares become endpoints of its services, and a host that mounts a share depends on it.

  • PosixSharesMixin (get_shares): an ordinary Linux server's NFS exports (/var/lib/nfs/etab, one share per export path, one access rule per client) and Samba shares (testparm -s; read-only unless read only = No, Samba's default). Each share names the service that serves it (nfs-server, smbd, smb on Red Hat); a share whose server is not installed is left out. No root needed.
  • NASShareDict: optional service, export (what a client names), access (ShareAccessDict) and guest.
  • NetworkMountsMixin (get_network_mounts): the NFS exports and SMB shares a host has mounted, from /proc/self/mounts, with the address the kernel connected to (addr=).
  • The kernel's NFS server: get_services reports nfs-server running while its unit is active (it stays active (exited) with no process while nfsd serves); get_listening_sockets names it as the unit of the sockets /proc/fs/nfsd/portlist lists.

Checked against a real OpenMediaVault 8.8 host: 4 exports, 11 Samba shares, nfs-server running, port 2049 named. Version 4.58.0; tag v4.58.0 after the merge.

For NetOrk/netork#3104: a file server's shares become endpoints of its services, and a host that mounts a share depends on it. - **`PosixSharesMixin`** (`get_shares`): an ordinary Linux server's NFS exports (`/var/lib/nfs/etab`, one share per export path, one access rule per client) and Samba shares (`testparm -s`; read-only unless `read only = No`, Samba's default). Each share names the service that serves it (`nfs-server`, `smbd`, `smb` on Red Hat); a share whose server is not installed is left out. No root needed. - **`NASShareDict`**: optional `service`, `export` (what a client names), `access` (`ShareAccessDict`) and `guest`. - **`NetworkMountsMixin`** (`get_network_mounts`): the NFS exports and SMB shares a host has mounted, from `/proc/self/mounts`, with the address the kernel connected to (`addr=`). - **The kernel's NFS server**: `get_services` reports `nfs-server` running while its unit is active (it stays `active (exited)` with no process while nfsd serves); `get_listening_sockets` names it as the unit of the sockets `/proc/fs/nfsd/portlist` lists. Checked against a real OpenMediaVault 8.8 host: 4 exports, 11 Samba shares, `nfs-server` running, port 2049 named. Version 4.58.0; tag `v4.58.0` after the merge.
christianmanivong added 1 commit 2026-12-03 17:43:32 +00:00
feat: file shares and network mounts, the kernel's NFS server, 4.58.0 (NetOrk/netork#3104)
driver / lint (pull_request) Successful in 17s
driver / standard (pull_request) Failing after 20s
driver / lowest (pull_request) Successful in 38s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 1m19s
driver / test (3.13) (pull_request) Successful in 1m9s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 56s
CI / driver (pull_request) Failing after 1m55s
driver / publish (pull_request) Skipped
879f5fe777
- PosixSharesMixin (get_shares): an ordinary Linux server's NFS exports from the
  kernel's export table and its Samba shares from testparm -s, each naming the
  service that serves it.
- NASShareDict: optional service, export, access (ShareAccessDict) and guest.
- NetworkMountsMixin (get_network_mounts): the NFS exports and SMB shares a host
  has mounted, from /proc/self/mounts, with the address the kernel connected to.
- get_services reports nfs-server running while its unit is active
  (KERNEL_SERVED_UNITS); get_listening_sockets names it as the unit of the
  sockets /proc/fs/nfsd/portlist lists.
christianmanivong added 1 commit 2026-12-03 17:45:07 +00:00
refactor: the share shapes in share_models, Samba's parse in parts (NetOrk/netork#3104)
driver / lint (pull_request) Successful in 12s
driver / standard (pull_request) Successful in 16s
driver / lowest (pull_request) Successful in 37s
driver / types (pull_request) Successful in 55s
driver / test (3.13) (pull_request) Successful in 1m7s
driver / build (pull_request) Successful in 25s
driver / test (3.12) (pull_request) Successful in 1m16s
driver / security (pull_request) Successful in 59s
CI / driver (pull_request) Successful in 1m56s
driver / publish (pull_request) Skipped
dd1b74a010
The standard's ratchet: models.py may not grow, and a new function stays within
complexity 10. NASShareDict and ShareAccessDict move to share_models; models
re-exports both, so every import keeps working.
christianmanivong merged commit 98041be694 into main 2026-12-03 17:47:21 +00:00
christianmanivong deleted branch feature/share-endpoints 2026-12-03 17:47:21 +00:00
Sign in to join this conversation.