FreeNAS/freenas c67173f — tests/sharing_protocols/nvmet test_nvmet_tcp.py

Add tests for FILE namespace size handling

- test__file_namespace_size_alignment
- test__file_namespace_existing_file_size
DeltaFile
+106-0tests/sharing_protocols/nvmet/test_nvmet_tcp.py
+106-01 files

FreeNAS/freenas ae7b954 — tests/sharing_protocols/nvmet test_nvmet_tcp.py

Add tests for FILE namespace size handling
- test__file_namespace_size_alignment
- test__file_namespace_existing_file_size
DeltaFile
+106-0tests/sharing_protocols/nvmet/test_nvmet_tcp.py
+106-01 files

FreeNAS/freenas 96223b9 — src/middlewared/middlewared/plugins/nvmet namespace.py

Use actual file size when resizing FILE namespaces

save_file decided whether a filesize change was an expansion by comparing
against the stored filesize. That value is None for a namespace created
from an existing file without a filesize, which made a later resize fail
with a TypeError. It can also be stale: if it was smaller than the real
file, a requested "expansion" would truncate the file and lose data.

Compare against the file's actual size instead, and record that size when
an existing file is used without a filesize being supplied.
DeltaFile
+13-7src/middlewared/middlewared/plugins/nvmet/namespace.py
+13-71 files

FreeNAS/freenas a219433 — src/middlewared/middlewared/plugins/nvmet constants.py namespace.py, src/middlewared/middlewared/utils/nvmet spdk.py

Require FILE namespace sizes to be a multiple of 512 bytes

SPDK's bdev_aio_create rejects a file whose size is not a multiple of
the block size, so such a namespace failed to attach. Reject these at
create/update time for both targets: check the size of an existing file
when it is first used, and any new or changed filesize.

Add NVMET_FILE_BLOCK_SIZE and use it for the SPDK bdev_aio_create
default block size as well.
DeltaFile
+22-1src/middlewared/middlewared/plugins/nvmet/namespace.py
+4-0src/middlewared/middlewared/plugins/nvmet/constants.py
+2-1src/middlewared/middlewared/utils/nvmet/spdk.py
+28-23 files

FreeNAS/freenas 2092072 — src/middlewared/middlewared/utils/nvmet kernel.py

Isolate per-item failures in kernel nvmet render

The kernel nvmet render steps are nested context managers, so an
OSError from any configfs write propagates through all of them. For
example, a namespace whose device_path cannot be opened makes the write
to enable fail. When that happens:

- remaining namespaces, and any subsystems after the failing one, are
  not processed
- directories created by mkdir earlier in the same pass are left with
  no attributes
- every post-yield delete phase (rmdir/unlink of stale hosts, ports,
  referrals, links and namespaces) is skipped

Because the bad namespace directory remains, every later render takes
the update path, fails again and aborts in the same way. Until the
backing device is fixed or the namespace is removed, any NVMe-oF config
change applies its additions but never its deletions.


    [13 lines not shown]
DeltaFile
+117-55src/middlewared/middlewared/utils/nvmet/kernel.py
+117-551 files

FreeNAS/freenas 075907f — src/middlewared/middlewared/utils/nvmet spdk.py

Isolate per-item failures in SPDK nvmet render

A single bad config item could abort the entire SPDK nvmet render. For
example, a FILE namespace whose size is not a multiple of the block size
makes bdev_aio_create fail with -EINVAL. Because the render steps are
nested context managers, the exception propagated through all of them:

- remaining bdevs were only partially created, in set-iteration order
- no namespaces were attached at all, even for healthy bdevs
- every post-yield delete phase was skipped, leaving stale state
- on HA, the transition of ANA state to optimized was skipped

The failure also recurred on every later render until the bad item was
fixed or removed, and was only visible in middlewared.log.

NvmetConfig.render now runs each add, update and delete through
_apply(). It logs the failing item and records it, and the render
continues. Once all steps have completed, write_config() raises a single
RuntimeError listing every failure, so etc.generate still reports the

    [4 lines not shown]
DeltaFile
+44-12src/middlewared/middlewared/utils/nvmet/spdk.py
+44-121 files

FreeNAS/freenas f8421d3 — src/middlewared/middlewared/plugins/failover_ event.py

Ignore the BACKUP from vrrp_backup's own keepalived restart

