pai icon indicating copy to clipboard operation
pai copied to clipboard

paictl.py service start faild

Open geekopslc opened this issue 7 years ago • 14 comments

I Have a problem with service start

How can i configure that ~ root@LC-125021:/pai# python paictl.py cluster k8s-bootup -p ~/pai-config 2019-05-06 09:10:18,776 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do pre-validation for each service parser. 2019-05-06 09:10:18,776 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do pre-validation of layout 2019-05-06 09:10:18,776 [INFO] - deployment.clusterObjectModel.cluster_object_model : Pre-validation of layout is passed 2019-05-06 09:10:18,776 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do pre-validation of kubernetes 2019-05-06 09:10:18,776 [INFO] - deployment.clusterObjectModel.cluster_object_model : Pre-validation of kubernetes is passed 2019-05-06 09:10:18,776 [INFO] - deployment.clusterObjectModel.cluster_object_model : Pre-validation is successful! 2019-05-06 09:10:18,776 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do generate cluster object model. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do generate object model of layout. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Object model of layout is generated. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do generate object model of kubernetes. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Object model of kubernetes is generated. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Cluster Object Model is generated. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do post-validation. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do post-validation of layout. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Post-validation of layout is passed. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Begin to do post-validation of kubernetes. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Post-validation of kubernetes is passed. 2019-05-06 09:10:18,777 [INFO] - deployment.clusterObjectModel.cluster_object_model : Post-validation is successful! 2019-05-06 09:10:18,778 [INFO] - deployment.clusterCmd : Begin to initialize PAI k8s cluster. 2019-05-06 09:10:18,792 [WARNING] - deployment.k8sPaiLibrary.maintainlib.deploy : Begin to deploy a new cluster to your machine or vm. 2019-05-06 09:10:18,792 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Begin to deploy k8s on host 110.2.190.12, the node role is [ master ] 2019-05-06 09:10:18,843 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.6p1) /usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV self._cipher = factory.new(key, *args, kwargs) 2019-05-06 09:10:18,977 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:19,219 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.12]: getent passwd sdfsdf| cut -d: -f6 /home/sdfsdaf 2019-05-06 09:10:19,232 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.6p1) 2019-05-06 09:10:19,408 [INFO] - paramiko.transport : Authentication (password) successful! adfsf# [sudo] sdfsdaf的密码: 2019-05-06 09:10:19,678 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.6p1) 2019-05-06 09:10:19,812 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:20,047 [INFO] - paramiko.transport.sftp : [chan 0] Opened sftp connection (server version 3) 2019-05-06 09:10:20,052 [INFO] - paramiko.transport.sftp : [chan 0] sftp session closed. 2019-05-06 09:10:20,060 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.6p1) 2019-05-06 09:10:20,229 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:20,462 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.12]: tar -xvf master-deployment.tar master-deployment/kubelet-start.sh master-deployment/hosts-check.sh master-deployment/docker-ce-install.sh master-deployment/kubelet.sh master-deployment/docker-config-update.py master-deployment/docker-daemon.json master-deployment/etc/kubernetes/config master-deployment/etc/kubernetes/manifests/apiserver.yaml master-deployment/etc/kubernetes/manifests/controller-manager.yaml master-deployment/etc/kubernetes/manifests/etcd.yaml master-deployment/etc/kubernetes/manifests/scheduler.yaml 2019-05-06 09:10:20,481 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.6p1) 2019-05-06 09:10:20,657 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:20,900 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.12]: sudo ./master-deployment/hosts-check.sh 110.2.190.12 sdfdsf# [sudo] sdfsdf的密码: 2019-05-06 09:10:20,934 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.6p1) 2019-05-06 09:10:21,056 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:21,294 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.12]: sudo ./master-deployment/docker-ce-install.sh master-deployment dfdfdf# [sudo] sadfasdfds的密码: python has been installed. And skip python install. docker has been installed. And skip docker install. nvidia container runtime has been installed. Skip this. There is no docker daemon configuration updated. Skip the process of restart docker daemon. 2019-05-06 09:10:21,353 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.6p1) 2019-05-06 09:10:21,477 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:21,746 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.12]: sudo ./master-deployment/kubelet-start.sh master-deployment dfdsf# [sudo] sadfsadf的密码: WARNING: No swap limit support Docker ROOT DIR IS /var/lib/docker Unable to find image 'mirrorgooglecontainers/hyperkube:v1.9.9' locally v1.9.9: Pulling from mirrorgooglecontainers/hyperkube Digest: sha256:f8594d7a667298340533ca01a62faf7f064cad620260d0ed5287d7166d240aa8 Status: Downloaded newer image for mirrorgooglecontainers/hyperkube:v1.9.9 573a39973d8eebbea517d1a7c992288d75e04f71af5636fbe5d830fc73536ebc 2019-05-06 09:10:25,369 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Successfully running master-deployment job on node 110.2.190.12! 2019-05-06 09:10:25,369 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : package cleaner is working on the folder of 110.2.190.12! 2019-05-06 09:10:25,377 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : package cleaner's work finished! 2019-05-06 09:10:25,377 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : remote host cleaner is working on the host of 110.2.190.12! 2019-05-06 09:10:25,384 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.6p1) 2019-05-06 09:10:25,552 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:25,778 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.12]: sudo rm -rf master-deployment dsfsdfsd# [sudo] sdafasdf的密码: 2019-05-06 09:10:25,795 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : remote host cleaning job finished! 2019-05-06 09:10:25,795 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Begin to deploy k8s on host 110.2.190.13, the node role is [ worker ] 2019-05-06 09:10:25,855 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.2p2) 2019-05-06 09:10:26,066 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:26,184 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.13]: getent passwd safsdafsda| cut -d: -f6 /home/sdfdsf 2019-05-06 09:10:26,197 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.2p2) 2019-05-06 09:10:26,402 [INFO] - paramiko.transport : Authentication (password) successful! sdfsdfsd# [sudo] password for sdfasdf: 2019-05-06 09:10:26,542 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.2p2) 2019-05-06 09:10:26,657 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:26,772 [INFO] - paramiko.transport.sftp : [chan 0] Opened sftp connection (server version 3) 2019-05-06 09:10:26,774 [INFO] - paramiko.transport.sftp : [chan 0] sftp session closed. 2019-05-06 09:10:26,781 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.2p2) 2019-05-06 09:10:26,905 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:27,009 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.13]: tar -xvf worker-deployment.tar worker-deployment/kubelet-start.sh worker-deployment/hosts-check.sh worker-deployment/docker-ce-install.sh worker-deployment/kubelet.sh worker-deployment/docker-config-update.py worker-deployment/docker-daemon.json worker-deployment/etc/kubernetes/config 2019-05-06 09:10:27,022 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.2p2) 2019-05-06 09:10:27,152 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:27,243 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.13]: sudo ./worker-deployment/hosts-check.sh 110.2.190.13 sdfsdf [sudo] password for sadfsda: 2019-05-06 09:10:27,270 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.2p2) 2019-05-06 09:10:27,477 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:27,590 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.13]: sudo ./worker-deployment/docker-ce-install.sh worker-deployment sdfsdfds# [sudo] password for sdfsdaf: python has been installed. And skip python install. docker has been installed. And skip docker install. nvidia container runtime has been installed. Skip this. There is no docker daemon configuration updated. Skip the process of restart docker daemon. 2019-05-06 09:10:27,630 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.2p2) 2019-05-06 09:10:27,828 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:27,956 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.13]: sudo ./worker-deployment/kubelet-start.sh worker-deployment sdfsdfsdf# [sudo] password for sdfsdaf: WARNING: No swap limit support Docker ROOT DIR IS /var/lib/docker Unable to find image 'mirrorgooglecontainers/hyperkube:v1.9.9' locally v1.9.9: Pulling from mirrorgooglecontainers/hyperkube Digest: sha256:f8594d7a667298340533ca01a62faf7f064cad620260d0ed5287d7166d240aa8 Status: Downloaded newer image for mirrorgooglecontainers/hyperkube:v1.9.9 ede94db6ac04e1ca14ddeefd3582794f835f000889127b52821ec2c7250ce2de 2019-05-06 09:10:31,587 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Successfully running worker-deployment job on node 110.2.190.13! 2019-05-06 09:10:31,587 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : package cleaner is working on the folder of 110.2.190.13! 2019-05-06 09:10:31,594 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : package cleaner's work finished! 2019-05-06 09:10:31,594 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : remote host cleaner is working on the host of 110.2.190.13! 2019-05-06 09:10:31,602 [INFO] - paramiko.transport : Connected (version 2.0, client OpenSSH_7.2p2) 2019-05-06 09:10:31,796 [INFO] - paramiko.transport : Authentication (password) successful! 2019-05-06 09:10:31,911 [INFO] - deployment.k8sPaiLibrary.maintainlib.common : Executing the command on host [110.2.190.13]: sudo rm -rf worker-deployment sdfsdfdsf# [sudo] password for sdfsdaf: 2019-05-06 09:10:31,931 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : remote host cleaning job finished! 2019-05-06 09:10:31,931 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Execute the script to install kubectl on your host! kubectl has been installed. Skip this precess 2019-05-06 09:10:31,940 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Successfully install kubectl on the dev-box. 2019-05-06 09:10:31,941 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Generate the configuation file of kubectl. 2019-05-06 09:10:31,941 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Cluster configuration is detected. 2019-05-06 09:10:31,941 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Generate the KUBECONIFG based on the cluster configuration. 2019-05-06 09:10:31,945 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Successfully configure kubeconfig in the dev-box. The connection to the server 110.2.190.12:8080 was refused - did you specify the right host or port? 2019-05-06 09:10:32,035 [WARNING] - deployment.k8sPaiLibrary.maintainlib.common : There will be a delay after installing, please wait. 2019-05-06 09:10:32,035 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Wait 5s, and retry it later. The connection to the server 110.2.190.12:8080 was refused - did you specify the right host or port? 2019-05-06 09:10:37,135 [WARNING] - deployment.k8sPaiLibrary.maintainlib.common : There will be a delay after installing, please wait. 2019-05-06 09:10:37,136 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Wait 5s, and retry it later. NAME STATUS ROLES AGE VERSION 110.2.190.12 Ready 84m v1.9.9 2019-05-06 09:10:44,012 [INFO] - deployment.k8sPaiLibrary.maintainlib.kubectl_install : Successfully install kubectl and configure it! NAME SHORTNAMES APIGROUP NAMESPACED KIND bindings true Binding componentstatuses cs false ComponentStatus configmaps cm true ConfigMap endpoints ep true Endpoints events ev true Event limitranges limits true LimitRange namespaces ns false Namespace nodes no false Node persistentvolumeclaims pvc true PersistentVolumeClaim persistentvolumes pv false PersistentVolume pods po true Pod podtemplates true PodTemplate replicationcontrollers rc true ReplicationController resourcequotas quota true ResourceQuota secrets true Secret serviceaccounts sa true ServiceAccount services svc true Service mutatingwebhookconfigurations admissionregistration.k8s.io false MutatingWebhookConfiguration validatingwebhookconfigurations admissionregistration.k8s.io false ValidatingWebhookConfiguration customresourcedefinitions crd apiextensions.k8s.io false CustomResourceDefinition apiservices apiregistration.k8s.io false APIService controllerrevisions apps true ControllerRevision daemonsets ds apps true DaemonSet deployments deploy apps true Deployment replicasets rs apps true ReplicaSet statefulsets sts apps true StatefulSet tokenreviews authentication.k8s.io false TokenReview localsubjectaccessreviews authorization.k8s.io true LocalSubjectAccessReview selfsubjectaccessreviews authorization.k8s.io false SelfSubjectAccessReview selfsubjectrulesreviews authorization.k8s.io false SelfSubjectRulesReview subjectaccessreviews authorization.k8s.io false SubjectAccessReview horizontalpodautoscalers hpa autoscaling true HorizontalPodAutoscaler cronjobs batch true CronJob jobs batch true Job certificatesigningrequests csr certificates.k8s.io false CertificateSigningRequest events ev events.k8s.io true Event daemonsets ds extensions true DaemonSet deployments deploy extensions true Deployment ingresses ing extensions true Ingress networkpolicies netpol extensions true NetworkPolicy podsecuritypolicies psp extensions false PodSecurityPolicy replicasets rs extensions true ReplicaSet networkpolicies netpol networking.k8s.io true NetworkPolicy poddisruptionbudgets pdb policy true PodDisruptionBudget clusterrolebindings rbac.authorization.k8s.io false ClusterRoleBinding clusterroles rbac.authorization.k8s.io false ClusterRole rolebindings rbac.authorization.k8s.io true RoleBinding roles rbac.authorization.k8s.io true Role storageclasses sc storage.k8s.io false StorageClass 2019-05-06 09:10:47,637 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Create kube-proxy daemon for kuberentes cluster. daemonset.apps/kube-proxy configured 2019-05-06 09:10:47,966 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Create kubernetes dashboard deployment for kuberentes cluster. 2019-05-06 09:10:47,966 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Create dashboard service. service/kubernetes-dashboard unchanged 2019-05-06 09:10:48,269 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Create dashboard deployment. deployment.apps/kubernetes-dashboard configured 2019-05-06 09:10:48,599 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : Update node configuration into configmap in the namespace [ kube-system ] as the name [ pai-node-config ] 2019-05-06 09:10:48,628 [INFO] - deployment.paiLibrary.common.kubernetes_handler : configmap named pai-node-config is updated. 2019-05-06 09:10:48,728 [INFO] - deployment.k8sPaiLibrary.maintainlib.deploy : The kubernetes deployment is finished! 2019-05-06 09:10:48,728 [INFO] - deployment.clusterCmd : Finish initializing PAI k8s cluster. root@LC-125021:/pai# python paictl.py service start 2019-05-06 09:14:03,316 [INFO] - deployment.paiLibrary.paiService.service_management_start : Get the service-list t, 'hadoop-resource-manager', 'hadoop-jobhistory', 'prometheus', 'hadoop-data-node', 'rest-server', 'cluster-configu 2019-05-06 09:14:03,333 [INFO] - deployment.paiLibrary.common.kubernetes_handler : Couldn't find configmap named pa 2019-05-06 09:14:03,434 [ERROR] - deployment.confStorage.download : No cluster_id found in your cluster, which shou 2019-05-06 09:14:03,434 [ERROR] - deployment.confStorage.download : Please execute the command following! 2019-05-06 09:14:03,435 [ERROR] - deployment.confStorage.download : paictl.py config push [-c /path/to/kubeconfig ] 2019-05-06 09:14:03,435 [ERROR] - deployment.confStorage.download : More detailed information, please refer to the 2019-05-06 09:14:03,435 [ERROR] - deployment.confStorage.download : https://github.com/Microsoft/pai/blob/master/do root@LC-125021:/pai# python paictl.py service start -p ~/pai-config usage: paictl.py [-h] {layout,check,config,cluster,service,machine,utility} ... paictl.py: error: unrecognized arguments: -p /root/pai-config

