Skip to content

Fix Supervisor image corruption detection#2953

Merged
agners merged 3 commits intodevfrom
fix-supervisor-image-corruption-detection
Nov 30, 2023
Merged

Fix Supervisor image corruption detection#2953
agners merged 3 commits intodevfrom
fix-supervisor-image-corruption-detection

Conversation

@agners
Copy link
Member

@agners agners commented Nov 30, 2023

When multiple images match the reference, multiple IDs are passed as a
single argument to docker image rm, leading to an error:
Error response from daemon: page not found

Make sure to pass the ids as separate argument to make the delete work
in any case.

While at it, as noted in #2113, we don't need this logic anymore after a major OS
releases. So simply drop the logic to also make the image corruption
detection work again.

When multiple images match the reference, multiple IDs are passed as a
single argument to docker image rm, leading to an error:
Error response from daemon: page not found

Make sure to pass the ids as separate argument to make the delete work
in any case.
As noted in #2113, we don't need this logic anymore after a major OS
releases. So simply drop the logic to also make the image corruption
detection work again.
@agners
Copy link
Member Author

agners commented Nov 30, 2023

Docker might return image IDs in random order, with that uniq doesn't work. While it shouldn't hurt, it can lead to confusing errors, e.g.

$ docker image rm --force sha256:241f0f3edb06f549f150701febf21798f179d19fc0a8b74e7694e67af8fa8433 sha256:241f0f3edb06f549f150701febf21798f179d19fc0a8b74e7694e67af8fa8433
Untagged: agners/amd64-hassio-supervisor:latest
Untagged: agners/amd64-hassio-supervisor@sha256:8ee9f1ac4fb286c36f27ba03e1264c16586f64c36aa19fde0d1089cb644ff0b5
Deleted: sha256:241f0f3edb06f549f150701febf21798f179d19fc0a8b74e7694e67af8fa8433
Error response from daemon: No such image: sha256:241f0f3edb06f549f150701febf21798f179d19fc0a8b74e7694e67af8fa8433

@agners agners merged commit c59c887 into dev Nov 30, 2023
@agners agners deleted the fix-supervisor-image-corruption-detection branch November 30, 2023 13:41
agners added a commit that referenced this pull request Dec 4, 2023
* Fix Supervisor image corruption detection

When multiple images match the reference, multiple IDs are passed as a
single argument to docker image rm, leading to an error:
Error response from daemon: page not found

Make sure to pass the ids as separate argument to make the delete work
in any case.

* Cleanup reusing Supervisor from an old/unused reference

As noted in #2113, we don't need this logic anymore after a major OS
releases. So simply drop the logic to also make the image corruption
detection work again.

* Make sure image IDs are sorted to make them unique
darkxst pushed a commit to darkxst/ha-operating-system that referenced this pull request Dec 9, 2023
* Fix Supervisor image corruption detection

When multiple images match the reference, multiple IDs are passed as a
single argument to docker image rm, leading to an error:
Error response from daemon: page not found

Make sure to pass the ids as separate argument to make the delete work
in any case.

* Cleanup reusing Supervisor from an old/unused reference

As noted in home-assistant#2113, we don't need this logic anymore after a major OS
releases. So simply drop the logic to also make the image corruption
detection work again.

* Make sure image IDs are sorted to make them unique
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants