Kayobe seed host configure deploys registry even when docker_registry_enabled is false
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kayobe |
In Progress
|
Medium
|
Maksim Malchuk | ||
Antelope |
Confirmed
|
Medium
|
Unassigned | ||
Bobcat |
Confirmed
|
Medium
|
Unassigned | ||
Caracal |
In Progress
|
Medium
|
Maksim Malchuk | ||
Zed |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Kayobe 14.1
I have set docker_
PLAY [Ensure a local Docker registry is deployed] *******
TASK [Gathering Facts] *******
task path: /home/ubuntu/
Thursday 01 February 2024 17:30:21 +0000 (0:00:00.202) 0:01:31.867 *****
ok: [kayobe]
TASK [docker-registry : include_tasks] *******
task path: /home/ubuntu/
Thursday 01 February 2024 17:30:22 +0000 (0:00:01.382) 0:01:33.249 *****
statically imported: /home/ubuntu/
redirecting (type: modules) ansible.
included: /home/ubuntu/
TASK [docker-registry : Ensure configuration path exists] *******
task path: /home/ubuntu/
Thursday 01 February 2024 17:30:23 +0000 (0:00:00.253) 0:01:33.503 *****
skipping: [kayobe] => changed=false
skip_reason: Conditional result was False
TASK [docker-registry : Ensure TLS certificate exists] *******
task path: /home/ubuntu/
Thursday 01 February 2024 17:30:23 +0000 (0:00:00.053) 0:01:33.557 *****
skipping: [kayobe] => changed=false
skip_reason: Conditional result was False
TASK [docker-registry : Ensure TLS key exists] *******
task path: /home/ubuntu/
Thursday 01 February 2024 17:30:23 +0000 (0:00:00.057) 0:01:33.615 *****
skipping: [kayobe] => changed=false
skip_reason: Conditional result was False
TASK [docker-registry : Ensure basic auth htpasswd file exists] *******
task path: /home/ubuntu/
Thursday 01 February 2024 17:30:23 +0000 (0:00:00.051) 0:01:33.666 *****
skipping: [kayobe] => changed=false
skip_reason: Conditional result was False
TASK [docker-registry : Ensure Docker registry container is running] *******
task path: /home/ubuntu/
Thursday 01 February 2024 17:30:23 +0000 (0:00:00.052) 0:01:33.719 *****
redirecting (type: modules) ansible.
redirecting (type: modules) ansible.
changed: [kayobe] => (item={'key': 'docker_registry', 'value': {'container_name': 'docker_registry', 'env': {'REGISTRY_
actions:
- stopped: 48c0cb76aac700d
timeout: null
- force: false
link: false
removed: 48c0cb76aac700d
volume_state: false
ansible_loop_var: item
item:
key: docker_registry
value:
container
enabled: false
env:
image: 1.2.3.4:
network_mode: host
ports: []
volumes:
- /etc/localtime:
- docker_
Here's the contents of docker-
(kayobe) ubuntu@
---
- import_tasks: config.yml
- name: Ensure Docker registry container is running
docker_container:
env: "{{ item.value.env }}"
image: "{{ item.value.image }}"
name: "{{ item.value.
network_mode: "{{ item.value.
ports: "{{ item.value.ports | default(omit) }}"
privileged: "{{ item.value.
read_only: "{{ item.value.
restart_policy: "{{ docker_
restart_
state: "{{ item.value.enabled | ternary('started', 'absent') }}"
volumes: "{{ item.value.volumes | select | list }}"
with_dict: "{{ docker_
I feel like there should be a when: docker_
Changed in kayobe: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Maksim Malchuk (mmalchuk) |
status: | Confirmed → In Progress |
Hmm, I guess kayobe thinks it is managing that container and you have an existing container with the same name. Kayobe is is doing: `state: absent`. I think you should be able to remove the seed from the docker-regsitry group to prevent this from happening:
https:/ /github. com/openstack/ kayobe/ blob/master/ etc/kayobe/ inventory/ groups# L77-L81
Change it to something like ((empty group):
[docker- registry]
I think the original idea was kayobe would clean up the container if you toggled docker_ registry_ enabled to false.