From 5ba7246b453bb988688fa8312a09e1dec76f9094 Mon Sep 17 00:00:00 2001 From: tommy Date: Fri, 3 Jul 2026 10:11:18 -0500 Subject: [PATCH] 4K: pre-create download-client completed category dirs in playbook radarr-4k/sonarr-4k surfaced 'download client places downloads in X but it does not appear to exist' health errors: the SABnzbd (movies-4k/tv-4k) and Transmission (radarr-uhd/sonarr-uhd) completed-category dirs dont exist until the first grab lands in each category. On a rebuild those errors recur until downloads happen. Add an idempotent file: task creating all four at 1000:3000 (abc:media) 0775 to match the /data tree. Root cause of the original root:0770 drift on movies-4k: a manual docker exec mkdir runs as ROOT in linuxserver images (umask 007), not as the app user abc. Live dirs normalized via host chown (NFS honors no_root_squash); both instances now report 0 download-client-dir errors. Co-Authored-By: Claude Opus 4.8 --- arrs-4k/deploy-arrs-4k.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arrs-4k/deploy-arrs-4k.yml b/arrs-4k/deploy-arrs-4k.yml index a144837..ac0c62f 100644 --- a/arrs-4k/deploy-arrs-4k.yml +++ b/arrs-4k/deploy-arrs-4k.yml @@ -92,6 +92,27 @@ timeout: 90 loop: [7879, 8990] + # Pre-create the download-client COMPLETED category dirs so a fresh rebuild + # doesn't surface "download client places downloads in X but it does not + # appear to exist" health errors until the first grab lands in each category. + # Owner 1000:3000 (abc:media) 0775 matches the rest of the /data tree — the + # download-client app processes create category dirs this way on first use; + # a manual `docker exec mkdir` (runs as ROOT in linuxserver images) + # produces root:0770 instead, which is the drift this task prevents. + # become=root chown is honored by the TrueNAS NFS export (no_root_squash). + - name: Ensure 4K download-client completed category dirs (abc:media 0775) + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: "1000" + group: "3000" + mode: "0775" + loop: + - /mnt/media/data/usenet/complete/movies-4k # SABnzbd -> radarr-4k + - /mnt/media/data/usenet/complete/tv-4k # SABnzbd -> sonarr-4k + - /mnt/media/data/torrents/radarr-uhd # Transmission -> radarr-4k + - /mnt/media/data/torrents/sonarr-uhd # Transmission -> sonarr-4k + - name: Install 4K download-client config script ansible.builtin.copy: dest: "{{ app_dir }}/ensure-arrs-4k-dl.py"