Supervisor: Can't find xxx/yyy-amd64 for cleanup

Created on 17 Aug 2019  路  5Comments  路  Source: home-assistant/supervisor

Home Assistant release with the issue:

HA 0.97.2 (doesn't really matter)
Supervisor release with the issue
174+

Operating environment (HassOS/Generic):

Hass.io on Ubuntu Server

Supervisor logs:

19-08-17 09:40:39 INFO (SyncWorker_7) [hassio.docker.interface] Update image hassioaddons/ssh-amd64:v6.3.0 to hassioaddons/ssh-amd64:6.3.1
19-08-17 09:40:39 INFO (SyncWorker_7) [hassio.docker.interface] Pull image hassioaddons/ssh-amd64 tag 6.3.1.
19-08-17 09:40:48 INFO (SyncWorker_3) [hassio.docker.interface] Update image hassioaddons/vscode-amd64:v0.6.2 to hassioaddons/vscode-amd64:0.6.3
19-08-17 09:40:48 INFO (SyncWorker_3) [hassio.docker.interface] Pull image hassioaddons/vscode-amd64 tag 0.6.3.
19-08-17 09:42:12 INFO (SyncWorker_7) [hassio.docker.interface] Stop addon_a0d7b954_ssh application
19-08-17 09:42:13 INFO (SyncWorker_7) [hassio.docker.interface] Clean addon_a0d7b954_ssh application
19-08-17 09:42:13 WARNING (SyncWorker_4) [hassio.docker.interface] Can't find hassioaddons/ssh-amd64 for cleanup
19-08-17 09:42:13 INFO (MainThread) [hassio.addons] Add-on 'a0d7b954_ssh' successfully updated
19-08-17 09:42:13 WARNING (SyncWorker_17) [hassio.docker.addon] SSH & Web Terminal run with disabled protected mode!
19-08-17 09:42:14 INFO (SyncWorker_17) [hassio.docker.addon] Start Docker add-on hassioaddons/ssh-amd64 with version v6.3.1
19-08-17 09:42:14 INFO (MainThread) [hassio.api.security] /host/info access from a0d7b954_ssh
19-08-17 09:42:21 INFO (SyncWorker_3) [hassio.docker.interface] Stop addon_a0d7b954_vscode application
19-08-17 09:42:27 INFO (SyncWorker_3) [hassio.docker.interface] Clean addon_a0d7b954_vscode application
19-08-17 09:42:27 WARNING (SyncWorker_22) [hassio.docker.interface] Can't find hassioaddons/vscode-amd64 for cleanup
19-08-17 09:42:27 INFO (MainThread) [hassio.addons] Add-on 'a0d7b954_vscode' successfully updated
19-08-17 09:42:28 INFO (SyncWorker_20) [hassio.docker.addon] Start Docker add-on hassioaddons/vscode-amd64 with version v0.6.3
19-08-17 09:42:28 INFO (MainThread) [hassio.api.security] /host/info access from a0d7b954_vscode

Description of problem:
Getting cleanup warnings after updating add-ons, haven't noticed before 174 and up.
Checked portainer and sure enought the old images were still present (manually removed them there)

PS saw some other strange things while in Portainer:
image
Latest version not tagged as latest but the previous version still is (which isn't cleaned up either).

Most helpful comment

So this can be narrowed down now to the Community Add-ons.

Thanks for reporting @tjorim, I've adjusted the CI/CD of the Community Add-ons to take this into account:

https://github.com/hassio-addons/organization/commit/16923b2404d7bb452793442deb023d4f81450892

It will take a least 2 releases for each add-on to have an impact though.

All 5 comments

Some testing by adding an extra debug:

            _LOGGER.debug("Getting %s:%s", self.image, self.version)
            origin = self.sys_docker.images.get(f"{self.image}:{self.version}")

Result

19-08-17 13:10:08 INFO (SyncWorker_4) [hassio.docker.interface] Update image hassioaddons/example-amd64:3.0.3 to hassioaddons/example-amd64:3.0.2
19-08-17 13:10:08 INFO (SyncWorker_4) [hassio.docker.interface] Pull image hassioaddons/example-amd64 tag 3.0.2.
19-08-17 13:10:12 DEBUG (SyncWorker_9) [hassio.docker.interface] Getting hassioaddons/example-amd64:v3.0.2
19-08-17 13:10:12 WARNING (SyncWorker_9) [hassio.docker.interface] Can't find hassioaddons/example-amd64 for cleanup

Seems like it an extra v slips up in the version somewhere:

hassioaddons/example-amd64:v3.0.2 instead of the expected hassioaddons/example-amd64:3.0.2

I cannot find the origin of this extra v. It is not in the add-on config, it isn't visible on the frontend and it isn't in the docker image tag.

ooh god, it is from the meta labels... 馃槯

@pvizeli Why do we rely on meta labels at that point? What if an add-on doesn't provide those?

Ref: hassio/docker/interface.py

    @property
    def version(self) -> Optional[str]:
        """Return version of Docker image."""
        return self.meta_labels.get(LABEL_VERSION)

For that case we have a legacy mode. It's how the system work.

So this can be narrowed down now to the Community Add-ons.

Thanks for reporting @tjorim, I've adjusted the CI/CD of the Community Add-ons to take this into account:

https://github.com/hassio-addons/organization/commit/16923b2404d7bb452793442deb023d4f81450892

It will take a least 2 releases for each add-on to have an impact though.

Was this page helpful?
0 / 5 - 0 ratings