/opt/docker/stacks/<app> is the catalog's template copy and stays after a clean remove, so every remove printed it as a leftover (2026-10-24, 9202).
This commit is contained in:
1 parent
7de554e954
commit
5e196e1ab8
4 files changed
+21
-1
No files matched your search
@@ -5,6 +5,9 @@
|
||||
HDD_PATH that is a folder inside a drive; the walk still sent `DRIVE/<app>` and got 409 (measured on 9202 while
|
||||
installing a throwaway qBittorrent for felhom.eu R-1250's live proof; the empty folder it made was removed). Other
|
||||
`path` fields keep their own folder. `test_hdd_path_is_the_drive_itself` (seen failing with the rule off).
|
||||
- `remove()`'s leftover check looks for the install record `/opt/docker/stacks/<app>/app.yaml`, not the folder: the folder is the
|
||||
catalog's template copy and stays after a clean remove, so every remove read „leftovers=<folder>".
|
||||
`test_remove_looks_for_the_install_record_not_the_template_folder` (seen failing on the old check).
|
||||
|
||||
## 2026-10-23 (day, after the release) — the box walk reads Tester 1's address from the guest
|
||||
|
||||
|
||||
@@ -7,4 +7,6 @@
|
||||
- **Test:** `scripts/test_upgrade_bench.py` `BoxWalkTargets.test_hdd_path_is_the_drive_itself` — seen failing with the
|
||||
rule switched off; the bench suite green after.
|
||||
- **Live:** the same install went through with the drive root (202, running). The stray empty folder was removed.
|
||||
- `remove()` no longer reports the template folder as a leftover: it checks for `app.yaml`, the install's record (the
|
||||
folder stays after every clean remove). Test seen failing on the old check.
|
||||
- No template changed; no catalog version moved.
|
||||
+3
-1
@@ -595,7 +595,9 @@ def remove(name):
|
||||
say(f" [X] remove (keeping drive data) -> {code} {str(d)[:160]}")
|
||||
time.sleep(5)
|
||||
st = stack(name)
|
||||
left = guest(f"ls -d /opt/docker/stacks/{name} 2>/dev/null; "
|
||||
# The stack folder itself stays: it is the catalog's template copy (every app has one). An install leaves its record,
|
||||
# app.yaml — that is the leftover to look for (2026-10-24: the folder alone read as a leftover after a clean remove).
|
||||
left = guest(f"ls -d /opt/docker/stacks/{name}/app.yaml 2>/dev/null; "
|
||||
f"docker ps -a --filter label=com.docker.compose.project={name} --format '{{{{.Names}}}}'")
|
||||
say(f" [X] after remove: deployed={st.get('deployed')} leftovers={left.strip()!r}")
|
||||
return code
|
||||
|
||||
@@ -454,6 +454,19 @@ class BoxWalkTargets(unittest.TestCase):
|
||||
self.assertEqual(len(made), 1)
|
||||
self.assertNotIn("scratch_hdd ", made[0] + " ") # the drive root itself is never mkdir-ed
|
||||
|
||||
def test_remove_looks_for_the_install_record_not_the_template_folder(self):
|
||||
"""/opt/docker/stacks/<app> is the catalog's template copy and stays after a clean remove; app.yaml is the
|
||||
install's record. RED-PROOF: check the folder again → fails."""
|
||||
bw = self.load({"BASE": "https://192.0.2.1"})
|
||||
seen = []
|
||||
with mock.patch.object(bw, "ctl", return_value=("200", {"ok": True})), \
|
||||
mock.patch.object(bw, "stack", return_value={"deployed": False}), \
|
||||
mock.patch.object(bw, "guest", side_effect=lambda script, timeout=600: seen.append(script) or ""), \
|
||||
mock.patch.object(bw, "say"), mock.patch.object(bw.time, "sleep"):
|
||||
bw.remove("qbittorrent")
|
||||
check = [c for c in seen if "/opt/docker/stacks/" in c]
|
||||
self.assertTrue(check and "/opt/docker/stacks/qbittorrent/app.yaml" in check[-1], seen)
|
||||
|
||||
def test_an_unknown_target_is_refused(self):
|
||||
with self.assertRaises(SystemExit):
|
||||
self.load({"TARGET": "ep0"})
|
||||
|
||||
Reference in new issue
Block a user