......

python paictl.py service start -p ~/pai-config usage: paictl.py [-h] {layout,check,config,cluster,service,machine,utility} ... paictl.py: error: unrecognized arguments: -p /root/pai-config

....

python paictl.py service start -c ~/pai-config
2019-05-06 10:13:14,433 [INFO] - deployment.paiLibrary.paiService.service_management_start : Get the service-list to manage : ['hadoop-node-manager', 'end-to-end-test', 'grafana', 'drivers', 'cleaner', 'hadoop-batch-job', 'node-exporter', 'hadoop-name-node', 'zookeeper', 'hadoop-resource-manager', 'hadoop-jobhistory', 'prometheus', 'hadoop-data-node', 'rest-server', 'cluster-configuration', 'alert-manager', 'yarn-frameworklauncher', 'job-exporter', 'pylon', 'watchdog', 'webportal'] Traceback (most recent call last): File "paictl.py", line 101, in main(sys.argv[1:]) File "paictl.py", line 93, in main parserd.handler(parserd) File "/pai/deployment/serviceCmd.py", line 56, in service_start service_management_starter.run() File "/pai/deployment/paiLibrary/paiService/service_management_start.py", line 115, in run self.cluster_object_model = service_management_configuration.get_cluster_object_model_from_k8s(kube_config_path=self.kube_config_path) File "/pai/deployment/paiLibrary/paiService/service_management_configuration.py", line 36, in get_cluster_object_model_from_k8s config_get_handler.run() File "/pai/deployment/confStorage/download.py", line 81, in run self.check_cluster_id() File "/pai/deployment/confStorage/download.py", line 49, in check_cluster_id cluster_id = conf_storage_util.get_cluster_id(self.KUBE_CONFIG_DEFAULT_LOCATION) File "/pai/deployment/confStorage/conf_storage_util.py", line 72, in get_cluster_id resp = kubernetes_handler.get_configmap(PAI_KUBE_CONFIG_DEFAULT_LOCATION, "pai-cluster-id") File "/pai/deployment/paiLibrary/common/kubernetes_handler.py", line 104, in get_configmap api_instance = get_kubernetes_corev1api(PAI_KUBE_CONFIG_PATH=PAI_KUBE_CONFIG_DEFAULT_LOCATION) File "/pai/deployment/paiLibrary/common/kubernetes_handler.py", line 34, in get_kubernetes_corev1api config.load_kube_config(config_file=PAI_KUBE_CONFIG_PATH) File "/usr/local/lib/python2.7/dist-packages/kubernetes/config/kube_config.py", line 537, in load_kube_config config_persister=config_persister) File "/usr/local/lib/python2.7/dist-packages/kubernetes/config/kube_config.py", line 494, in _get_kube_config_loader_for_yaml_file with open(filename) as f: IOError: [Errno 21] Is a directory: '/root/pai-config' root@LC-125021:/pai# python paictl.py service start 2019-05-06 10:13:15,844 [INFO] - deployment.paiLibrary.paiService.service_management_start : Get the service-list to manage : ['hadoop-node-manager', 'end-to-end-test', 'grafana', 'drivers', 'cleaner', 'hadoop-batch-job', 'node-exporter', 'hadoop-name-node', 'zookeeper', 'hadoop-resource-manager', 'hadoop-jobhistory', 'prometheus', 'hadoop-data-node', 'rest-server', 'cluster-configuration', 'alert-manager', 'yarn-frameworklauncher', 'job-exporter', 'pylon', 'watchdog', 'webportal'] 2019-05-06 10:13:15,871 [INFO] - deployment.paiLibrary.common.kubernetes_handler : Couldn't find configmap named pai-cluster-id 2019-05-06 10:13:15,971 [ERROR] - deployment.confStorage.download : No cluster_id found in your cluster, which should be done the first time you upload your configuration. 2019-05-06 10:13:15,972 [ERROR] - deployment.confStorage.download : Please execute the command following! 2019-05-06 10:13:15,972 [ERROR] - deployment.confStorage.download : paictl.py config push [-c /path/to/kubeconfig ] [-p /path/to/cluster/configuration | -e /path/to/external/storage/conf/path] 2019-05-06 10:13:15,972 [ERROR] - deployment.confStorage.download : More detailed information, please refer to the following link. 2019-05-06 10:13:15,972 [ERROR] - deployment.confStorage.download : https://github.com/Microsoft/pai/blob/master/docs/paictl/paictl-manual.md

