pai icon indicating copy to clipboard operation
pai copied to clipboard

fatal: [node01]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access gcr.io. Unable to access gcr.io. The default runtime is not set correctly"}

Open liudican opened this issue 6 years ago • 21 comments

when I deploy Open PAI V1.0.y ,I'm step by step pass document, create config document,there are master.csv,worker.csv,config.csv: config.csv:

password: 123456
branch_name: pai-1.0.y
docker_image_tag: v1.0.0

# If you couldn't access to gcr.io or docker.io, please configure it.
# gcr_image_repo: "gcr.io"
gcr_image_repo: "registry.cn-hangzhou.aliyuncs.com"
# kube_image_repo: "gcr.io/google-containers"
kube_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers"
# quay_image_repo: "quay.io"
# docker_image_repo: "docker.io"
# kubeadm_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
kubeadm_download_url: "https://kubernetes.oss-cn-hangzhou.aliyuncs.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
# hyperkube_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"
hyperkube_download_url: "https://kubernetes.oss-cn-hangzhou.aliyuncs.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"
when I run :
/bin/bash quick-start-kubespray.sh -m /path/to/master.csv -w /path/to/worker.csv -c /path/to/config
error:
fatal: [node01]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access gcr.io. Unable to access gcr.io. The default runtime is not set correctly"}
fatal: [node02]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access gcr.io. OpenPAI's worker node should have 16 Gi free memory for service. The default runtime is not set correctly"}
so I shoud do what?thank you !

liudican avatar Jun 06 '20 09:06 liudican

comment this line, and try again https://github.com/microsoft/pai/blob/master/contrib/kubespray/quick-start-kubespray.sh#L51

ydye avatar Jun 08 '20 05:06 ydye

info:

TASK [display unmet requirements] *********************************************************************************************************************
fatal: [node01]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access docker.io. Unable to access docker.io. The default runtime is not set correctly"}
why?

liudican avatar Jun 08 '20 10:06 liudican

try again:

fatal: [node01]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access docker.io. Unable to access docker.io. The default runtime is not set correctly"}
skipping: [localhost]
        to retry, use: --limit @/home/tsing01/pai/contrib/kubespray/environment-check.retry

PLAY RECAP ********************************************************************************************************************************************
localhost                  : ok=10   changed=0    unreachable=0    failed=0
node01                     : ok=36   changed=0    unreachable=0    failed=1

Failed: There are unmet requirements in your cluster, the installation will be very likely to fail.

liudican avatar Jun 08 '20 10:06 liudican

*
fatal: [node01]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_eth0'\n\nThe error appears to have been in '/home/tsing01/pai/contrib/kubespray/environment-check.yml': line 9, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: set ansible control host IP fact\n      ^ here\n"}

liudican avatar Jun 08 '20 10:06 liudican

Monday 08 June 2020  18:36:39 +0800 (0:00:00.076)       0:01:14.265 ***********
FAILED - RETRYING: download_container | Download image if required (4 retries left).
FAILED - RETRYING: download_container | Download image if required (3 retries left).
FAILED - RETRYING: download_container | Download image if required (2 retries left).
FAILED - RETRYING: download_container | Download image if required (1 retries left).
fatal: [node01 -> 192.168.11.251]: FAILED! => {"attempts": 4, "changed": true, "cmd": ["/usr/bin/docker", "pull", "gcr.io/google_containers/pause-amd64:3.1"], "delta": "0:00:15.069688", "end": "2020-06-08 18:38:19.257258", "msg": "non-zero return code", "rc": 1, "start": "2020-06-08 18:38:04.187570", "stderr": "Error response from daemon: Get https://gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)", "stderr_lines": ["Error response from daemon: Get https://gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"], "stdout": "", "stdout_lines": []}

liudican avatar Jun 08 '20 10:06 liudican

my config info:

password: 123
branch_name: pai-1.0.y
docker_image_tag: v1.0.0

# Optional

