Known Issues
Failed to Install pip3
task path: /home/box/seo/dek/roles/infrastructure/docker/tasks/install_pip_dep.yml:16 ... File "/home/box/.local/lib/python3.8/site-packages/pip/_internal/locations/__init__.py", line 244, in get_scheme from . import _distutils ImportError: cannot import name '_distutils' from 'pip._internal.locations' (/home/box/.local/lib/python3.8/site-packages/pip/_internal/locations/__init__.py)
There is something wrong in the
See also #11103
The solution is to use the Ubuntu maintained one instead:
rm -rf ~/.local sudo apt install pipenv pipenv install
No Attribute MutableMapping
File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/utils.py", line 27, in <module> from .cookies import RequestsCookieJar, cookiejar_from_dict File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/cookies.py", line 172, in <module> class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): AttributeError: module 'collections' has no attribute 'MutableMapping'
Upgrade
pip3 install --upgrade pipenv
Error Installing PyYAML
Failed to install PyYAML with error message:
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 103, in __getattr__ raise AttributeError(attr) AttributeError: cython_sources
As mentioned in #724, you can use version 5.3.1 until the issue is resolved.
--- a/roles/infrastructure/docker/files/requirements.txt +++ b/roles/infrastructure/docker/files/requirements.txt @@ -17,7 +17,7 @@ paramiko==2.9.2 pycparser==2.21 PyNaCl==1.5.0 python-dotenv==0.19.2 -PyYAML==5.4.1 +PyYAML==5.3.1 requests==2.27.1 six==1.16.0 texttable==1.6.4
The Role for PTP Was Not Found
ERROR! the role 'infrastructure/ptp/controlplane' was not found in /home/box/dek/playbooks/roles:/home/box/dek/roles:/home/box/dek/roles/baseline_ansible:/home/box/dek/playbooks The error appears to be in '/home/box/dek/playbooks/infrastructure.yml': line 59, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: roles: - role: infrastructure/ptp/controlplane ^ here
The roles in
mkdir -p infrastructure/ptp/{controlplane,node}
Failed to Initialize Cluster
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
Check
sudo systemctl status kubelet sudo docker ps -a
Check the logs of
journalctl -r -u kubelet | grep apiserver ... "Failed to admit pod, unexpected error while attempting to recover from admission failure" pod="kube-system/kube-apiserver-joez-hce-ub20-vm-seo-test" err="preemption: error finding a set of pods to preempt: no set of running pods found to reclaim resources: [(res: cpu, q: 250), ]"
Which means there is not enough CPU resources for new Pods.
sudo grep reserved /tmp/config.yaml reservedSystemCPUs: 0,1 nproc 2
We reserved 2 CPUs for system daemons, no CPUs left for the Pods, more CPUs are required.
Pipenv Install Timeout
An error occurred while installing ansible==2.9.27! Will try again. An error occurred while installing cffi==1.15.0! Will try again. An error occurred while installing cryptography==3.3.2! Will try again. ERROR: Exception: ... File "/usr/lib/python3.8/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out
Maybe https://pypi.python.org/simple is too busy, use a mirror instead:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn pipenv run pip install ansible==2.9.27 cffi==1.15.0 cryptography==3.3.2