Ask Your Question
0

kolla-ansible pull docker error - proxy

asked 2017-07-25 14:04:16 -0500

updated 2017-07-25 14:12:20 -0500

Hello,

I'm continuing to work through the Quick Start guide for kolla-ansible multinode deployment.

Command

# kolla-ansible -i ~/multinode pull

Error on the host shows up as:

TASK [common : include] ***************************************************************************************************
included: /usr/local/share/kolla-ansible/ansible/roles/common/tasks/pull.yml for ansibleslave

TASK [common : Pulling kolla-toolbox image] *******************************************************************************
 [WARNING]: Module did not set no_log for auth_password

fatal: [ansibleslave]: FAILED! => {"changed": false, "failed": true, "msg": "Unknown error message: Network timed out while trying to connect to https://index.docker.io/v1/repositories/kolla/ubuntu-binary-kolla-toolbox/images. You may want to check your internet connection or if you are behind a proxy."}
        to retry, use: --limit @/usr/local/share/kolla-ansible/ansible/site.retry

On the slave (ansibleslave) syslog gives:

Jul 25 14:36:32 ansibleslave ansible-setup: message repeated 6 times: [ Invoked with filter=* gather_subset=['all'] fact_path=/etc/ansible/facts.d gather_timeout=10]
Jul 25 14:36:33 ansibleslave ansible-kolla_docker: [WARNING] Module did not set no_log for auth_password
Jul 25 14:36:33 ansibleslave ansible-kolla_docker: Invoked with tls_key=None image=kolla/ubuntu-binary-kolla-toolbox:auto labels={} tls_verify=False pid_mode=None tls_cacert=None auth_password=NOT_LOGGING_PASSWORD environment=None auth_registry=None volumes_from=None tls_cert=None common_options={'auth_email': None, 'restart_policy': 'unless-stopped', 'environment': {'KOLLA_CONFIG_STRATEGY': 'COPY_ALWAYS'}, 'auth_registry': None, 'restart_retries': '10', 'auth_password': None, 'auth_username': None} api_version=auto remove_on_exit=True restart_retries=10 detach=True auth_username=None name=None security_opt=[] cap_add=[] restart_policy=None privileged=False auth_email=None ipc_mode=None volumes=None action=pull_image
Jul 25 14:36:48 ansibleslave docker[1305]: time="2017-07-25T14:36:48.016883767-04:00" level=warning msg="Error getting v2 registry: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Jul 25 14:36:48 ansibleslave docker[1305]: time="2017-07-25T14:36:48.016960032-04:00" level=error msg="Attempting next endpoint for pull after error: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Jul 25 14:37:18 ansibleslave docker[1305]: time="2017-07-25T14:37:18.021194155-04:00" level=error msg="Not continuing with pull after error: Network timed out while trying to connect to https://index.docker.io/v1/repositories/kolla/ubuntu-binary-kolla-toolbox/images. You may want to check your internet connection or if you are behind a proxy."

It seems to me that I may need to set up docker to use http_proxy as I am behind a corporate proxy. I do have http_proxy and https_proxy environment variables set for root and this seems to work for apt-get but maybe not docker?

The docker documentation seems to indicate it should use those environment variables too?

Any help greatly appreciated.

Oh. Also, when I try to do

# tools/start-registry

I get another error:

root@ansible-host:~/kolla# tools/start-registry
Unable to find image 'registry:2' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.

Probably related, I suspect...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-07-26 03:29:06 -0500

Hi, Docker systemd files need proxy settings.

Please check, https://docs.docker.com/engine/admin/systemd/#httphttps-proxy

As sort resume for kolla-ansible, assume your systemd service is /etc/systemd/system/docker.service.d/kolla.conf:

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"
ExecStart=
ExecStart=/usr/bin/dockerd --insecure-registry 192.168.100.1:4000
MountFlags=shared

Then reload systemd daemons and restart docker.

systemctl daemon-reload
systemctl restart docker

Regards

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-07-25 14:04:16 -0500

Seen: 1,175 times

Last updated: Jul 26 '17