While deploying K8S cluster by following the instructions [1], i encountered an errors while running the last command ``make dev-deploy k8s multinode`` (see error logs below)
[1] https://docs.openstack.org/openstack-helm/latest/install/kubernetes-gate.html
Error Logs:
------------
TASK [build-images : Kubeadm-AIO image build path] *******************************************************************************************************************************
changed: [node_one]
changed: [node_two]
changed: [node_three]
changed: [node_four]
TASK [build-images : Kubeadm-AIO image build path with proxy] ********************************************************************************************************************
fatal: [node_four]: FAILED! => {"changed": true, "cmd": "set -e\n docker build --network host --force-rm --tag \"openstackhelm/kubeadm-aio:dev\" --file tools/images/kubeadm-aio/Dockerfile --build-arg KUBE_VERSION=\"v1.10.5\" --build-arg CNI_VERSION=\"v0.6.0\" --build-arg HELM_VERSION=\"v2.9.1\" --build-arg CHARTS=\"calico,flannel,tiller,kube-dns,kubernetes-keystone-webhook\" --build-arg HTTP_PROXY=\"\" --build-arg HTTPS_PROXY=\"\" --build-arg NO_PROXY=\"\" .", "delta": "0:00:00.019137", "end": "2018-07-24 15:27:58.944170", "msg": "non-zero return code", "rc": 1, "start": "2018-07-24 15:27:58.925033", "stderr": "unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/ubuntu/tools: no such file or directory", "stderr_lines": ["unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/ubuntu/tools: no such file or directory"], "stdout": "", "stdout_lines": []}
fatal: [node_three]: FAILED! => {"changed": true, "cmd": "set -e\n docker build --network host --force-rm --tag \"openstackhelm/kubeadm-aio:dev\" --file tools/images/kubeadm-aio/Dockerfile --build-arg KUBE_VERSION=\"v1.10.5\" --build-arg CNI_VERSION=\"v0.6.0\" --build-arg HELM_VERSION=\"v2.9.1\" --build-arg CHARTS=\"calico,flannel,tiller,kube-dns,kubernetes-keystone-webhook\" --build-arg HTTP_PROXY=\"\" --build-arg HTTPS_PROXY=\"\" --build-arg NO_PROXY=\"\" .", "delta": "0:00:00.020632", "end": "2018-07-24 15:27:58.968766", "msg": "non-zero return code", "rc": 1, "start": "2018-07-24 15:27:58.948134", "stderr": "unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/ubuntu/tools: no such file or directory", "stderr_lines": ["unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/ubuntu/tools: no such file or directory"], "stdout": "", "stdout_lines": []}
fatal: [node_two]: FAILED! => {"changed": true, "cmd": "set -e\n docker build --network host --force-rm --tag \"openstackhelm/kubeadm-aio:dev\" --file tools/images/kubeadm-aio/Dockerfile --build-arg KUBE_VERSION=\"v1.10.5\" --build-arg CNI_VERSION=\"v0.6.0\" --build-arg HELM_VERSION=\"v2.9.1\" --build-arg CHARTS=\"calico,flannel,tiller,kube-dns,kubernetes-keystone-webhook\" --build-arg HTTP_PROXY=\"\" --build-arg HTTPS_PROXY=\"\" --build-arg NO_PROXY=\"\" .", "delta": "0:00:00.019584", "end": "2018-07-24 15:27:58.953319", "msg": "non-zero return code", "rc": 1, "start": "2018-07-24 15:27:58.933735", "stderr": "unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/ubuntu/tools: no such file or directory", "stderr_lines": ["unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/ubuntu/tools: no such file or directory"], "stdout": "", "stdout_lines": []}
changed: [node_one]
TASK [build-images : Kubeadm-AIO image build path] *******************************************************************************************************************************
skipping: [node_one]
to retry, use: --limit @/opt/openstack-helm-infra/playbooks/osh-infra-build.retry
PLAY RECAP ***********************************************************************************************************************************************************************
node_four : ok=2 changed=1 unreachable=0 failed=1
node_one : ok=16 changed=14 unreachable=0 failed=0
node_three : ok=2 changed=1 unreachable=0 failed=1
node_two : ok=2 changed=1 unreachable=0 failed=1
Post troubleshooting, it looks like openstack- helm-infra/ roles/build- images/ tasks/kubeadm- aio.yaml "Kubeadm-AIO image build path with proxy" task is building a docker image. This docker image need not to be build by every host in the inventory file.
So to fix this we need need to update inventory file with k8s master (primary) hostgroup instead of all (hostgroup)