wrolpi/controller
Roland 9d6eb0873e
Controller can unmount foreign mounts; protect the primary drive.
The /api/disks/unmount endpoint only removed entries from fstab.yaml and
asked the reconciler to unmount, but the reconciler deliberately never
unmounts paths it has not claimed.  Foreign mounts (udisks2 desktop
automounts, manual mounts) therefore could not be unmounted from the UI,
failing with a confusing "check journalctl" error.

- Fall back to a direct umount(8) when a reconcile leaves the requested
  mount point live.
- Reject unmounting the primary WROLPi drive (/media/wrolpi) with a
  clear 400, normalized to catch path traversal.
- Require the normalized mount point to be strictly under /media/
  before any direct umount, since the fallback runs as root.
- Show "System" instead of an Unmount button for /media/wrolpi in both
  the React UI and the Controller's simplified UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 19:46:30 -06:00
..
api Controller can unmount foreign mounts; protect the primary drive. 2026-06-11 19:46:30 -06:00
lib Fetching processes from PROCFS_PATH in docker container. 2026-05-30 15:59:14 -06:00
templates Controller can unmount foreign mounts; protect the primary drive. 2026-06-11 19:46:30 -06:00
test Controller can unmount foreign mounts; protect the primary drive. 2026-06-11 19:46:30 -06:00
__init__.py Creating Controller service which will control WROLPi services, admin, SMART, disks, and status. nginx will fallback to Controller UI when React UI is unavailable (such as during upgrades). 2025-12-15 15:48:40 -07:00
conftest.py Consolidating controller tests. Fixing controller test cleanup which slowed down tests significantly. 2026-05-15 21:10:30 -06:00
defaults.py Removing Controller link in favor of the button in services. 2026-04-09 15:03:28 -06:00
main.py Fetching processes from PROCFS_PATH in docker container. 2026-05-30 15:59:14 -06:00
requirements.txt Bump the controller-dependencies group in /controller with 12 updates 2026-05-03 11:56:30 -06:00
serve.py Migrating Controller from port 8087 to 80 so that it is more discoverable. Reformatting Controller dashboard to make header at the top. Reformatting navigation bar to handle the new links which prevented Admin from being visible in some screens. 2026-04-09 15:01:05 -06:00