Move container tasks to separate role#595
Conversation
| when: usr_local_bin_rcc.stat.exists | ||
|
|
||
| - name: Add local docker.io registry mirror | ||
| command: "{{ rcc_path }} --conf={{ container_service_conf }} add-mirror docker.io {{ container_mirror }}" |
There was a problem hiding this comment.
| command: "{{ rcc_path }} --conf={{ container_service_conf }} add-mirror docker.io {{ container_mirror }}" | |
| command: "{{ rcc_path }} add-mirror docker.io {{ container_mirror }}" |
There should not be a need to specify the config anymore.
There was a problem hiding this comment.
If both exist, will they get modified?
There was a problem hiding this comment.
Something's still off then. This was on an Ubuntu 16.04 machine with docker.io installed. It shouldn't be looking for /etc/containers/registries.conf
TASK [container-host : Add local docker.io registry mirror] ********************************************************************************************************************************************************************************************************************
task path: /home/dgalloway/git/ceph/ceph-cm-ansible/roles/container-host/tasks/container_mirror.yml:53
changed: [gibba036.front.sepia.ceph.com] => {
"changed": true,
"cmd": [
"/usr/local/bin/registries-conf-ctl",
"add-mirror",
"docker.io",
"docker-mirror.front.sepia.ceph.com:5000"
],
"delta": "0:00:00.069744",
"end": "2020-12-03 18:55:43.784405",
"invocation": {
"module_args": {
"_raw_params": "/usr/local/bin/registries-conf-ctl add-mirror docker.io docker-mirror.front.sepia.ceph.com:5000",
"_uses_shell": false,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"rc": 0,
"start": "2020-12-03 18:55:43.714661",
"stderr": "",
"stderr_lines": [],
"stdout": "Ex: [Errno 2] No such file or directory: '/etc/containers/registries.conf'",
"stdout_lines": [
"Ex: [Errno 2] No such file or directory: '/etc/containers/registries.conf'"
]
}
There was a problem hiding this comment.
| pip: | ||
| name: git+https://github.com/sebastian-philipp/registries-conf-ctl | ||
| state: latest | ||
|
|
There was a problem hiding this comment.
executable: pip3.3
Maybe this could avoid the search of the installed package ... just an idea
There was a problem hiding this comment.
We don't have pip3 on all our testnodes.
jmolmo
left a comment
There was a problem hiding this comment.
LGTM. But i have not a good knowledge of the ceph testing labs. So i'm probably not the ideal one to detect collateral/unexpected effects.
I would've liked to keep all this in common but there's a chicken and egg situation. docker and/or podman get installed during the testnode role. The testnode role can only be run after the common role. The testnode role is also where some repos are added. So we need to install docker/podman and configure it after the testnodes role runs. Since we also want to be able to configure docker/podman on other systems, I couldn't put these tasks in the testnode role. Signed-off-by: David Galloway <dgallowa@redhat.com>
4de8646 to
72b6473
Compare
|
Still not working: @jmolmo any idea? |
|
I think that the modification in the docker config file is done: But .. I cannot find any restart of the docker service.. so probably the new configuration is not used. |
I would've liked to keep all this in the
commonrole but there's a chicken and egg situation.docker and/or podman get installed during the testnode role. The testnode role can only be run after the common role. The testnode role is also where some repos are added.
So we need to install docker/podman and configure it after the testnodes role runs. Since we also want to be able to configure docker/podman on other systems, I couldn't put these tasks in the testnode role.
Signed-off-by: David Galloway dgallowa@redhat.com