geekopslc avatar May 06 '19 10:05 geekopslc

in master: kubectl get nodes Unable to connect to the server: x509: certificate signed by unknown authority

@12004727:~$ curl 127.0.0.1:9090 image

geekopslc avatar May 07 '19 01:05 geekopslc

Please run the following commands on your dev box:

python paictl.py config push -p ~/pai-config
python paictl.py service start

abuccts avatar May 07 '19 03:05 abuccts

Please run the following commands on your dev box:

python paictl.py config push -p ~/pai-config
python paictl.py service start

thanks , it's seems work , but service start step looks failed after pulled zookeeper image

image

......

master:

image

geekopslc avatar May 07 '19 06:05 geekopslc

Have you deployed k8s successfully? Can you visit k8s dashboard at master's 9090 port? Please also share your config files in ~/pai-config, you can remove sensitive information like username/password.

abuccts avatar May 07 '19 07:05 abuccts

Have you deployed k8s successfully? Can you visit k8s dashboard at master's 9090 port? Please also share your config files in ~/pai-config, you can remove sensitive information like username/password.

http://:9090 is Connection refused , just curl 127.0.0.1:9090 have respones in master this files must confige by manual?

~/pai-config :

k8s-role-definition.yaml
component-list:

apiserver:

  • src: apiserver.yaml

    dst: src/etc/kubernetes/manifests

