Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ch4 (cluster-local-vms) - Testing the cluster with a deployment using Ansible [SOLUTION] #99

Open
adelerhof opened this issue Apr 4, 2021 · 1 comment

Comments

@adelerhof
Copy link

Task "Create hello-k8s resources and wait until they are Ready." fails due to a bug in Python openshift 0.12:
https://github.com/kubernetes-client/python/issues/1333

Error:

The full traceback is:
Traceback (most recent call last):

...

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb694668650>: Failed to establish a new connection: [Errno 111] Connection refused',))
failed: [kube1] (item=hello-k8s-deployment.yml) => {

...

\"/usr/local/lib/python2.7/dist-packages/urllib3/util/retry.py\", line 574, in increment\r\n    raise MaxRetryError(_pool, url, error or ResponseError(cause))\r\nurllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb694668650>: Failed to establish a new connection: [Errno 111] Connection refused',))\r\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

This can be solved by setting the openshift version in the test-deployment pre_task:

  pre_tasks:
    - name: Ensure k8s module dependencies are installed.
      pip:
        name: openshift==0.11.0
        state: present
@geerlingguy
Copy link
Owner

@adelerhof - According to this issue (ansible-collections/community.kubernetes#314), if you update Ansible to the latest version (2.9.17 or later or the latest 3.x version), then the problem should be resolved as well.

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

No branches or pull requests

2 participants