haxorof/ansible-role-docker-ce

Hung at checking if docker-ce-cli is installed

guofengzh opened this issue · 6 comments

ansible: 2.9.10
target OS: CentOS Linux release 7.8.2003 (Core), a fresh OS installation without any docker preinstalled.
ansible control machine OS: CentOS Linux release 8.2.2004 (Core)

I use the lastest master of the project. Ansible hung at the task "Ensure Docker CE is installed" (install-docker.yml) (I wait for about half an hour, but the task still running and not finished)

Removing "docker-ce-cli" from the docker_packages list, the task runs well and the whole installation finished successfully.

Thanks for reporting this @guofengzh.

I have been using this role (latest version) also on new CentOS installations this week and have not experienced this issue but then used Ansible 2.9.8. I think I will manage to run a regressiontest on CentOS this week with latest Ansible 2.9.10 and check the result.

Also I checked the Docker documentation (https://docs.docker.com/engine/install/centos/) if they have changed anything but it is still the same and there you see they write:

$ sudo yum install docker-ce docker-ce-cli containerd.io

If you do the install of docker manually like the above example on the machine. Does that also hang? Is it possible to submit some verbose output for just that install task when it is hung?

Cheers!

The docker worked well on the target machine.

By what you described above, I log in to the taget macihine and I run the following command for providing more information.

First check what has been installed:

[root@hdp58 ~]# rpm -qa | grep docker
docker-ce-cli-19.03.12-3.el7.x86_64
docker-ce-19.03.12-3.el7.x86_64

Note: I do not install docker-ce-cli manually, that is, docker-ce-cli should be installed by the ansible role.

Now run the yum install:

[root@hdp58 ~]# sudo yum install docker-ce docker-ce-cli containerd.io
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: mirrors.163.com
 * updates: centos.01link.hk
base                                                     | 3.6 kB     00:00
docker-ce-stable                                         | 3.5 kB     00:00
extras                                                   | 2.9 kB     00:00
updates                                                  | 2.9 kB     00:00
updates/7/x86_64/primary_db                                | 2.9 MB   00:00
Package 3:docker-ce-19.03.12-3.el7.x86_64 already installed and latest version
Package 1:docker-ce-cli-19.03.12-3.el7.x86_64 already installed and latest version
Package containerd.io-1.2.13-3.2.el7.x86_64 already installed and latest version
Nothing to do
[root@hdp58 ~]#

I have run tests recreating similar target machine like you have:

[vagrant@centos7 ~]$ lsb_release -d
Description:    CentOS Linux release 7.8.2003 (Core)

[vagrant@centos7 ~]$ uname -a
Linux centos7.localdomain 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

The control node I have is a CentOS 7 with Ansible 2.9.10.

This setup above I have recreated from scratch several times and does not see any issues.

Might have been some glitch when you ran and yum did not manage to fetch the package. Is it possible that you can reproduce this exact problem and send me the ansible output on the task that is hung with verbose output? i.e. -vvv argument to ansible-playbook

Cheers!

I test an installer on that target machine, after finished it, I will let our IT guy re-install that machine and make a try again, then I will response here what will happen.

Thanks @guofengzh !

You're right, using the same OS version on the control machine and the target machines have no such issue occurred. I close this issue.

Thanks for your help.