controller-manager:

  • src: controller-manager.yaml dst: src/etc/kubernetes/manifests

etcd:

  • src: etcd.yaml dst: src/etc/kubernetes/manifests

scheduler:

  • src: scheduler.yaml dst: src/etc/kubernetes/manifests

kubelet:

  • src: kubelet.sh dst: src/

kubeconfig:

  • src: config dst: src/etc/kubernetes

haproxy:

  • src: haproxy.yaml dst: src/etc/kubernetes/manifests
  • src: haproxy.cfg dst: src/haproxy

k8s-role:

master: component: - name: apiserver - name: controller-manager - name: etcd - name: scheduler - name: kubelet - name: kubeconfig

worker: component: - name: kubelet - name: kubeconfig

proxy: component: - name: kubelet - name: haproxy - name: kubeconfig

kubernetes-configuration.yaml kubernetes:

cluster-dns: 127.0.0.53

load-balance-ip: 110.2.190.12

service-cluster-ip-range: 10.254.0.0/16

storage-backend: etcd3

docker-registry: gcr.io/google_containers

hyperkube-version: v1.9.9

etcd-version: 3.2.17

apiserver-version: v1.9.9

kube-scheduler-version: v1.9.9

kube-controller-manager-version: v1.9.9

dashboard-version: v1.8.3

