NAS-140810 / 26.0.0-RC.1 / Fall back to UTC when configured timezone is unavailable (by sonicaj) (#18934)
This commit fixes an issue where users upgrading from older TrueNAS
versions could end up with a timezone selected that is no longer
available on the system, silently leaving the clock on UTC with no
indication to the operator.
Debian moved a large set of legacy timezone aliases (Japan, GB,
Hongkong, Iran, Israel, Cuba, Egypt, all capitalised Australia/*,
Brazil/*, Canada/*, etc.) out of the core `tzdata` package into a new
`tzdata-legacy` package which is not installed by default on trixie:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040997
The names are still listed in `/usr/share/zoneinfo/tzdata.zi` as
historical Link entries, but the corresponding files under
`/usr/share/zoneinfo/` are gone. The middleware was parsing `tzdata.zi`
directly and offering all 598 entries in the dropdown, including 113
that no longer resolve to a real file. Selecting one of those (e.g.
[45 lines not shown]
NAS-140980 / 26.0.0-RC.1 / Fix NFS test failures from pynfs migration (by ixhamza) (#18942)
[Seven tests have been failing since pynfs
migration](http://jenkins.eng.ixsystems.net:8080/job/tests/job/api_tests/8877/#showFailuresLink):
```
test_300_nfs.py::test_basic_nfs_ops[3,4]
test_300_nfs.py::test_nfs_scope_setting
test_300_nfs.py::test_share_ro
test_300_nfs.py::test_client_status
test_300_nfs.py::test_nonroot_behavior
test_usage_reporting.py::test_nfs_reporting
```
Two root causes, both from the migration moving the NFS client out of
the kernel and into the test process:
1. pynfs uses an ephemeral source port by default. With the server's
default `allow_nonroot=False`, the export carries `secure`, so mountd
returns ACCES on v3 and nfsd squashes uid=0 to nobody on v4. SSH_NFS
didn't hit this because `mount.nfs` is SETUID-root and always bound a
[21 lines not shown]
NAS-140944 / 26.0.0-RC.1 / Do not expect JSON output from TNC delete calls (by sonicaj) (#18941)
This commit fixes a case where TNC's `DELETE /v1/systems/:id` endpoint
now returns 200 with an empty/non-JSON body, causing
`unset_registration_details` to crash with `aiohttp.ContentTypeError`
while attempting to decode the response as JSON. Passing
`get_response=False` skips the body decode since the response payload is
not used.
Original PR: https://github.com/truenas/middleware/pull/18936
Co-authored-by: Waqar Ahmed <waqarahmedjoyia at live.com>
NAS-140980 / 27.0.0-BETA.1 / Fix NFS test failures from pynfs migration (#18939)
[Seven tests have been failing since pynfs
migration](http://jenkins.eng.ixsystems.net:8080/job/tests/job/api_tests/8877/#showFailuresLink):
```
test_300_nfs.py::test_basic_nfs_ops[3,4]
test_300_nfs.py::test_nfs_scope_setting
test_300_nfs.py::test_share_ro
test_300_nfs.py::test_client_status
test_300_nfs.py::test_nonroot_behavior
test_usage_reporting.py::test_nfs_reporting
```
Two root causes, both from the migration moving the NFS client out of
the kernel and into the test process:
1. pynfs uses an ephemeral source port by default. With the server's
default `allow_nonroot=False`, the export carries `secure`, so mountd
returns ACCES on v3 and nfsd squashes uid=0 to nobody on v4. SSH_NFS
didn't hit this because `mount.nfs` is SETUID-root and always bound a
[15 lines not shown]
Rework ZFS page UI layout and swap sizing
Redesign the ZFS configuration page with a two-column layout (settings
on the left, disk list on the right), add a user-editable swap size
field that defaults to actual RAM size, make the pool name always
editable, and simplify pool type values to plain identifiers (stripe,
mirror, raidz1/2/3). Consolidate duplicated next-button sensitivity
logic into _update_next_button(), replace deprecated Gtk.STOCK icons
with icon names, encrypt swap when GELI is enabled, and bump version
to 0.4.
[NFCI][LV] Remove unsupported variable mask position for vector variants. (#197192)
We only support masks as the last argument of a vector function variant.
Make it official and remove the interface to query the position of the
mask.
Set allow_nonroot for pynfs NFS tests
PynfsClient(3) runs as the test user and uses ephemeral source
ports. With the appliance default allow_nonroot=False the export
is 'secure', so mountd returns ACCES on v3 and nfsd squashes uid=0
to nobody on v4. SSH_NFS hid this because mount.nfs is SETUID-root.
Add a nfs_allow_nonroot fixture and apply to the four affected
tests; same inline toggle in test_usage_reporting.
Use tcpdump -i any in NFS scope test
test_nfs_scope_setting's tcpdump used `-i lo`, which worked under
SSH_NFS because the client ran on the appliance. Under
PynfsClient the client runs on the test runner host, so loopback
sees nothing. Switch to `-i any`.
[lldb][AArch64][Linux] Remove Is<type of register> forwarding methods (#197412)
These don't add any utility and just make you wonder if we're doing
something more than the register info object can do. We are not.
Except for GPR and FPR, but nothing so complex that the register info
cannot do it too, so I've moved those into there.
[DTLTO][TEST] Add a test for Unicode characters (#194823)
Add a test to verify that Unicode characters in paths are
preserved correctly.
This was broken until recently; see:
https://github.com/llvm/llvm-project/issues/194318
[analyzer] Fix bad logic in VisitArrayInitLoopExpr (#196974)
The method `VisitArrayInitLoopExpr` consists of three steps:
1. Run the `PreStmt<ArrayInitLoopExpr>` callbacks
2. Bind the right value to the expression
3. Run the `PostStmt<ArrayInitLoopExpr>` callbacks
However 8ef628088b54aebd4a8317ce3a0029e3283b3aa0 (which added this
method in 2022) introduced bad logic: at step 2 it used `Pred` (the node
received as an argument at the beginning) instead of `Node` (one of the
nodes produced in step 1) as the parent of the freshly made nodes.
This logic error didn't cause practical problems because
`ArrayInitLoopExpr` is a very esoteric AST node so there aren't any
checkers that implement `PreStmt` callbacks for it.