You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running the pull-retag-push-images.sh script, the /pull-retag-push.yml/
playbook fails on the Push container images (may take a long time) task.
Inspection of the docker logs on the seed vm shows that it fails to connect to the
registry:
May 16 11:21:39 seed dockerd[29263]: time="2024-05-16T11:21:39.784093624Z" level=info msg="Attempting next endpoint for push after error: Get \"https://192.168.33.5:4000/v2/\": dial tcp 192.168.33.5:4000: connect: connection refused" spanID=56f2c85d5a1eb66e traceID=1d69a163f4ea809d25bbc3043b651a88
May 16 11:21:39 seed dockerd[29263]: time="2024-05-16T11:21:39.784305527Z" level=info msg="Attempting next endpoint for push after error: Get \"http://192.168.33.5:4000/v2/\": dial tcp 192.168.33.5:4000: connect: connection refused" spanID=56f2c85d5a1eb66e traceID=1d69a163f4ea809d25bbc3043b651a88
Inspection of docker in the seed vm shows that the registry container is not running.
To debug this, rerun the previous step with some verbose output kayobe seed host configure -vvv
Line 8491 in the following output shows 'enabled': False. This is due to the
Recursive grepping for the docker_registry_enabled variable shows that it is
being set in a couple of places. Importantly, the default (False) is set in ansible/inventory/group_vars/all/docker-registry.
This value does not get overwritten by the role default due to the precedence
rules of ansible variables.1 So the behaviour that the variable defaults to False is expected, but nevertheless surprising when you follow the tutorial! The following output shows what files touch the variable:
[kayobe-venv] rocky@ad-univ-mu ~/kayobe (stable/2023.1)
> rg registry_enabled
etc/kayobe/docker.yml
28:# Default is false, unless docker_registry_enabled is true and
etc/kayobe/docker-registry.yml
6:#docker_registry_enabled:
doc/source/configuration/reference/docker-registry.rst
18:``docker_registry_enabled``
ansible/roles/docker-registry/defaults/main.yml
9:docker_registry_enabled: true
48: enabled: "{{ docker_registry_enabled }}"
ansible/roles/docker-registry/README.md
18:``docker_registry_enabled``: Whether the Docker registry is enabled. Defaults
ansible/inventory/group_vars/all/docker-registry
6:docker_registry_enabled: False
ansible/inventory/group_vars/all/docker
28:# Default is false, unless docker_registry_enabled is true and
30:docker_registry_insecure: "{{ docker_registry_enabled | bool and not docker_registry_enable_tls | bool }}"
config/src/kayobe-config/etc/kayobe/kolla.yml
89:# images. Default is false, unless docker_registry_enabled is true and
config/src/kayobe-config/etc/kayobe/docker.yml
29:# Default is false, unless docker_registry_enabled is true and
config/src/kayobe-config/etc/kayobe/docker-registry.yml
6:#docker_registry_enabled:
Workaround
Set the following in config/src/kayobe-config/etc/kayobe/docker-registry.yml
While running the
pull-retag-push-images.sh
script, the /pull-retag-push.yml/playbook fails on the
Push container images (may take a long time)
task.Inspection of the docker logs on the seed vm shows that it fails to connect to the
registry:
Inspection of docker in the seed vm shows that the registry container is not running.
To debug this, rerun the previous step with some verbose output
kayobe seed host configure -vvv
Line 8491 in the following output shows
'enabled': False
. This is due to theRecursive grepping for the
docker_registry_enabled
variable shows that it isbeing set in a couple of places. Importantly, the default (False) is set in
ansible/inventory/group_vars/all/docker-registry
.This value does not get overwritten by the role default due to the precedence
rules of ansible variables.1 So the behaviour that the variable defaults to
False
is expected, but nevertheless surprising when you follow the tutorial! The following output shows what files touch the variable:Workaround
Set the following in config/src/kayobe-config/etc/kayobe/docker-registry.yml
Possible solution
Maybe just mention this in the top level readme?
Footnotes
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence ↩
The text was updated successfully, but these errors were encountered: