microsoft / microsoft/pai

Errors occurred after Are your cluster is in Azure cloud or not?

Open
#5,776 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.7k
Forks
554
Avg merge
20h 42m
Merged PRs (30d)
14

Description

Hello, I am a developer from China, tying to deploy pai v1.8.0 in a private cloud,

enviroment: Ubuntu16.04 + OpenPAI v1.8.0

As you can see, i tried to use https://openpai.readthedocs.io/zh_CN/zh_cn_pai-1.5.y/manual/cluster-admin/configuration-for-china.html , but it not works, so I replaced some links to make sure I could access the mirrors I needed.

like this:
`
user: ***
password: ***
docker_image_tag: v1.8.0

#openpai_kubespray_extra_var:
#download_container: false
#skip_downloads: true

#gcr_image_repo: " registry.cn-hangzhou.aliyuncs.com"
#kube_image_repo: " registry.cn-hangzhou.aliyuncs.com/google-containers"
#kubeadm_download_url: "https://shaiictestblob01.blob.core.chinacloudapi.cn/share-all/kubeadm"
#hyperkube_download_url: "https://shaiictestblob01.blob.core.chinacloudapi.cn/share-all/hyperkube"
gcr_image_repo: "registry.cn-hangzhou.aliyuncs.com"
kube_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers"

openpai_kubespray_extra_var:
pod_infra_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/pause-{{ image_arch }}"
dnsautoscaler_image_repo: "docker.io/mirrorgooglecontainers/cluster-proportional-autoscaler-{{ image_arch }}"
tiller_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-helm/tiller"
registry_proxy_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-registry-proxy"
metrics_server_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-server-amd64"
addon_resizer_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/addon-resizer"
dashboard_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-dashboard-{{ image_arch }}"
`

Then, I used the quick-start-kubespry.sh to deploy pai, the error occured:
... Generating kubespray configuration Are your cluster is in Azure cloud or not? (Y/N) (case sensitive)N Traceback (most recent call last): File "/root/pai/contrib/kubespray/script/k8s_generator.py", line 72, in <module> main() File "/root/pai/contrib/kubespray/script/k8s_generator.py", line 67, in main map_table File "/root/pai/contrib/kubespray/script/utils.py", line 53, in generate_template_file generated_template = generate_from_template_dict(template, map_table) File "/root/pai/contrib/kubespray/script/utils.py", line 41, in generate_from_template_dict map_table File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 1008, in render return self.environment.handle_exception(exc_info, True) File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 780, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.5/dist-packages/jinja2/_compat.py", line 37, in reraise raise value.with_traceback(tb) File "<template>", line 410, in top-level template code TypeError: 'NoneType' object is not iterable

Is there a way to fix this or make sure that I can deploy it correctly?

By the way, i also tried the method mentioned in the #5592 , it performs more processes but ultimately still faild.

Thank you.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with contrib/kubespray/script/k8s_generator.py and utils.py, then inspect the template referenced by the traceback around line 410 and the quick-start-kubespry.sh flow. Reproduce the OpenPAI v1.8.0 deployment with the provided configuration and determine what causes the NoneType iteration; done means the configuration generates and deployment proceeds without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes, python
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.