etcd-data-path: "/var/etcd"

layout.yaml kubernetes: api-servers-url: http://110.2.190.12:8080 dashboard-url: http://110.2.190.12:9090

machine-sku: GENERIC: mem: 1 gpu: type: generic count: 1 cpu: vcore: 1 os: ubuntu16.04

machine-list:

  • dashboard: "true" docker-data: "/var/lib/docker" etcdid: "etcdid1" hostip: "110.2.190.12" hostname: "12004727" k8s-role: "master" machine-type: "GENERIC" nodename: "110.2.190.12" pai-master: "true" pai-worker: "true" password: "fsdfsdfds" ssh-port: "22" username: "fdsfdsaf" zkid: "1

services-configuration.yaml

cluster: common: cluster-id: pai-example hadoop, etc. docker-registry:

namespace: openpai


domain: docker.io


tag: v0.12.0


secret-name: pai-secret

rest-server:

default-pai-admin-username: admin

default-pai-admin-password: admin-password

geekopslc avatar May 07 '19 07:05 geekopslc

How many nodes do you have?

cluster-dns: 127.0.0.53
load-balance-ip: 110.2.190.12
service-cluster-ip-range: 10.254.0.0/16

......

api-servers-url: http://10.2.190.12:8080
dashboard-url: http://10.2.190.12:9090

