ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.87k stars 3.4k forks source link

Centos: Steam9 can't resolve the domain name, so it can't be installed with Docker #13023

Closed piaoxue1949 closed 1 year ago

piaoxue1949 commented 1 year ago

Please confirm the following

Bug Summary

When using Docker to install, the centos: steam9 image cannot install the package and resolve the domain name. An error is reported: Curl error (6): Couldn't resolve host name for https://mirrors.centos.org/metalink?repo=centos -baseos-9-stream&arch=x86_ 64&protocol=https,http [getaddrinfo() thread failed to start]

AWX version

21.7.0

Select the relevant components

Installation method

docker development environment

Modifications

no

Ansible version

ansible 2.9.27 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Jun 28 2022, 15:30:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

Operating system

CentOS Linux release 7.9.2009 (Core)

Web browser

No response

Steps to reproduce

git clone https://github.com/ansible/awx.git cd awx git checkout 21.7.0 make docker-compose-build

Expected results

make success

Actual results

ansible-playbook tools/ansible/dockerfile.yml -e build_dev=True -e receptor_image=quay.io/ansible/receptor:devel
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Render AWX Dockerfile and sources] **********************************************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************************************************************************
ok: [localhost]

TASK [dockerfile : Create _build directory] *******************************************************************************************************************************************************
ok: [localhost]

TASK [dockerfile : Render supervisor configs] *****************************************************************************************************************************************************
ok: [localhost] => (item=supervisor.conf)
ok: [localhost] => (item=supervisor_task.conf)

TASK [dockerfile : Render Dockerfile] *************************************************************************************************************************************************************
ok: [localhost]

PLAY RECAP ****************************************************************************************************************************************************************************************
localhost                  : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

DOCKER_BUILDKIT=1 docker build -t ghcr.io/ansible/awx_devel:HEAD \
    --build-arg BUILDKIT_INLINE_CACHE=1 \
    --cache-from=ghcr.io/ansible/awx_devel:HEAD .
[+] Building 1.5s (11/48)
 => [internal] load build definition from Dockerfile                                                                                                                                          0.0s
 => => transferring dockerfile: 32B                                                                                                                                                           0.0s
 => [internal] load .dockerignore                                                                                                                                                             0.0s
 => => transferring context: 34B                                                                                                                                                              0.0s
 => [internal] load metadata for quay.io/centos/centos:stream9                                                                                                                                0.0s
 => ERROR importing cache manifest from ghcr.io/ansible/awx_devel:HEAD                                                                                                                        0.4s
 => CACHED https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/podman-containers.conf                                                                       0.0s
 => [internal] load build context                                                                                                                                                             0.0s
 => => transferring context: 1.31kB                                                                                                                                                           0.0s
 => CANCELED FROM quay.io/ansible/receptor:devel                                                                                                                                              1.4s
 => => resolve quay.io/ansible/receptor:devel                                                                                                                                                 1.4s
 => CACHED https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf                                                                              0.0s
 => CACHED [builder 1/9] FROM quay.io/centos/centos:stream9                                                                                                                                   0.0s
 => ERROR [builder 2/9] RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' &&     dnf config-manager --set-enabled crb &&     dnf -y install     gcc     gcc-c++     git-core  1.0s
 => ERROR [stage-1  2/32] RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' &&     dnf config-manager --set-enabled crb &&     dnf -y install acl     git-core     git-lfs    1.0s
------
 > importing cache manifest from ghcr.io/ansible/awx_devel:HEAD:
------
------
 > [builder 2/9] RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' &&     dnf config-manager --set-enabled crb &&     dnf -y install     gcc     gcc-c++     git-core     gettext     glibc-langpack-en     libffi-devel     libtool-ltdl-devel     make     nodejs     nss     openldap-devel     patch     postgresql     postgresql-devel     python3-devel     python3-pip     python3-psycopg2     python3-setuptools     swig     unzip     xmlsec1-devel     xmlsec1-openssl-devel:
#13 0.473 /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
#13 0.602 Failed to set locale, defaulting to C.UTF-8
#13 0.830 CentOS Stream 9 - BaseOS                        0.0  B/s |   0  B     00:00
#13 0.830 Errors during downloading metadata for repository 'baseos':
#13 0.830   - Curl error (6): Couldn't resolve host name for https://mirrors.centos.org/metalink?repo=centos-baseos-9-stream&arch=x86_64&protocol=https,http [getaddrinfo() thread failed to start]
#13 0.839 Error: Failed to download metadata for repo 'baseos': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.centos.org/metalink?repo=centos-baseos-9-stream&arch=x86_64&protocol=https,http [getaddrinfo() thread failed to start]
------
------
 > [stage-1  2/32] RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' &&     dnf config-manager --set-enabled crb &&     dnf -y install acl     git-core     git-lfs     glibc-langpack-en     krb5-workstation     nginx     "openldap >= 2.6.2-3"     postgresql     python3-devel     python3-libselinux     python3-pip     python3-psycopg2     python3-setuptools     rsync     "rsyslog >= 8.1911.0"     subversion     sudo     vim-minimal     which     unzip     xmlsec1-openssl &&     dnf -y clean all:
