Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Update succeeded, but an error occurred pruning old image versions #195

Closed
corneliusroemer opened this issue Jul 12, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@corneliusroemer
Copy link
Member

Current Behavior

When running nextstrain update on macOS intel:

Update succeeded, but an error occurred pruning old image versions:
   Command '['docker', 'image', 'rm', 'nextstrain/base:build-20220630T005552Z', 'nextstrain/base:latest']' returned non-zero exit status 1.

Expected behavior

No error

Full log

❯ nextstrain update
nextstrain-cli is up to date!

Updating Docker image from nextstrain/base:build-20220630T005552Z to nextstrain/base:build-20220708T143421Z…

build-20220708T143421Z: Pulling from nextstrain/base
824b15f81d65: Already exists 
b0bff26542d3: Already exists 
3fb8324458c0: Already exists 
e67240a9fcf6: Already exists 
aa80be33dc0b: Already exists 
7faaae178164: Pull complete 
a96de30a24c9: Pull complete 
8fe16fe2453e: Pull complete 
ff1d3a200206: Pull complete 
13a60dc5d953: Pull complete 
3d577b3bf7b5: Pull complete 
76fe62a10960: Pull complete 
9a614572edcb: Pull complete 
01ea19f30c1e: Pull complete 
22128c3093b6: Pull complete 
e68cab12a4bb: Pull complete 
5fb203e6eb74: Pull complete 
45e6c30c4728: Pull complete 
fd4a5739d78c: Pull complete 
46cb00b970ac: Pull complete 
c04f2d1e2fc1: Pull complete 
4eb817ecf7dc: Pull complete 
79f2f6e1b740: Pull complete 
7533c2e393b7: Pull complete 
1b42cbe34061: Pull complete 
f01e4a4d304f: Pull complete 
28423b2b6d86: Pull complete 
9150f242fcf0: Pull complete 
Digest: sha256:67854afb30d1f06cbfae049d50644984269a46ebeb209deef754b061e4dd6398
Status: Downloaded newer image for nextstrain/base:build-20220708T143421Z
docker.io/nextstrain/base:build-20220708T143421Z

Pruning old images…

Untagged: nextstrain/base:build-20220630T005552Z
Untagged: nextstrain/base@sha256:84524eecd6a426be93043c6d3e2cc060b271a0f1b0a4e43865246929bdfa4b89
Deleted: sha256:cada78232840efbebfcdd181a0c016e1e0aa3913af5078297456d646f722a866
Deleted: sha256:c50d1af3c7586fd78b2686d200d5d4bf9f15a4df3b90543e8e4afb2076a4e96f
Deleted: sha256:74d25216ebd34a7cc41ee5ce737604911da7a85c85d8f48758c2bb1f6c7bfaf0
Deleted: sha256:37d9d14a7fa53a0b9b69cd05f54d69806c1a942fa151c4ca7b2c0d647ebe0fd5
Deleted: sha256:2a3defd2cacfa0252cb84627d9cbbce7cf14864a5654e6b4dc4d72ca9726b593
Deleted: sha256:b7ccb5c7f15b4e26de6d489f540bcb98d1acd0db4c8cb04eb4666760c2f7d18c
Deleted: sha256:cc1c188f32e720b1d38071561093265f9df637d249ff4b1607077f18e30b41ce
Deleted: sha256:db16b7b2c79e41b01ac660b2012a938a3670885bb61dcd9864f88c9997f7d8bb
Error response from daemon: conflict: unable to remove repository reference "nextstrain/base:latest" (must force) - container ab4d05662007 is using its referenced image 8dcae17c6858

Update succeeded, but an error occurred pruning old image versions:
   Command '['docker', 'image', 'rm', 'nextstrain/base:build-20220630T005552Z', 'nextstrain/base:latest']' returned non-zero exit status 1.


Your images are up to date!
@corneliusroemer corneliusroemer added the bug Something isn't working label Jul 12, 2022
@tsibley
Copy link
Member

tsibley commented Jul 12, 2022

I suspect is because you had an outstanding nextstrain build or nextstrain view or nextstrain shell running using the Docker image that update was trying to prune.

Relatedly, the whole update command needs some… updating in general to make the behaviour and output better (c.f. #87).

@tsibley
Copy link
Member

tsibley commented Sep 1, 2022

In related work on update, I plan to include this change:

From e9abf65ff86c9d4d08eb36453150a67979f61538 Mon Sep 17 00:00:00 2001
From: Thomas Sibley <[email protected]>
Date: Thu, 1 Sep 2022 15:29:03 -0700
Subject: [PATCH] update: Say a bit more about errors pruning old Docker images

Resolves <https://github.com/nextstrain/cli/issues/195>.
---
 nextstrain/cli/runner/docker.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/nextstrain/cli/runner/docker.py b/nextstrain/cli/runner/docker.py
index dc89923..49b5e50 100644
--- a/nextstrain/cli/runner/docker.py
+++ b/nextstrain/cli/runner/docker.py
@@ -301,6 +301,11 @@ def update() -> bool:
         warn("Update succeeded, but an error occurred pruning old image versions:")
         warn("  ", error)
         warn()
+        warn("This can occur, for example, if you have a `nextstrain build`,")
+        warn("`nextstrain view`, or `nextstrain shell` command still running.")
+        warn()
+        warn("Not to worry, we'll try again the next time you run `nextstrain update`.")
+        warn()
 
     return True
 
-- 
2.37.2

@corneliusroemer
Copy link
Member Author

corneliusroemer commented Sep 1, 2022 via email

@tsibley
Copy link
Member

tsibley commented Oct 19, 2022

Resolved by 38d252a.

@tsibley tsibley closed this as completed Oct 19, 2022
Repository owner moved this from Backlog to Done in Nextstrain planning (archived) Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants