Skip to content

Commit 7cc4e19

Browse files
K2GO-394 fix(maps): keep archive downloads in-proot in the is_proot delegate
Scope the is_proot delegation to non-archive downloads. The maps role downloads the static-search tarball through the same task with expand_archive=true; dash-node downloads pmtiles files, not archives, and does not extract them. So the merged delegate asserted an extracted search directory that dash-node never places, which failed a search-on proot install. Now a pmtiles download is delegated (skipped in-proot, asserted present), and an archive still downloads AND extracts in-proot (the task also does the extract/mv). The search tarball is small, so the in-proot wedge risk is low.
1 parent ac2ebba commit 7cc4e19

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Upstream-PR: not yet submitted
22
Upstream-Status: open
33
Applies-to: roles/maps/tasks/download_large_file.yml
4-
Summary: On proot, delegate the base-map pmtiles download to dash-node (the dashboard's durable job engine) instead of running a blocking aria2c in-proot. The in-proot aria2 could not recover from a full mobile-radio drop -- it wedged with no exit (K2GO-394). dash-node downloads the pmtiles with its own resumable, reconnecting aria2 (--continue plus an outer reconnect loop -- the proven kiwix mechanism) into the maps serve dir BEFORE this role runs. So the original download task is gated `when: not is_proot` (unchanged off proot), and a new `when: is_proot` step asserts the file is already at dest_path (a missing file means the host skipped the dash-node step); the role then only post-processes. Carried for our build; WIP for upstream (K2GO-394).
4+
Summary: On proot, delegate the base-map PMTILES download to dash-node (the dashboard's durable job engine) instead of running a blocking aria2c in-proot. The in-proot aria2 could not recover from a full mobile-radio drop -- it wedged with no exit (K2GO-394). dash-node downloads the pmtiles with its own resumable, reconnecting aria2 (--continue plus an outer reconnect loop -- the proven kiwix mechanism) into the maps serve dir BEFORE this role runs. So a pmtiles download is gated `when: not is_proot` (unchanged off proot), and a new step asserts the file is already at dest_path. Archives (expand_archive, e.g. the search tarball) are NOT delegated -- dash-node does not extract them -- so they still download AND extract in-proot (the download task also does the extract/mv, and the search tarball is small so the wedge risk is low). The role then only post-processes the delegated pmtiles. Carried for our build; WIP for upstream (K2GO-394).
55

66
diff --git a/roles/maps/tasks/download_large_file.yml b/roles/maps/tasks/download_large_file.yml
77
index f8aa705..78a55cc 100644
@@ -11,26 +11,26 @@ index f8aa705..78a55cc 100644
1111
args:
1212
executable: /bin/bash
1313
creates: "{{ dest_path }}"
14-
+ when: not is_proot
14+
+ when: not is_proot or (expand_archive | default(false))
1515
+
16-
+ # proot / Android (K2GO-394): dash-node -- the dashboard's durable job engine -- downloads the
17-
+ # base-map pmtiles with its own resumable, reconnecting aria2 (--continue plus an outer reconnect
18-
+ # loop) BEFORE this role runs. On proot this role only post-processes, so it must NOT download
19-
+ # in-proot, where a blocking aria2 cannot recover from a mobile-radio drop (it wedges with no
20-
+ # exit). The file is expected at dest_path already; fail early and clearly if the host skipped the
21-
+ # dash-node step, rather than leaving a broken symlink for maps-update.py to trip on.
16+
+ # proot / Android (K2GO-394): dash-node -- the durable job engine -- downloads the base-map
17+
+ # PMTILES with its own resumable, reconnecting aria2 (the proven kiwix mechanism) BEFORE this
18+
+ # role runs, because a blocking in-proot aria2 cannot recover a mobile-radio drop (it wedges with
19+
+ # no exit). So a pmtiles download is skipped here and only asserted present. Archives
20+
+ # (expand_archive, e.g. the search tarball) are NOT delegated -- dash-node does not extract them --
21+
+ # so the task above still downloads AND extracts them in-proot (small; the wedge risk is low).
2222
+ - name: "Base map {{ file_name }} must be present on proot (downloaded by dash-node)"
2323
+ stat:
2424
+ path: "{{ dest_path }}"
2525
+ register: proot_basemap
26-
+ when: is_proot
26+
+ when: is_proot and not (expand_archive | default(false))
2727
+
2828
+ - name: "Fail if dash-node did not place {{ file_name }} on proot"
2929
+ assert:
3030
+ that: proot_basemap.stat.exists
3131
+ fail_msg: "On proot, {{ dest_path }} must be downloaded by dash-node before the maps role runs (K2GO-394)."
3232
+ quiet: yes
33-
+ when: is_proot
33+
+ when: is_proot and not (expand_archive | default(false))
3434

3535
rescue:
3636
# We output summaries to a log file for the user's benefit,

0 commit comments

Comments
 (0)