Kubespray: CoreOs : Unable to find any of pip2, pip to use. pip needs to be installed

Created on 3 Jul 2017  路  2Comments  路  Source: kubernetes-sigs/kubespray

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

BUG REPORT

Environment:

  • Cloud provider or hardware configuration:
    RackSpace
  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
    Linux 4.6.3-coreos x86_64
    NAME=CoreOS
    ID=coreos
    VERSION=1068.10.0
    VERSION_ID=1068.10.0
    BUILD_ID=2016-08-23-0220
    PRETTY_NAME="CoreOS 1068.10.0 (MoreOS)"
    ANSI_COLOR="1;32"
    HOME_URL="https://coreos.com/"
    BUG_REPORT_URL="https://github.com/coreos/bugs/issues"

  • Version of Ansible (ansible --version):

ansible 2.3.1.0
config file = /Users/XXXX/Documents/kubernetes/kargo/kargo-2.1.1/ansible.cfg
configured module search path = [u'./library']
python version = 2.7.10 (default, Feb 7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]

Kubespray version (commit) (git rev-parse --short HEAD):
kargo-2.1.1
kubespray-master (6e7323e3e8781bd8cbf3f278b1e207f1fb5c793c)

Network plugin used:
default

Copy of your inventory file:
https://gist.github.com/egulatee/1dfa31e6ecfa21d7e2731212be9a14ee

Command used to invoke ansible:
ansible-playbook -i inventory/inventory cluster.yml -vvv

Output of ansible run:

https://gist.github.com/egulatee/13470365d208ab0c7cb9d5be527fc474

Anything else do we need to know:

Did following items from kubespray/coreos.md

  • You should set the bootstrap_os variable to coreos
  • Ensure that the bin_dir is set to /opt/bin
  • ansible_python_interpreter should be /opt/bin/python. This will be laid down by the bootstrap task.

Notice the warning, which might be the root cause for the error
/lib64/libssl.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)\rn/opt/bin/pypy/bin/pypy: /lib64/libssl.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)\rn/opt/bin/pypy/bin/pypy: /lib64/libcrypto.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)\rn/opt/bin/pypy/bin/pypy: /lib64/libssl.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)\rn/opt/bin/pypy/bin/pypy: /lib64/libssl.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)\rn/opt/bin/pypy/bin/pypy: /lib64/libcrypto.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)\rn\rn

After ssh'ing into CoreOS server.
I do see bootstrapped pip & python under /opt/bin
However starting python gives the warning.

server-02 bin # ./python
/opt/bin/pypy/bin/pypy: /lib64/libssl.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)
/opt/bin/pypy/bin/pypy: /lib64/libssl.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)
/opt/bin/pypy/bin/pypy: /lib64/libcrypto.so.1.0.0: no version information available (required by /opt/bin/pypy/bin/libpypy-c.so)
Python 2.7.10 (3260adbeba4a, Apr 19 2016, 17:42:20)
[PyPy 5.1.0 with GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Most helpful comment

I have got the same problem, and then figout that https://github.com/chunlea/kubespray/commit/575b6deaf98e6f99165df04053ef257434a56fa9 can fix it.

The problem is that, when you read the file in /tmp like /tmp/node1 for me,

    "ansible_env": {
        "HOME": "/root",
        "LD_LIBRARY_PATH": "/opt/bin/pypy/lib:",
        "LOGNAME": "root",
        "MAIL": "/var/mail/root",
        "PATH": "/usr/bin:/bin:/usr/sbin:/sbin",
        "PWD": "/root",
        "SHELL": "/bin/bash",
        "SHLVL": "2",
        "SSH_CLIENT": "112.96.109.159 57727 22",
        "SSH_CONNECTION": "112.96.109.159 57727 192.168.101.10 22",
        "USER": "root",
        "_": "/opt/bin/python"
    },

The PATH didn't has /opt/bin in it, so we need to point the execute for pip.

All 2 comments

Seems related to
https://github.com/kubernetes/contrib/issues/659

But in all.yml I do have
ansible_python_interpreter: /opt/bin/python

I have got the same problem, and then figout that https://github.com/chunlea/kubespray/commit/575b6deaf98e6f99165df04053ef257434a56fa9 can fix it.

The problem is that, when you read the file in /tmp like /tmp/node1 for me,

    "ansible_env": {
        "HOME": "/root",
        "LD_LIBRARY_PATH": "/opt/bin/pypy/lib:",
        "LOGNAME": "root",
        "MAIL": "/var/mail/root",
        "PATH": "/usr/bin:/bin:/usr/sbin:/sbin",
        "PWD": "/root",
        "SHELL": "/bin/bash",
        "SHLVL": "2",
        "SSH_CLIENT": "112.96.109.159 57727 22",
        "SSH_CONNECTION": "112.96.109.159 57727 192.168.101.10 22",
        "USER": "root",
        "_": "/opt/bin/python"
    },

The PATH didn't has /opt/bin in it, so we need to point the execute for pip.

Was this page helpful?
0 / 5 - 0 ratings