Closed pikatenor closed 2 months ago
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Describe the issue you are experiencing
I am using a self-hosted private docker registry with authority that includes the port number and the image tag is like this:
registry.example.com:5000/image-name
However, when I register the credentials for this registry to Supervisor, the API returns success, but the result is not actually saved.
Also, if I edit docker.json directly, Supervisor cannot read it.
What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
Steps to reproduce the issue
Using REST API:
POST /docker/registries
with this json:{"registry.example.com:5000": {"username": "me", "password": "supersecret"}}
Using dashboard (Websocket API):
registry.example.com:5000
Anything in the Supervisor logs that might be useful for us?
When I try to save the configuration or edit docker.json and restart Supervisor, I get the following logs:
System Health information
System Information
Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 12.3 -- | -- update_channel | stable supervisor_version | supervisor-2024.05.1 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 116.8 GB disk_used | 4.0 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (18.0.0), NGINX Home Assistant SSL proxy (3.9.0)Dashboards
dashboards | 2 -- | -- resources | 0 views | 0 mode | storageRecorder
oldest_recorder_run | June 2, 2024 at 4:36 AM -- | -- current_recorder_run | June 4, 2024 at 1:23 PM estimated_db_size | 0.63 MiB database_engine | sqlite database_version | 3.44.2Supervisor diagnostics
No response
Additional information
I think the value violates this validation rule, and it prevents reloading the config after saving.
https://github.com/home-assistant/supervisor/blob/c4452a85b4cabaabdeb35f548cd4cf3b7c850f66/supervisor/validate.py#L50
https://github.com/home-assistant/supervisor/blob/c4452a85b4cabaabdeb35f548cd4cf3b7c850f66/supervisor/validate.py#L169-L180
I have not been able to identify how the registry location is specified in the OCI specification, but at least the Docker implementation allows the image name with port numbers.
https://docs.docker.com/reference/cli/docker/image/tag/#description