......

machine-list:
  - ...
    hostip: "110.2.190.12"
    hostname: "12004727"
    nodename: "110.2.190.12"

Those configuration fields are not compatible.

For example, if you have one master node with ip 10.2.x.y, you should set

  • load-balance-ip, hostip and nodename to the same ip 10.2.x.y
  • api-servers-url/dashboard-url to http://10.2.x.y:8080/http://10.2.x.y:9090
  • cluser-dns is the ip address of nameserver that master node uses
  • ~~service-cluster-ip-range is the ip range which all nodes are in, e.g. 10.2.x.y is in the range 10.2.0.0/16.~~ service-cluster-ip-range is the service ip range which all nodes are not in.

abuccts avatar May 07 '19 07:05 abuccts

How many nodes do you have?

cluster-dns: 127.0.0.53
load-balance-ip: 110.2.190.12
service-cluster-ip-range: 10.254.0.0/16

......

api-servers-url: http://10.2.190.12:8080
dashboard-url: http://10.2.190.12:9090

......

machine-list:
  - ...
    hostip: "110.2.190.12"
    hostname: "12004727"
    nodename: "110.2.190.12"

Those configuration fields are not compatible.

For example, if you have one master node with ip 10.2.x.y, you should set

  • load-balance-ip, hostip and nodename to the same ip 10.2.x.y
  • api-servers-url/dashboard-url to http://10.2.x.y:8080/http://10.2.x.y:9090
  • cluser-dns is the ip address of nameserver that master node uses
  • service-cluster-ip-range is the ip range which all nodes are in, e.g. 10.2.x.y is in the range 10.2.0.0/16.

# specify an IP range not in the same network segment with the host machine. service-cluster-ip-range

is or not?

geekopslc avatar May 07 '19 08:05 geekopslc