#############################################
# Ansible-playbooks' inventory hosts' vars. #
#############################################
# ssh_key_file_path: /path/to/you/key/file

#####################################
# OpenPAI's service image registry. #
#####################################
# docker_registry_domain: docker.io
# docker_registry_namespace: openpai
# docker_registry_username: exampleuser
# docker_registry_password: examplepasswd

###########################################################################################
#                         Pre-check setting                                               #
# By default, we assume your gpu environment is nvidia. So your runtime should be nvidia. #
# If you are using AMD or other environment, you should modify it.                        #
###########################################################################################
# worker_default_docker_runtime: nvidia
# docker_check: true

# resource_check: true

# gpu_type: nvidia

########################################################################################
# Advanced docker configuration. If you are not familiar with them, don't change them. #
########################################################################################
# docker_data_root: /mnt/docker
# docker_config_file_path: /etc/docker/daemon.json
# docker_iptables_enabled: false

## An obvious use case is allowing insecure-registry access to self hosted registries.
## Can be ipaddress and domain_name.
## example define 172.19.16.11 or mirror.registry.io
# openpai_docker_insecure_registries:
#   - mirror.registry.io
#   - 172.19.16.11

## Add other registry,example China registry mirror.
openpai_docker_registry_mirrors:
#   - https://registry.docker-cn.com
   - https://mirror.aliyuncs.com

#######################################################################
#                       kubespray setting                             #
#######################################################################

# If you couldn't access to gcr.io or docker.io, please configure it.
# gcr_image_repo: "gcr.io"
#gcr_image_repo: "registry.cn-hangzhou.aliyuncs.com"
gcr_image_repo: "registry.aliyuncs.com"
# kube_image_repo: "gcr.io/google-containers"
#kube_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers"
kube_image_repo: "registry.aliyuncs.com/google_containers"
# quay_image_repo: "quay.io"
quay_image_repo: "quay.mirrors.ustc.edu.cn"
# docker_image_repo: "docker.io"
docker_image_repo: "registry.docker-cn.com"
# kubeadm_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
kubeadm_download_url: "https://kubernetes.aliyuncs.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
#kubeadm_download_url: "https://kubernetes.oss-cn-hangzhou.aliyuncs.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
# hyperkube_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"
#hyperkube_download_url: "https://kubernetes.oss-cn-hangzhou.aliyuncs.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"
hyperkube_download_url: "https://kubernetes.aliyuncs.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"


# openpai_kube_network_plugin: calico

liudican avatar Jun 08 '20 10:06 liudican

password: 123
branch_name: pai-1.0.y
docker_image_tag: v1.0.0

# Optional

#############################################
# Ansible-playbooks' inventory hosts' vars. #
#############################################
# ssh_key_file_path: /path/to/you/key/file

#####################################
# OpenPAI's service image registry. #
#####################################
# docker_registry_domain: docker.io
# docker_registry_namespace: openpai
# docker_registry_username: exampleuser
# docker_registry_password: examplepasswd

###########################################################################################
#                         Pre-check setting                                               #
# By default, we assume your gpu environment is nvidia. So your runtime should be nvidia. #
# If you are using AMD or other environment, you should modify it.                        #
###########################################################################################
# worker_default_docker_runtime: nvidia
# docker_check: true

# resource_check: true

# gpu_type: nvidia

########################################################################################
# Advanced docker configuration. If you are not familiar with them, don't change them. #
########################################################################################
# docker_data_root: /mnt/docker
# docker_config_file_path: /etc/docker/daemon.json
# docker_iptables_enabled: false

## An obvious use case is allowing insecure-registry access to self hosted registries.
## Can be ipaddress and domain_name.
## example define 172.19.16.11 or mirror.registry.io
# openpai_docker_insecure_registries:
#   - mirror.registry.io
#   - 172.19.16.11

## Add other registry,example China registry mirror.
openpai_docker_registry_mirrors:
#   - https://registry.docker-cn.com
   - https://mirror.aliyuncs.com

#######################################################################
#                       kubespray setting                             #
#######################################################################