vrrp_backup pauses failover event processing, then stops keepalived
to move the VIPs off this node.  Stopping keepalived removes its
fifo, so VrrpFifoThread loses its connection and starts retrying.
Near the end, vrrp_backup starts keepalived again, which reports
BACKUP (init), and then unpauses event processing.

Normally VrrpFifoThread reconnects before the unpause, and that
BACKUP is discarded because events are still paused.  But the first
time the reader loses the fifo, it sleeps for 2 seconds before
retrying.  If vrrp_backup gets from stopping keepalived to unpausing
in less than that, the reader is still asleep at the unpause.  It
reconnects afterwards, reads the BACKUP as a new event, and
vrrp_backup runs a second time.

validate() already ignores a BACKUP while vrrp_backup is running.
Also ignore one after vrrp_backup has completed successfully, using
LAST_EVENT_TYPE.  Because vrrp_backup sets LAST_EVENT_TYPE before

    [4 lines not shown]
DeltaFile
+26-9src/middlewared/middlewared/plugins/failover_/event.py
+26-91 files

FreeNAS/freenas ee81417 — src/middlewared/middlewared/alembic/versions/27.0 2026-11-12_12-00_ntp_nts.py, src/middlewared/middlewared/plugins/ntp crud.py peers.py

NAS-144162 / 28.0.0-BETA.1 / Harden NTP (#19907)

Basically, this commit is adding support for a newer secure way of
updating time. It's a preliminary
step for some WORM-related work in S3 land where we want to basically
ensure that buckets fall
back to being RO if time de-synced or not from secure source.

- Add `nts` to system.ntpserver, rendered as chrony's `nts` option
- Without `force`, probe NTS-KE (TLS 1.3, ALPN ntske/1) and the
negotiated NTP server on save
- Cap `maxpoll` at 21 for NTS servers
- Render `authselectmode prefer` in chrony.conf
- Add system.security `require_nts` (default off), rendered as
`authselectmode require`
- With `require_nts`: refuse enabling without an NTS server, saving
servers without NTS and deleting the last NTS server
- Restart chronyd on both controllers when `require_nts` changes
- Migration: add `ntp_nts` and `require_nts`

    [24 lines not shown]
DeltaFile
+247-0src/middlewared/middlewared/utils/ntp.py
+166-0tests/api2/test_ntpserver_nts.py
+149-0tests/unit/test_nts_ke.py
+110-17src/middlewared/middlewared/plugins/ntp/peers.py
+74-6src/middlewared/middlewared/plugins/ntp/crud.py
+46-0src/middlewared/middlewared/alembic/versions/27.0/2026-11-12_12-00_ntp_nts.py
+792-2320 files not shown
+1,183-6326 files

FreeNAS/freenas 5a5a378 — src/middlewared/middlewared/alembic/versions/27.1 2026-11-10_12-00_scrub_line_breaks.py, src/middlewared/middlewared/api/base line_breaks.py

NAS-145046 / 27.1.0 / Make all string fields single-line by default (by themylogin) (#20209)

`str` now accepts only single-line string by default.

If we need a multiline string, it must be `Multiline[str]` or
`Multiline[NonEmptyString]` or etc.

Original PR: https://github.com/truenas/middleware/pull/20179

---------

Co-authored-by: themylogin <themylogin at gmail.com>
DeltaFile
+326-0src/middlewared/middlewared/alembic/versions/27.1/2026-11-10_12-00_scrub_line_breaks.py
+260-0src/middlewared/middlewared/pytest/unit/api/base/test_line_breaks.py
+127-0tests/api2/test_apps.py
+84-0src/middlewared/middlewared/api/base/line_breaks.py
+27-17src/middlewared/middlewared/api/v27_1_0/ssh.py
+27-17src/middlewared/middlewared/api/v27_0_0/ssh.py
+851-34538 files not shown
+3,643-2,003544 files

FreeNAS/freenas dec91fc — src/middlewared/middlewared/api/v28_0_0 webui_dataset.py, src/middlewared/middlewared/plugins/pool_ dataset_details.py

NAS-145038 / 28.0.0-BETA.1 / Add webui.dataset.details and move pool.dataset.details onto zfs.resource (#20102)

## Context
This adds the machinery the WebUI needs to move off
`pool.dataset.details` without breaking today's contract.
`pool.dataset.details` keeps returning exactly what it returns now, so
the current UI keeps working unchanged, and the new
`webui.dataset.details` is there for the Datasets page to switch to when
it's ready.

- **pool.dataset.details** now gets its data from zfs.resource instead
of the legacy query engine, as part of retiring the pool.dataset
namespace. Its output is unchanged.
- **webui.dataset.details** lives in the webui namespace rather than
zfs.resource. It exists to give the Datasets page everything it shows in
one cheap call: every dataset, plus the shares, VMs, containers, apps
and data protection tasks that use it. That is a join across most of the
plugins that consume storage, and zfs.resource shouldn't depend on its
own consumers.

    [7 lines not shown]
DeltaFile
+261-0src/middlewared/middlewared/plugins/webui/dataset_details.py
+245-0src/middlewared/middlewared/plugins/webui/dataset_consumers.py
+181-0src/middlewared/middlewared/api/v28_0_0/webui_dataset.py
+73-52src/middlewared/middlewared/plugins/pool_/dataset_details.py
+40-0src/middlewared/middlewared/plugins/webui/dataset.py
+26-0tests/api2/test_account_privilege_role.py
+826-522 files not shown
+830-528 files

FreeNAS/freenas 7c996be — src/middlewared/middlewared/plugins/device_ vrrp_events.py, src/middlewared/middlewared/plugins/failover_ event.py

Skip the BACKUP from vrrp_backup's own keepalived restart

vrrp_backup pauses failover events, stops keepalived to move the
VIPs off this node, and starts it again before unpausing.  The
restarted keepalived reports BACKUP (init).  If VrrpFifoThread
reconnects to the fifo after the unpause, which happens when the
time from keepalived stopping to the unpause is less than the
reader's 2 second retry sleep, that BACKUP is processed as a new
event and the whole BACKUP sequence runs a second time.

Drop a BACKUP event when the last failover event was a successful
vrrp_backup.  VrrpEventThread already did this for events arriving
in rapid succession, using LAST_EVENT_TYPE; now it does it for every
BACKUP.  Set LAST_EVENT_TYPE to MASTER when vrrp_master starts
rather than when it succeeds, so that a BACKUP following a MASTER
attempt that failed or was ignored is still processed.
DeltaFile
+17-6src/middlewared/middlewared/plugins/device_/vrrp_events.py
+12-9src/middlewared/middlewared/plugins/failover_/event.py
+29-152 files

FreeNAS/freenas 09335d6 — src/freenas/usr/local/bin truenas-scst-boot.py, src/middlewared/middlewared/etc_files systemd.py

NAS-145201 / 27.0.0 / Keep scst disabled at boot after config upload on HA (by bmeagherix) (#20213)

## Problem

On HA, SCST must not start at boot; middleware starts it from
`vrrp_master` /
`vrrp_backup`. `etc_files/systemd.py` enforced this, but two other paths
could
still leave `scst` enabled at boot:

- **Sync to Peer:** the `config.on_upload` hook re-enabled `scst` on the
STANDBY
just before it rebooted. SCST then started at boot with a stale config,
failed,
  and raced middleware's own start, leaving SCST unloaded and
  `standby_after_start` retrying forever.
- **Upgrade:** `/data/user-services.json` recorded `scst` as enabled, so
the
  installer enabled it in the new boot environment.

    [31 lines not shown]
DeltaFile
+40-0src/freenas/usr/local/bin/truenas-scst-boot.py
+27-0src/middlewared/middlewared/plugins/service_/services/iscsitarget.py
+11-0src/middlewared/middlewared/plugins/iscsi_/alua.py
+6-4src/middlewared/middlewared/plugins/service_/on_config_upload.py
+10-0src/middlewared/middlewared/plugins/service_/services/base_interface.py
+2-7src/middlewared/middlewared/etc_files/systemd.py
+96-112 files not shown
+104-118 files

FreeNAS/freenas 2a25f1a — src/freenas/usr/local/bin truenas-scst-boot.py, src/middlewared/middlewared/etc_files systemd.py

NAS-145201 / 27.1.0 / Keep scst disabled at boot after config upload on HA (by bmeagherix) (#20214)

## Problem

On HA, SCST must not start at boot; middleware starts it from
`vrrp_master` /
`vrrp_backup`. `etc_files/systemd.py` enforced this, but two other paths
could
still leave `scst` enabled at boot:

- **Sync to Peer:** the `config.on_upload` hook re-enabled `scst` on the
STANDBY
just before it rebooted. SCST then started at boot with a stale config,
failed,
  and raced middleware's own start, leaving SCST unloaded and
  `standby_after_start` retrying forever.
- **Upgrade:** `/data/user-services.json` recorded `scst` as enabled, so
the
  installer enabled it in the new boot environment.

    [31 lines not shown]
DeltaFile
+40-0src/freenas/usr/local/bin/truenas-scst-boot.py
+27-0src/middlewared/middlewared/plugins/service_/services/iscsitarget.py
+11-0src/middlewared/middlewared/plugins/iscsi_/alua.py
+6-4src/middlewared/middlewared/plugins/service_/on_config_upload.py
+10-0src/middlewared/middlewared/plugins/service_/services/base_interface.py
+2-7src/middlewared/middlewared/etc_files/systemd.py
+96-112 files not shown
+104-118 files

FreeNAS/freenas 6419515 — src/freenas/usr/local/bin truenas-scst-boot.py, src/middlewared/middlewared/etc_files systemd.py

NAS-145201 / 27.1.0 / Keep scst disabled at boot after config upload on HA (#20185)

On HA, SCST must not start at boot; middleware starts it from
vrrp_master / vrrp_backup.  etc_files/systemd.py enforced this, but
two other paths could still leave `scst` enabled at boot:

- Sync to Peer: the config.on_upload hook re-enabled scst on the
  STANDBY just before it rebooted.  SCST then started at boot with a
  stale config, failed, and raced middleware's own start, leaving
  SCST unloaded and standby_after_start retrying forever.
- Upgrade: /data/user-services.json recorded scst as enabled, so the
  installer enabled it in the new boot environment.

LIO mode has the same issue to a lesser degree: scst should never be
enabled at boot there.

- Add systemd_enabled_units() to services, defaulting to all of a
  service's units, with an iSCSI override that returns none on HA or
  in LIO mode.  Unit state set by etc_files/systemd.py, the

    [14 lines not shown]
DeltaFile
+40-0src/freenas/usr/local/bin/truenas-scst-boot.py
+27-0src/middlewared/middlewared/plugins/service_/services/iscsitarget.py
+11-0src/middlewared/middlewared/plugins/iscsi_/alua.py
+6-4src/middlewared/middlewared/plugins/service_/on_config_upload.py
+10-0src/middlewared/middlewared/plugins/service_/services/base_interface.py
+2-7src/middlewared/middlewared/etc_files/systemd.py
+96-112 files not shown
+104-118 files

FreeNAS/freenas c7ecf5c — src/freenas/usr/local/bin truenas-scst-boot.py, src/middlewared/middlewared/etc_files systemd.py

NAS-145201 / 27.0.0 / Keep scst disabled at boot after config upload on HA (#20185)

On HA, SCST must not start at boot; middleware starts it from
vrrp_master / vrrp_backup.  etc_files/systemd.py enforced this, but
two other paths could still leave `scst` enabled at boot:

- Sync to Peer: the config.on_upload hook re-enabled scst on the
  STANDBY just before it rebooted.  SCST then started at boot with a
  stale config, failed, and raced middleware's own start, leaving
  SCST unloaded and standby_after_start retrying forever.
- Upgrade: /data/user-services.json recorded scst as enabled, so the
  installer enabled it in the new boot environment.

LIO mode has the same issue to a lesser degree: scst should never be
enabled at boot there.

- Add systemd_enabled_units() to services, defaulting to all of a
  service's units, with an iSCSI override that returns none on HA or
  in LIO mode.  Unit state set by etc_files/systemd.py, the

    [14 lines not shown]
DeltaFile
+40-0src/freenas/usr/local/bin/truenas-scst-boot.py
+27-0src/middlewared/middlewared/plugins/service_/services/iscsitarget.py
+11-0src/middlewared/middlewared/plugins/iscsi_/alua.py
+6-4src/middlewared/middlewared/plugins/service_/on_config_upload.py
+10-0src/middlewared/middlewared/plugins/service_/services/base_interface.py
+2-7src/middlewared/middlewared/etc_files/systemd.py
+96-112 files not shown
+104-118 files

FreeNAS/freenas f17479a —

Empty commit to create PR on github.

You should reset it
DeltaFile
+0-00 files

FreeNAS/freenas dbf5874 —

Empty commit to create PR on github.

You should reset it
DeltaFile
+0-00 files

FreeNAS/freenas 499d6d4 — src/freenas/usr/local/bin truenas-scst-boot.py, src/middlewared/middlewared/etc_files systemd.py

NAS-145201 / 28.0.0-BETA.1 / Keep scst disabled at boot after config upload on HA (#20185)

On HA, SCST must not start at boot; middleware starts it from vrrp_master / vrrp_backup. etc_files/systemd.py enforced this, but two other paths could still leave `scst` enabled at boot:

- Sync to Peer: the config.on_upload hook re-enabled scst on the STANDBY just before it rebooted. SCST then started at boot with a stale config, failed, and raced middleware's own start, leaving SCST unloaded and standby_after_start retrying forever.
- Upgrade: /data/user-services.json recorded scst as enabled, so the installer enabled it in the new boot environment.

LIO mode has the same issue to a lesser degree: scst should never be enabled at boot there.

- Add systemd_enabled_units() to services, defaulting to all of a
service's units, with an iSCSI override that returns none on HA or in LIO mode.
Unit state set by etc_files/systemd.py, the user-services.json it writes,
and on_config_upload now all come from this one place. on_config_upload
takes the iSCSI mode from the uploaded database rather than the live config.
- Add truenas-scst-boot.py, which the installer runs in the new boot environment on upgrade. It covers upgrades from versions whose user-services.json still says scst is enabled. Neither middleware nor the license daemon runs there, so it cannot check the license; it disables scst in LIO mode, or when ALUA is enabled on an HA hardware platform.
- Log a periodic warning from standby_after_start when the SCST kernel modules are not loaded, since retrying cannot succeed in that state.
DeltaFile
+40-0src/freenas/usr/local/bin/truenas-scst-boot.py
+27-0src/middlewared/middlewared/plugins/service/services/iscsitarget.py
+11-0src/middlewared/middlewared/plugins/iscsi_/alua.py
+6-4src/middlewared/middlewared/plugins/service/on_config_upload.py
+10-0src/middlewared/middlewared/plugins/service/services/base_interface.py
+2-7src/middlewared/middlewared/etc_files/systemd.py
+96-112 files not shown
+104-118 files

FreeNAS/freenas fe26f51 — src/freenas/usr/local/bin truenas-scst-boot.py

Add truenas-scst-boot.py to keep scst disabled after upgrade

On upgrade the installer enables every unit marked enabled in the
old boot environment's /data/user-services.json.  Middleware without
the previous commit recorded scst there as enabled even on HA and in
LIO mode, so the first boot of the new environment could start SCST
before middleware disabled it again.

Add a script for the installer to run chrooted in the new boot
environment, after the database migration and with /proc, /sys and
/dev mounted, as it already does for truenas-hw-license.py.  It
disables scst if the iSCSI mode is LIO, or if ALUA is enabled and the
hardware is an HA platform.  If the check fails, the script exits
non-zero and leaves scst unchanged.
DeltaFile
+40-0src/freenas/usr/local/bin/truenas-scst-boot.py
+40-01 files

FreeNAS/freenas 3e21b81 — src/middlewared/middlewared/etc_files systemd.py, src/middlewared/middlewared/plugins/service __init__.py on_config_upload.py

Keep scst disabled at boot on HA and in LIO mode

On HA, scst must not start at boot; middleware starts it from
vrrp_master / vrrp_backup.  It is also unused in LIO mode.
etc_files/systemd.py enforced this when setting unit state, but
two other paths did not:

- The config.on_upload hook (run on the STANDBY by sync_to_peer)
  enabled scst just before the STANDBY rebooted.
- /data/user-services.json recorded scst as enabled, so the
  installer enabled it in the new boot environment on upgrade.

Add systemd_enabled_units(), which defaults to the service's systemd
units, and override it for iscsitarget to return none on HA or in LIO
mode.  Use it in both etc_files/systemd.py (including the JSON it
writes) and on_config_upload.  on_config_upload passes the uploaded
database so the iSCSI mode is taken from it, not from the live config.
DeltaFile
+27-0src/middlewared/middlewared/plugins/service/services/iscsitarget.py
+6-4src/middlewared/middlewared/plugins/service/on_config_upload.py
+10-0src/middlewared/middlewared/plugins/service/services/base_interface.py
+2-7src/middlewared/middlewared/etc_files/systemd.py
+5-0src/middlewared/middlewared/plugins/service/__init__.py
+3-0src/middlewared/middlewared/plugins/service/services/base.py
+53-116 files

FreeNAS/freenas 04cc2cf — src/middlewared/middlewared/plugins/iscsi_ alua.py

Warn when SCST is not loaded during standby_after_start

Diagnostic only: retrying to surface cluster_mode cannot succeed if the
SCST kernel modules are not loaded, so log a rate-limited warning.
DeltaFile
+11-0src/middlewared/middlewared/plugins/iscsi_/alua.py
+11-01 files

FreeNAS/freenas a612567 — src/middlewared/middlewared/api/v25_10_0 keychain.py, src/middlewared/middlewared/api/v25_10_1 keychain.py

Mark the generated SSH key pair multiline in the older API versions
DeltaFile
+2-2src/middlewared/middlewared/api/v27_1_0/keychain.py
+2-2src/middlewared/middlewared/api/v27_0_0/keychain.py
+2-2src/middlewared/middlewared/api/v25_10_5/keychain.py
+2-2src/middlewared/middlewared/api/v25_10_2/keychain.py
+2-2src/middlewared/middlewared/api/v25_10_1/keychain.py
+2-2src/middlewared/middlewared/api/v25_10_0/keychain.py
+12-126 files

FreeNAS/freenas 38acc93 — src/middlewared/middlewared/api/v25_04_0 keychain.py, src/middlewared/middlewared/api/v25_04_1 keychain.py

NAS-145046 / 27.1.0 / Let a generated SSH key pair keep its line breaks

`keychaincredential.generate_ssh_key_pair` returns a PEM private key and
an OpenSSH public key. Both carry line breaks, so the result model needs
`Multiline`. #20179 missed it, and master has the same gap in
`v25_10_0` through `v25_10_5`, `v27_0_0` and `v28_0_0`.

Production only logs the failure, because `serialize_result` falls back
to `remove_secrets`. The integration suite turns that fallback off in
`tests/conftest.py`, so six `tests/api2` files that call the method fail
instead.
DeltaFile
+2-2src/middlewared/middlewared/api/v25_10_2/keychain.py
+2-2src/middlewared/middlewared/api/v25_10_1/keychain.py
+2-2src/middlewared/middlewared/api/v25_10_0/keychain.py
+2-2src/middlewared/middlewared/api/v25_04_2/keychain.py
+2-2src/middlewared/middlewared/api/v25_04_1/keychain.py
+2-2src/middlewared/middlewared/api/v25_04_0/keychain.py
+12-125 files not shown
+22-2211 files

FreeNAS/freenas 29a2062 — src/middlewared/middlewared/api/v25_04_0 app.py keychain.py, src/middlewared/middlewared/api/v25_04_1 app.py cloud_sync_providers.py

NAS-145046 / 27.1.0 / Mark the multiline fields of the older API versions

Master no longer carries `v24_10` or `v25_04_0` through `v25_04_2`, so
#20179 left them alone. This branch still serves all four. A client
pinned to one of them would now get "Line breaks are not allowed" for a
value it has always been allowed to send. A result built from a stored
multiline value would fail the same way.

Every field here takes the marker its `v25_10_0` counterpart takes. A
class these versions lack stays unmarked, and so does a field master
left unmarked.
DeltaFile
+12-10src/middlewared/middlewared/api/v25_04_2/cloud_sync_providers.py
+10-10src/middlewared/middlewared/api/v25_04_1/cloud_sync_providers.py
+10-10src/middlewared/middlewared/api/v25_04_0/cloud_sync_providers.py
+9-7src/middlewared/middlewared/api/v25_04_1/app.py
+9-7src/middlewared/middlewared/api/v25_04_0/app.py
+10-6src/middlewared/middlewared/api/v25_04_0/keychain.py
+60-5084 files not shown
+367-28590 files

FreeNAS/freenas 33f114d — src/middlewared/middlewared/alembic/versions/27.1 2026-11-10_12-00_scrub_line_breaks.py, src/middlewared/middlewared/api/base line_breaks.py

NAS-145046 / 27.1.0 / Make all string fields single-line by default

`str` now accepts only single-line string by default.

If we need a multiline string, it must be `Multiline[str]` or
`Multiline[NonEmptyString]` or etc.

This branch differs from master, so the backport also does this:

- `v27_1_0` is `v27_0_0` without the `to_previous` and `from_previous`
  adapters, so it is regenerated from the changed `v27_0_0`.
- `v25_10_3` and `v25_10_4` are copies of `v25_10_5`, which master drops.
- Both migrations go to a new `versions/27.1`, registered in
  `alembic.ini`, under revision ids of their own. `hosts_json` chains
  onto `6d08137a3def`.
- `FullAdmin`, the sorted imports and `docs/source/api/field_markers.rst`
  only exist on master. Every import block keeps its own order, and the
  unit test drops the `FullAdmin` assertion.
- The private models live in `plugins/acme_protocol.py`,

    [6 lines not shown]
DeltaFile
+326-0src/middlewared/middlewared/alembic/versions/27.1/2026-11-10_12-00_scrub_line_breaks.py
+260-0src/middlewared/middlewared/pytest/unit/api/base/test_line_breaks.py
+127-0tests/api2/test_apps.py
+84-0src/middlewared/middlewared/api/base/line_breaks.py
+27-17src/middlewared/middlewared/api/v25_10_1/ssh.py
+27-17src/middlewared/middlewared/api/v25_10_0/ssh.py
+851-34448 files not shown
+3,254-1,696454 files

FreeNAS/freenas a35accd — src/middlewared/middlewared/api/v27_1_0 s3.py interface.py, src/middlewared/middlewared/plugins truesearch.py

Merge branch 'master' of https://github.com/truenas/middleware into NAS-141300
DeltaFile
+1,226-0src/middlewared/middlewared/api/v27_1_0/smb.py
+932-0src/middlewared/middlewared/api/v27_1_0/pool_dataset.py
+876-0src/middlewared/middlewared/api/v27_1_0/directory_services.py
+722-108src/middlewared/middlewared/plugins/truesearch.py
+657-0src/middlewared/middlewared/api/v27_1_0/interface.py
+614-0src/middlewared/middlewared/api/v27_1_0/s3.py
+5,027-108587 files not shown
+31,319-3,418593 files

FreeNAS/freenas 294523c —

Empty commit to create PR on github.

You should reset it
DeltaFile
+0-00 files

FreeNAS/freenas 29c5502 —

Empty commit to create PR on github.

You should reset it
DeltaFile
+0-00 files

FreeNAS/freenas b9b860b — src/middlewared/middlewared/alembic/versions/27.0 2026-11-12_12-00_ntp_nts.py, src/middlewared/middlewared/plugins/ntp crud.py peers.py

NAS-144162 / 28.0.0-BETA.1 / Harden NTP (#19907)

Basically, this commit is adding support for a newer secure way of
updating time. It's a preliminary
step for some WORM-related work in S3 land where we want to basically
ensure that buckets fall
back to being RO if time de-synced or not from secure source.

- Add `nts` to system.ntpserver, rendered as chrony's `nts` option
- Without `force`, probe NTS-KE (TLS 1.3, ALPN ntske/1) and the
negotiated NTP server on save
- Cap `maxpoll` at 21 for NTS servers
- Render `authselectmode prefer` in chrony.conf
- Add system.security `require_nts` (default off), rendered as
`authselectmode require`
- With `require_nts`: refuse enabling without an NTS server, saving
servers without NTS and deleting the last NTS server
- Restart chronyd on both controllers when `require_nts` changes
- Migration: add `ntp_nts` and `require_nts`

    [8 lines not shown]
DeltaFile
+247-0src/middlewared/middlewared/utils/ntp.py
+166-0tests/api2/test_ntpserver_nts.py
+149-0tests/unit/test_nts_ke.py
+110-17src/middlewared/middlewared/plugins/ntp/peers.py
+70-5src/middlewared/middlewared/plugins/ntp/crud.py
+46-0src/middlewared/middlewared/alembic/versions/27.0/2026-11-12_12-00_ntp_nts.py
+788-2224 files not shown
+1,235-6330 files

FreeNAS/freenas 4b2ca00 — src/middlewared/middlewared/api/v28_0_0 kerberos.py, src/middlewared/middlewared/plugins kerberos.py

Keep kerberos.keytab.kerberos_principal_choices private
DeltaFile
+0-11src/middlewared/middlewared/api/v28_0_0/kerberos.py
+1-7src/middlewared/middlewared/plugins/kerberos.py
+1-182 files