# specify an IP range not in the same network segment with the host machine. service-cluster-ip-range

is or not?

Sorry, it's the service ip range, so "not in". I have updated the comment.

abuccts avatar May 07 '19 08:05 abuccts

# specify an IP range not in the same network segment with the host machine. service-cluster-ip-range is or not?

Sorry, it's the service ip range, so "not in". I have updated the comment.

service start

...

configmap/host-configuration configured configmap/docker-credentials configured configmap/gpu-configuration configured configmap/pai-version configured configmap/k8s-version configured secret/pai-secret unchanged node/10.2.190.12 not labeled Error from server (NotFound): nodes "10.2.190.13" not found 2019-05-07 08:32:46,273 [ERROR] - deployment.paiLibrary.common.linux_shell : Failed to execute the start script of service cluster-configuration 2019-05-07 08:32:46,274 [ERROR] - deployment.paiLibrary.paiService.service_management_start : Failed to start service cluster-configuration 2019-05-07 08:32:46,274 [INFO] - deployment.paiLibrary.paiService.service_management_start : ----------------------------------------------------------- 2019-05-07 08:32:56,284 [INFO] - deployment.paiLibrary.paiService.service_management_start : ----------------------------------------------------------- 2019-05-07 08:32:56,284 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to generate service cluster-configuration's template file 2019-05-07 08:32:56,285 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Begin to generate the template file in service cluster-configuration's configuration. 2019-05-07 08:32:56,285 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Create template mapper for service cluster-configuration. 2019-05-07 08:32:56,285 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Done. Template mapper for service cluster-configuration is created. 2019-05-07 08:32:56,285 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Generate the template file /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/secret.yaml.template. 2019-05-07 08:32:56,286 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Save the generated file to /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/secret.yaml. 2019-05-07 08:32:56,291 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Generate the template file /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/host-configuration/host-configuration.yaml.template. 2019-05-07 08:32:56,291 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Save the generated file to /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/host-configuration/host-configuration.yaml. 2019-05-07 08:32:56,302 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Generate the template file /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/gpu-configuration/gpu-configuration.yml.template. 2019-05-07 08:32:56,303 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Save the generated file to /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/gpu-configuration/gpu-configuration.yml. 2019-05-07 08:32:56,312 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Generate the template file /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/gpu-configuration/gpu-configuration.json.template. 2019-05-07 08:32:56,312 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Save the generated file to /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/gpu-configuration/gpu-configuration.json. 2019-05-07 08:32:56,323 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Generate the template file /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/docker-credentials/config.json.template. 2019-05-07 08:32:56,324 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Save the generated file to /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/docker-credentials/config.json. 2019-05-07 08:32:56,325 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Generate the template file /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/stop.sh.template. 2019-05-07 08:32:56,326 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Save the generated file to /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/stop.sh. 2019-05-07 08:32:56,329 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Generate the template file /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/start.sh.template. 2019-05-07 08:32:56,329 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Save the generated file to /pai/deployment/paiLibrary/paiService/../../../src/cluster-configuration/deploy/start.sh. 2019-05-07 08:32:56,341 [INFO] - deployment.paiLibrary.paiService.service_template_generate : The template file of service cluster-configuration is generated. 2019-05-07 08:32:56,341 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to start service: [ cluster-configuration ] 2019-05-07 08:32:56,341 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to execute service cluster-configuration's start script. configmap/host-configuration configured configmap/docker-credentials configured configmap/gpu-configuration configured configmap/pai-version configured configmap/k8s-version configured secret/pai-secret unchanged node/10.2.190.12 not labeled Error from server (NotFound): nodes "10.2.190.13" not found 2019-05-07 08:32:58,267 [ERROR] - deployment.paiLibrary.common.linux_shell : Failed to execute the start script of service cluster-configuration 2019-05-07 08:32:58,268 [ERROR] - deployment.paiLibrary.paiService.service_management_start : Failed to start service cluster-configuration 2019-05-07 08:32:58,268 [INFO] - deployment.paiLibrary.paiService.service_management_start : ----------------------------------------------------------- 2019-05-07 08:32:58,268 [ERROR] - deployment.paiLibrary.paiService.service_management_start : Have retried 5 times, but service cluster-configuration doesn't start. Please check it.

