2

I am trying to install openshift origin (OKD) 3.11 in an environment using proxy. When I run the prerequisites.yml it fails with the following error.

fatal: [hostname_of_master]: FAILED! => {"attemps": 3, "changed": false, "msg": "time=\"2019-12-****" level=fatal msg=\"pinging docker registry returned: Get https://registry.redhat.io/v2/: proxyconnect tcp: EOF\" \n", "state": "unknown"}

I am able to curl to https://registry.redhat.io successfully, but it seems that the playbooks is trying to ping registry.redhat.io.

I tried docker login https://registry.redhat.io but it also failed with the following error. It seems it is also trying to connect to registry.redhat.io network routing instead of http_proxy.

Error response from daemon: Get https://registry.redhat.io:443/v1/users/: dial tcp 104.84.217.186:443: connect: network is unreachable

I found this very similar to my problem on google but couldn't make any use of it. https://bugzilla.redhat.com/show_bug.cgi?id=1511869

I have configured proxy at OS level as well as in openshift inventory. I am using openshift-ansible 3.11 which i cloned from git and cheched out the branch 3.11.

srv_ER
  • 123
  • 1
  • 11

1 Answers1

1

I configured the docker proxy using the below procedure and was able to login successfully using docker. The playbook is using skopeo to login and I have asked for it separately, mentioned below.

[root@testapache ~]# mkdir /etc/systemd/system/docker.service.d
[root@testapache ~]# mv http-proxy.conf /etc/systemd/system/docker.service.d/
[root@testapache ~]# cat /etc/systemd/system/docker.service.d/http-proxy.conf 
[Service]
Environment="HTTP_PROXY=http://192.168.122.21:3128/"
Environment="HTTPS_PROXY=http://192.168.122.21:3128/"
[root@testapache ~]#
[root@testapache ~]#
[root@testapache ~]# systemctl daemon-reload
[root@testapache ~]#  systemctl restart docker
[root@testapache ~]#
[root@testapache ~]#
[root@testapache ~]# docker login registry.redhat.io -u user_openshift -p **********
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

skopeo inspect does not work behind proxy

srv_ER
  • 123
  • 1
  • 11