# If you couldn't access to gcr.io or docker.io, please configure it.
# gcr_image_repo: "gcr.io"
#gcr_image_repo: "registry.cn-hangzhou.aliyuncs.com"
gcr_image_repo: "registry.aliyuncs.com"
# kube_image_repo: "gcr.io/google-containers"
#kube_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers"
kube_image_repo: "registry.aliyuncs.com/google_containers"
# quay_image_repo: "quay.io"
quay_image_repo: "quay.mirrors.ustc.edu.cn"
# docker_image_repo: "docker.io"
docker_image_repo: "registry.docker-cn.com"
# kubeadm_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
kubeadm_download_url: "https://kubernetes.aliyuncs.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
#kubeadm_download_url: "https://kubernetes.oss-cn-hangzhou.aliyuncs.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
# hyperkube_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"
#hyperkube_download_url: "https://kubernetes.oss-cn-hangzhou.aliyuncs.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"
hyperkube_download_url: "https://kubernetes.aliyuncs.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"


# openpai_kube_network_plugin: calico
`

liudican avatar Jun 08 '20 10:06 liudican

  1. 网络问题:https://openpai.readthedocs.io/en/latest/manual/cluster-admin/installation-faqs-and-troubleshooting.html#troubleshooting ,最后。
  2. 网卡名称:https://github.com/microsoft/pai/issues/4559#issuecomment-637215362
  3. 如果branch_name使用pai-1.0.y,tag建议使用v1.0.1。
  4. docker default runtime:如果你正确安装了nvidia-container-runtime,参考https://github.com/microsoft/pai/issues/4564#issuecomment-633875922

k1ngcyk avatar Jun 08 '20 12:06 k1ngcyk

我修改了 config 文件:

# gcr_image_repo: "gcr.io"
gcr_image_repo: "gcr.azk8s.cn"
# kube_image_repo: "gcr.io/google-containers"
kube_image_repo: "gcr.azk8s.cn/google_containers"
quay_image_repo: "quay.io"
docker_image_repo: "docker.io"
#docker_image_repo: "registry.docker-cn.com"
# kubeadm_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
kubeadm_download_url: "https://storage.googleapis.com/kubernetes-release/release/v1.15.11/bin/linux/amd64/kubeadm"
# hyperkube_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kube_version }}/bin/linux/{{ image_arch }}/hyperkube"
hyperkube_download_url: "https://storage.googleapis.com/kubernetes-release/release/v1.15.11/bin/linux/amd64/hyperkube"
而且,我修改了配置文件 pai/contrib/kuberspray/roles/requirement/infra/tasks/resource.yml 的 内存限制条件为 16G,这边也还保持 资源不够?
- name: Check memory resource requirement for openpai service
  set_fact:
    unmet_requirements: "{{ unmet_requirements + [\"OpenPAI's infra node should have 16 Gi free memory for service\"] }}"
  when:
    - ansible_memory_mb["nocache"]["free"] < 16000

但是还是读取不了配置文件修改的镜像地址:
fatal: [node02]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access gcr.io. OpenPAI's infra node should have 16 Gi free memory for service"}
fatal: [node01]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access gcr.io. The default runtime is not set correctly"}

liudican avatar Jun 09 '20 02:06 liudican


pls add the following source code

 - debug:
      var: default_runtime
 - debug:
      var: default_runtime_processed
 - debug:
      var: worker_default_docker_runtime
output info:
ok: [node01] => {
    "default_runtime": {
        "changed": false,
        "failed": false,
        "failed_when_result": false,
        "rc": 0,
        "stderr": "Shared connection to 192.168.11.251 closed.\r\n",
        "stderr_lines": [
            "Shared connection to 192.168.11.251 closed."
        ],
        "stdout": "\r\n\"runc\"\r\n",
        "stdout_lines": [
            "",
            "\"runc\""
        ]
    }
}
为啥输出是 `runc` 而不是 `nvidia`?谢谢

liudican avatar Jun 09 '20 03:06 liudican

192.168.11.251节点: sudo vim /etc/docker/daemon.json:

  "default-runtime": "nvidia",
  "runtimes": {
      "nvidia": {
          "path": "/usr/bin/nvidia-container-runtime",
          "runtimeArgs": []
      }
  }
}
我设置了默认为 `nvidia`为啥不起效呢?谢谢

liudican avatar Jun 09 '20 03:06 liudican

但是 worker_default_docker_runtime 输出为 nvidia?

ok: [node01] => {
    "default_runtime_processed": "runc"
}

TASK [requirement/worker : debug] *********************************************************************************************************************
ok: [node01] => {
    "worker_default_docker_runtime": "nvidia"
}

liudican avatar Jun 09 '20 03:06 liudican

而且日志信息中还提示:

tsing01@node01:~$ docker --version
Docker version 19.03.11, build 42e35e61f3

在worker节点我安装了docker,依旧报错呢?谢谢

liudican avatar Jun 09 '20 03:06 liudican

现在解决了nvidia 为啥不起效 问题?但是还是依旧有 下面问题报错:

fatal: [node02]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access gcr.io. OpenPAI's infra node should have 16 Gi free memory for service"}
fatal: [node01]: FAILED! => {"changed": false, "msg": "The following requirements are not met: Unable to access gcr.io"}

liudican avatar Jun 09 '20 03:06 liudican

我把kubespray的gcr.io 全部替换了 gcr.azk8s.cn 但是还是报错呢?

FAILED - RETRYING: download_container | Download image if required (4 retries left).
FAILED - RETRYING: download_container | Download image if required (4 retries left).
FAILED - RETRYING: download_container | Download image if required (3 retries left).
FAILED - RETRYING: download_container | Download image if required (3 retries left).
FAILED - RETRYING: download_container | Download image if required (2 retries left).
FAILED - RETRYING: download_container | Download image if required (2 retries left).
FAILED - RETRYING: download_container | Download image if required (1 retries left).
FAILED - RETRYING: download_container | Download image if required (1 retries left).
fatal: [node02 -> 192.168.100.100]: FAILED! => {"attempts": 4, "changed": true, "cmd": ["/usr/bin/docker", "pull", "gcr.azk8s.cn/google_containers/pause-amd64:3.1"], "delta": "0:00:00.347988", "end": "2020-06-09 12:25:28.289118", "msg": "non-zero return code", "rc": 1, "start": "2020-06-09 12:25:27.941130", "stderr": "Error response from daemon: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: \"<html>\\r\\n<head><title>403 Forbidden</title></head>\\r\\n<body bgcolor=\\\"white\\\">\\r\\n<center><h1>403 Forbidden</h1></center>\\r\\n<hr><center>nginx/1.14.0 (Ubuntu)</center>\\r\\n</body>\\r\\n</html>\\r\\n\"", "stderr_lines": ["Error response from daemon: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: \"<html>\\r\\n<head><title>403 Forbidden</title></head>\\r\\n<body bgcolor=\\\"white\\\">\\r\\n<center><h1>403 Forbidden</h1></center>\\r\\n<hr><center>nginx/1.14.0 (Ubuntu)</center>\\r\\n</body>\\r\\n</html>\\r\\n\""], "stdout": "", "stdout_lines": []}
fatal: [node01 -> 192.168.100.100]: FAILED! => {"attempts": 4, "changed": true, "cmd": ["/usr/bin/docker", "pull", "gcr.azk8s.cn/google_containers/pause-amd64:3.1"], "delta": "0:00:00.309581", "end": "2020-06-09 12:25:32.205103", "msg": "non-zero return code", "rc": 1, "start": "2020-06-09 12:25:31.895522", "stderr": "Error response from daemon: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: \"<html>\\r\\n<head><title>403 Forbidden</title></head>\\r\\n<body bgcolor=\\\"white\\\">\\r\\n<center><h1>403 Forbidden</h1></center>\\r\\n<hr><center>nginx/1.14.0 (Ubuntu)</center>\\r\\n</body>\\r\\n</html>\\r\\n\"", "stderr_lines": ["Error response from daemon: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: \"<html>\\r\\n<head><title>403 Forbidden</title></head>\\r\\n<body bgcolor=\\\"white\\\">\\r\\n<center><h1>403 Forbidden</h1></center>\\r\\n<hr><center>nginx/1.14.0 (Ubuntu)</center>\\r\\n</body>\\r\\n</html>\\r\\n\""], "stdout": "", "stdout_lines": []}

liudican avatar Jun 09 '20 04:06 liudican

替换结果如下:

Binary file /home/tsing01/pai-deploy/kubespray/.git/objects/pack/pack-932991ea36efd0f5c859e8493d1223e8ee205ef4.pack matches
/home/tsing01/pai-deploy/kubespray/roles/container-engine/cri-o/templates/crio.conf.j2:#pause_image = "docker://k8s.gcr.io/pause:3.1"
/home/tsing01/pai-deploy/kubespray/roles/download/tasks/check_pull_required.yml:# nginx:1.15,gcr.io/google-containers/kube-proxy:v1.14.1,gcr.io/google-containers/kube-proxy@sha256:44af2833c6cbd9a7fc2e9d2f5244a39dfd2e31ad91bf9d4b7d810678db738ee9,gcr.io/google-containers/kube-apiserver:v1.14.1,etc...
/home/tsing01/pai-deploy/kubespray/roles/kubernetes-apps/registry/README.md:        image: gcr.io/google_containers/kube-registry-proxy:0.4
/home/tsing01/pai-deploy/kubespray/inventory/pai/sample/group_vars/k8s-cluster/k8s-cluster.yml:## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
/home/tsing01/pai-deploy/kubespray/inventory/pai/sample/group_vars/k8s-cluster/k8s-cluster.yml:# nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
/home/tsing01/pai-deploy/kubespray/inventory/pai/sample/group_vars/k8s-cluster/k8s-cluster.yml:# nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
/home/tsing01/pai-deploy/kubespray/inventory/pai/group_vars/k8s-cluster/k8s-cluster.yml:## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
/home/tsing01/pai-deploy/kubespray/inventory/pai/group_vars/k8s-cluster/k8s-cluster.yml:# nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
/home/tsing01/pai-deploy/kubespray/inventory/pai/group_vars/k8s-cluster/k8s-cluster.yml:# nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
/home/tsing01/pai-deploy/kubespray/inventory/sample/group_vars/k8s-cluster/k8s-cluster.yml:## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
/home/tsing01/pai-deploy/kubespray/inventory/sample/group_vars/k8s-cluster/k8s-cluster.yml:# nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
/home/tsing01/pai-deploy/kubespray/inventory/sample/group_vars/k8s-cluster/k8s-cluster.yml:# nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"

liudican avatar Jun 09 '20 04:06 liudican

如果branch_name使用pai-1.0.y,tag建议使用v1.0.1。

branch 没有这个分支标签 branch_name: pai-1.0.1??

liudican avatar Jun 09 '20 06:06 liudican

error: pathspec 'pai-1.0.1' did not match any file(s) known to git.

liudican avatar Jun 09 '20 06:06 liudican

Tuesday 09 June 2020  14:55:39 +0800 (0:00:00.054)       0:00:39.282 **********
fatal: [node02]: FAILED! => {"changed": false, "msg": "Unable to restart service docker: Job for docker.service failed because the control process exited with error code.\nSee \"systemctl status docker.service\" and \"journalctl -xe\" for details.\n"}

liudican avatar Jun 09 '20 07:06 liudican

这是啥意思呢?

fatal: [node02]: FAILED! => {"changed": false, "msg": "Unable to restart service docker: Job for docker.service failed because the control process exited with error code.\nSee \"systemctl status docker.service\" and \"journalctl -xe\" for details.\n"}

liudican avatar Jun 10 '20 04:06 liudican