master ip : :8080/api { "kind": "APIVersions", "versions": [ "v1" ], "serverAddressByClientCIDRs": [ { "clientCIDR": "0.0.0.0/0", "serverAddress": "10.2.190.12:6443" } ] }

master ip : :9090

ERR_CONNECTION_REFUSED

geekopslc avatar May 07 '19 08:05 geekopslc

Can you try to stop then bootup k8s again? Please do not start services until k8s is ready (e.g. dashboard can be visited), and remember to push config before starting services.

abuccts avatar May 07 '19 08:05 abuccts

# specify an IP range not in the same network segment with the host machine. service-cluster-ip-range is or not?

Sorry, it's the service ip range, so "not in". I have updated the comment.

it looks like working

2019-05-08 02:15:21,400 [INFO] - deployment.paiLibrary.paiService.service_management_start : Successfully start cleaner 2019-05-08 02:15:21,401 [INFO] - deployment.paiLibrary.paiService.service_management_start : ----------------------------------------------------------- 2019-05-08 02:15:21,411 [INFO] - deployment.paiLibrary.paiService.service_management_start : ----------------------------------------------------------- 2019-05-08 02:15:21,412 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to generate service job-exporter's template file 2019-05-08 02:15:21,413 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Begin to generate the template file in service job-exporter's configuration. 2019-05-08 02:15:21,413 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Create template mapper for service job-exporter. 2019-05-08 02:15:21,413 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Done. Template mapper for service job-exporter is created. 2019-05-08 02:15:21,414 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Generate the template file /pai/deployment/paiLibrary/paiService/../../../src/job-exporter/deploy/job-exporter.yaml.template. 2019-05-08 02:15:21,414 [INFO] - deployment.paiLibrary.paiService.service_template_generate : Save the generated file to /pai/deployment/paiLibrary/paiService/../../../src/job-exporter/deploy/job-exporter.yaml. 2019-05-08 02:15:21,517 [INFO] - deployment.paiLibrary.paiService.service_template_generate : The template file of service job-exporter is generated. 2019-05-08 02:15:21,517 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to start service: [ job-exporter ] 2019-05-08 02:15:21,518 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to execute service job-exporter's start script. daemonset.apps/job-exporter created /usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown. warnings.warn(warning, RequestsDependencyWarning) job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is not ready yet. Please wait for a moment! job-exporter is ready! 2019-05-08 02:17:34,749 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to clean all service's generated template file 2019-05-08 02:17:34,750 [INFO] - deployment.paiLibrary.paiService.service_template_clean : Begin to delete the generated template of job-exporter's service. 2019-05-08 02:17:34,751 [INFO] - deployment.paiLibrary.paiService.service_template_clean : The generated template files of job-exporter's service have been cleaned up. 2019-05-08 02:17:34,751 [INFO] - deployment.paiLibrary.paiService.service_management_start : Successfully start job-exporter 2019-05-08 02:17:34,752 [INFO] - deployment.paiLibrary.paiService.service_management_start : -----------------------------------------------------------

how can i modify the default port 9090 and 9286?

[root@k8s-n2 share]# curl http://master:9090 <!doctype html>

[root@k8s-n2 share]# curl http://master:9090/#!/pod?namespace=default -bash: !/pod?namespace=default: event not found

curl http://master:9286

Platform for AI

geekopslc avatar May 08 '19 02:05 geekopslc

Glad to hear. Please feel free to reopen if you have additional questions.

abuccts avatar May 08 '19 07:05 abuccts

python paictl.py config push -p ~/pai-config

image

NothingLZ avatar May 21 '19 06:05 NothingLZ

# specify an IP range not in the same network segment with the host machine. service-cluster-ip-range is or not?

Sorry, it's the service ip range, so "not in". I have updated the comment.

Hello, I need your help. I depoly openpai v0.13.0 and I found that the procedure is not same with before. I successfully boot up k8s and can view the container status on "http://master_ip:9090". After then I "python paictl.py config push -p ~/pai-config" and "python paictl.py service start". The service starting process is stuck at zookeeper. But there is no error on "http://master_ip:9090" and I can't find zookeeper pod using "kubectl get pods -n default". Please help me, thanks!!! errorddd status

wangzhao123456 avatar Jun 19 '20 05:06 wangzhao123456