Uh oh!
There was an error while loading. Please reload this page.
feat(community): add ktn-enclosure-manager app - #5679
Open
MechanicalCoderX wants to merge 1 commit into
Open
Conversation
stavros-k
marked this pull request as draft
August 28, 2026 15:16
MechanicalCoderX
commented
Aug 31, 2026
Author
Saw this went to draft. What do you want changed first? Or name an app you think does it right and I'll go through mine against that. I'd expect the /dev/sg* access to be the part you want to look hardest at. I'm doing the changes myself, so short is fine. |
KTN Enclosure Manager is a drive-bay map, chassis telemetry and IDENT LED control panel for SES disk shelves attached to TrueNAS SCALE. TrueNAS gates its built-in enclosure UI behind iX hardware, so a third-party shelf reports Enclosure Unavailable; this fills that gap without patching middleware. Telemetry runs entirely on read-only device opens. The only write the app can perform is lighting a drive bay Identify LED, issued by a small root helper over a unix socket. The container is not privileged, drops ALL capabilities and adds back only SETUID and SETGID for the setpriv drop to uid 1000, keeps the default AppArmor profile, and mounts no host path other than its own data directory. App version 1.5.5, catalog version 1.0.0.
MechanicalCoderXforce-pushed
the
add-ktn-enclosure-manager
branch
from
August 31, 2026 03:36
109037f to
a61d190CompareMechanicalCoderX
marked this pull request as ready for review
September 1, 2026 00:12
MechanicalCoderX
commented
Sep 1, 2026
Author
I read the merged community apps and fixed this one to match. Worst thing I found was mine. The storage group had no normalize/ix_volume ref. On a default ixVolume install ix_volumes comes back empty, so no dataset. Confirmed against middleware on 25.10.6, before and after. Squashed to one commit on current master and force-pushed. Old history's gone. It's ready to look at. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
App Addition
AI
Description
Adds KTN Enclosure Manager to the community train.
KTN Enclosure Manager gives TrueNAS SCALE users a physical drive-bay map, chassis telemetry (temperatures, fans, PSUs) and IDENT LED control for SES-capable SAS disk shelves (JBODs).
TrueNAS gates its built-in enclosure UI behind iX hardware, so View Enclosure reports "Enclosure Unavailable" on a community system with a third-party shelf. This app fills that gap without patching middleware or spoofing hardware identity. It answers "which physical bay is this failing disk actually in?" With an optional TrueNAS API key it adds pool, vdev, ZFS error and SMART context per bay.
Updated 2026-08-30: the branch was rebased onto current master and squashed to a single commit. The previous history carried version bumps (1.3.2 through 1.5.5) for an app that has never been in the catalog, which was noise. I also went back through the package against merged community apps and fixed a set of conformance gaps; the notable ones are listed under Special Notes.
App Information
Testing
Tested locally with:
basic-values.yaml(ix_volume storage, authentication required)hostpath-anon-values.yaml(host_path storage, open dashboard, Identify still gated)Both render and install to a healthy container via
.github/scripts/ci.pyagainst the published1.5.5image, exit 0. Also run clean:port_validation.py(exit 0) andgenerate_metadata.py(exit 0, and byte-idempotent - the tree is unchanged after a full cycle).apps_dev_charts_validateI could not run here: the validation image imports middleware, which needs libzfs, and my build host is not a ZFS system. Leaving that one to repo CI rather than claiming it.Icons and Screenshots
app.yaml/item.yamlalready reference the canonical CDN paths (apps/ktn-enclosure-manager/icons/icon.svg,apps/ktn-enclosure-manager/screenshots/screenshot1-3.png). Please upload these sources to them:Special Notes
/dev/sg*), and how it compares. For scale:scrutinyis merged in this train and does closely related work; it isset_privileged(true), declares 14 capabilities, and bind-mounts all of/devplus/run/udev. This app is not privileged, declares 2 capabilities (SETUID,SETGID), hashost_mounts: [], and passes through only the SCSI generic nodes the user names, with anrwcgroup grant rather thanrwm. Every telemetry read works on a read-only device open (sg_ses --readonly), so granting:ris a supported monitoring-only deployment where Identify returns a permission error and nothing else changes. Thewexists solely for the IDENT LEDSEND DIAGNOSTIC, which addresses the enclosure processor, never disk data. No code path powers a drive off, resets a PHY, or touches a fault LED. SECURITY.md documents the boundary.setpriv. That is whySETUID/SETGIDare added back overcap_drop: ALL, and they are the only two. The helper accepts three operations (identify_on,identify_off, read-only SES page read) and cannot be passed a path or a command. Default AppArmor profile, no/sysmount.$ref: normalize/ix_volumeand the ACL block, which every other app in the train carries; that is fixed and the canonical block is now used. The healthcheck useduse_built_in(), which effectively nothing in the community train does; it is nowset_test("tcp", ...), which needs no curl in the image. The device is now a host/container pair list like other device-passthrough apps rather than a single required string, so CI can passdevices: []instead of a placeholder node. The standard permissions container replaces a manualchowninstruction. Port default moved into the catalog band (30842). Group names and descriptions now follow the house convention.x-noteswarning).ci.py, both test files, published image) rather than deploy-verified on an appliance.Checklist