#6 0.472 /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
#6 0.597 Failed to set locale, defaulting to C.UTF-8
#6 0.827 CentOS Stream 9 - BaseOS                        0.0  B/s |   0  B     00:00
#6 0.827 Errors during downloading metadata for repository 'baseos':
#6 0.827   - Curl error (6): Couldn't resolve host name for https://mirrors.centos.org/metalink?repo=centos-baseos-9-stream&arch=x86_64&protocol=https,http&countme=1 [getaddrinfo() thread failed to start]
#6 0.827   - Curl error (6): Couldn't resolve host name for https://mirrors.centos.org/metalink?repo=centos-baseos-9-stream&arch=x86_64&protocol=https,http [getaddrinfo() thread failed to start]
#6 0.837 Error: Failed to download metadata for repo 'baseos': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.centos.org/metalink?repo=centos-baseos-9-stream&arch=x86_64&protocol=https,http [getaddrinfo() thread failed to start]
------
executor failed running [/bin/sh -c dnf -y update && dnf install -y 'dnf-command(config-manager)' &&     dnf config-manager --set-enabled crb &&     dnf -y install acl     git-core     git-lfs     glibc-langpack-en     krb5-workstation     nginx     "openldap >= 2.6.2-3"     postgresql     python3-devel     python3-libselinux     python3-pip     python3-psycopg2     python3-setuptools     rsync     "rsyslog >= 8.1911.0"     subversion     sudo     vim-minimal     which     unzip     xmlsec1-openssl &&     dnf -y clean all]: exit code: 1
make: *** [docker-compose-build] 错误 1
[root@k8s-master awx]# docker pull ghcr.io/ansible/awx_devel:HEAD
Error response from daemon: manifest unknown
[root@k8s-master awx]# docker pull ghcr.io/ansible/awx_devel:HEAD
Error response from daemon: manifest unknown

Additional information

微信图片_20221009163341

piaoxue1949 commented 1 year ago
[root@k8s-master awx]# curl https://mirrors.centos.org
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://mirrors.centos.org/publiclist/">here</a>.</p>
<hr>
<address>Apache Server at mirrors.centos.org Port 443</address>
</body></html>
[root@k8s-master awx]# docker run -it --rm quay.io/centos/centos:stream9 curl https://mirrors.centos.org
curl: (6) getaddrinfo() thread failed to start

微信图片_20221009165101

shanemcd commented 1 year ago

I'm assuming something broke on the centos side of things. It should resolve itself, if it hasn't already. We can leave this issue open until someone confirms.

kurokobo commented 1 year ago

@piaoxue1949 The latest centos:stream9 works on my side. If your issue persists after re-pulling the image, simply there might be issues around your Docker network and/or name resolution in contianers (and if so this is not AWX issue).

$ docker rmi quay.io/centos/centos:stream9

$ docker images
REPOSITORY              TAG       IMAGE ID       CREATED       SIZE
quay.io/centos/centos   stream9   047d6e0a5993   3 weeks ago   155MB

$ docker run -it --rm quay.io/centos/centos:stream9 curl https://mirrors.centos.org
Unable to find image 'quay.io/centos/centos:stream9' locally
stream9: Pulling from centos/centos
fb45a2dfc12a: Pull complete 
Digest: sha256:4d72ac09d6e816b7b2625ce84b73eda477efef8aeaae881c372cd84c611df383
Status: Downloaded newer image for quay.io/centos/centos:stream9
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://mirrors.centos.org/publiclist/">here</a>.</p>
<hr>
<address>Apache Server at mirrors.centos.org Port 443</address>
</body></html>
mabashian commented 1 year ago

@piaoxue1949

Thank you very much for for this issue. It means a lot to us that you have taken time to contribute by opening this report.

On this issue, there were comments added but it has been some time since then without response. At this time we are closing this issue. If you get time to address the comments we can reopen the issue if you can contact us by using any of the communication methods listed in the page below:

https://github.com/ansible/awx/#get-involved

Thank you once again for this and your interest in AWX!