Skip to content

Move container tasks to separate role#595

Merged
djgalloway merged 1 commit intomasterfrom
wip-containers
Dec 3, 2020
Merged

Move container tasks to separate role#595
djgalloway merged 1 commit intomasterfrom
wip-containers

Conversation

@djgalloway
Copy link
Contributor

@djgalloway djgalloway commented Dec 2, 2020

I would've liked to keep all this in the common role 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

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 }}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If both exist, will they get modified?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'"
    ]
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"rc": 0,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip:
name: git+https://github.com/sebastian-philipp/registries-conf-ctl
state: latest

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

executable: pip3.3

Maybe this could avoid the search of the installed package ... just an idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have pip3 on all our testnodes.

Copy link
Member

@jmolmo jmolmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@djgalloway djgalloway changed the title Move container tasks to separate role DNM: Move container tasks to separate role Dec 3, 2020
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>
@djgalloway djgalloway changed the title DNM: Move container tasks to separate role Move container tasks to separate role Dec 3, 2020
@djgalloway djgalloway merged commit d9dbe0f into master Dec 3, 2020
@djgalloway djgalloway deleted the wip-containers branch December 3, 2020 20:59
@sebastian-philipp
Copy link

Still not working:

2020-12-04T10:17:20.002 INFO:tasks.workunit.client.0.smithi066.stderr:ceph:stderr Trying to pull docker.io/ceph/daemon-base:latest-octopus...
2020-12-04T10:17:20.002 INFO:tasks.workunit.client.0.smithi066.stderr:ceph:stderr   toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
2020-12-04T10:17:20.002 INFO:tasks.workunit.client.0.smithi066.stderr:ceph:stderr Error: unable to pull docker.io/ceph/daemon-base:latest-octopus: unable to pull image: Error initializing source docker://ceph/daemon-base:latest-octopus: Error reading manifest latest-octopus in docker.io/ceph/daemon-base: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

https://pulpito.ceph.com/swagner-2020-12-04_10:02:29-rados:cephadm-wip-jmolmo-testing-2020-12-02-1452-distro-basic-smithi/

@jmolmo any idea?

@jmolmo
Copy link
Member

jmolmo commented Dec 4, 2020

I think that the modification in the docker config file is done:

2020-12-04T10:13:51.939 INFO:teuthology.task.ansible.out:
TASK [container-host : Create /etc/docker/daemon.json if necessary] ************

2020-12-04T10:13:51.940 INFO:teuthology.task.ansible.out:changed: [smithi066.front.sepia.ceph.com] => {"changed": true, "checksum": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f", "dest": "/etc/docker/daemon.json", "gid": 0, "group": "root", "md5sum": "99914b932bd37a50b983c5e7c90ae93b", "mode": "0644", "owner": "root", "size": 2, "src": "/home/ubuntu/.ansible/tmp/ansible-tmp-1607076831.6391788-250634290175337/source", "state": "file", "uid": 0}

2020-12-04T10:13:51.975 INFO:teuthology.task.ansible.out:Friday 04 December 2020  10:13:51 +0000 (0:00:00.372)       0:01:41.638 ******* 

2020-12-04T10:13:52.233 INFO:teuthology.task.ansible.out:
TASK [container-host : Add local docker.io registry mirror] ********************

2020-12-04T10:13:52.235 INFO:teuthology.task.ansible.out:changed: [smithi066.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.121331", "end": "2020-12-04 10:13:52.105208", "rc": 0, "start": "2020-12-04 10:13:51.983877", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

But .. I cannot find any restart of the docker service.. so probably the new configuration is not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants