polyaxon deploy fails with Error: timed out waiting for the condition
Describe the bug
the command polyaxon admin deploy -f config.yml
listed in https://docs.polyaxon.com/setup/kubernetes/
fails as below
polyaxon admin deploy -f config.yml Running install command ...
Polyaxon could not be installed. Error message ``helm` command ('helm', 'install', 'polyaxon/polyaxon', '--name=polyaxon', '--namespace=polyaxon', '-f', 'config.yml') failed with exit status 1 stdout:
stderr: Error: timed out waiting for the condition
polyaxon@polyaxon1:~$ helm install polyaxon/polyaxon --name=polyaxon --namespace=polyaxon -f config.yml Error: timed out waiting for the condition polyaxon@polyaxon1:~$ helm ls --all polyaxon NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE polyaxon 1 Thu Oct 10 09:00:39 2019 FAILED polyaxon-0.5.6 polyaxon polyaxon@polyaxon1:~$ polyaxon@polyaxon1:~$
To Reproduce
Expected behavior
successfully deploy polyaxon
Environment
Ubuntu 18.05 LTS kubernetes 1.15.4
cat config.yml rbac: enabled: false
ingress: enabled: false
serviceType: LoadBalancer
postgresql: persistence: enabled: true size: 5Gi
user: username: "root" email: "[email protected]" password: "dummypassword"
polyaxon@polyaxon1:~$ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-5c98db65d4-2rphr 1/1 Running 0 47m kube-system coredns-5c98db65d4-jwtzl 1/1 Running 0 47m kube-system etcd-polyaxon1 1/1 Running 0 46m kube-system kube-apiserver-polyaxon1 1/1 Running 0 46m kube-system kube-controller-manager-polyaxon1 1/1 Running 0 46m kube-system kube-flannel-ds-amd64-qklqr 1/1 Running 0 41m kube-system kube-flannel-ds-amd64-vl6hp 1/1 Running 0 42m kube-system kube-proxy-jcmp5 1/1 Running 0 47m kube-system kube-proxy-qn27k 1/1 Running 0 41m kube-system kube-scheduler-polyaxon1 1/1 Running 0 46m kube-system kubernetes-dashboard-7d75c474bb-f6f5z 1/1 Running 0 40m kube-system tiller-deploy-8557598fbc-b72jc 1/1 Running 0 33m polyaxon polyaxon-docker-registry-7f86c5dd67-7kpbf 1/1 Running 0 21m polyaxon polyaxon-polyaxon-api-5d855c894b-gzpxt 1/2 Running 2 21m polyaxon polyaxon-polyaxon-beat-68545786d7-hb66q 2/2 Running 0 21m polyaxon polyaxon-polyaxon-events-ffc44cd9b-cdm8h 1/1 Running 0 21m polyaxon polyaxon-polyaxon-hpsearch-5db746f6c8-xp6k2 1/1 Running 0 21m polyaxon polyaxon-polyaxon-k8s-events-59d8b76b96-bh8t8 1/1 Running 0 21m polyaxon polyaxon-polyaxon-monitors-7d6896ff75-22d9z 1/1 Running 0 21m polyaxon polyaxon-polyaxon-resources-wvwns 1/1 Running 8 21m polyaxon polyaxon-polyaxon-scheduler-5d7f677676-cgc7m 1/1 Running 0 21m polyaxon polyaxon-postgresql-767c47dd45-nt7l6 0/1 Pending 0 21m polyaxon polyaxon-rabbitmq-ha-0 1/1 Running 0 21m polyaxon polyaxon-redis-master-0 0/1 Pending 0 21m polyaxon polyaxon-redis-slave-0 0/1 Pending 0 21m polyaxon polyaxon-sync-db-2gnwb 0/1 Error 0 21m polyaxon polyaxon-sync-db-677mf 0/1 Error 0 21m polyaxon polyaxon-sync-db-7l5kf 0/1 Error 0 18m polyaxon polyaxon-sync-db-ptfv4 0/1 Error 0 20m polyaxon polyaxon-sync-db-vkpw9 0/1 Error 0 19m polyaxon polyaxon-sync-db-zk4s4 0/1 Error 0 21m polyaxon@polyaxon1:~$
Describe the bug
kubectl get pods -n polyaxon NAME READY STATUS RESTARTS AGE polyaxon-docker-registry-7f86c5dd67-7kpbf 1/1 Running 0 23m polyaxon-polyaxon-api-5d855c894b-gzpxt 1/2 Running 3 23m polyaxon-polyaxon-beat-68545786d7-hb66q 2/2 Running 0 23m polyaxon-polyaxon-events-ffc44cd9b-cdm8h 1/1 Running 0 23m polyaxon-polyaxon-hpsearch-5db746f6c8-xp6k2 1/1 Running 0 23m polyaxon-polyaxon-k8s-events-59d8b76b96-bh8t8 1/1 Running 0 23m polyaxon-polyaxon-monitors-7d6896ff75-22d9z 1/1 Running 0 23m polyaxon-polyaxon-resources-wvwns 0/1 CrashLoopBackOff 8 23m polyaxon-polyaxon-scheduler-5d7f677676-cgc7m 1/1 Running 0 23m polyaxon-postgresql-767c47dd45-nt7l6 0/1 Pending 0 23m polyaxon-rabbitmq-ha-0 1/1 Running 0 23m polyaxon-redis-master-0 0/1 Pending 0 23m polyaxon-redis-slave-0 0/1 Pending 0 23m polyaxon-sync-db-2gnwb 0/1 Error 0 23m polyaxon-sync-db-677mf 0/1 Error 0 23m polyaxon-sync-db-7l5kf 0/1 Error 0 20m polyaxon-sync-db-ptfv4 0/1 Error 0 22m polyaxon-sync-db-vkpw9 0/1 Error 0 21m polyaxon-sync-db-zk4s4 0/1 Error 0 23m
kubectl describe --namespace polyaxon pod polyaxon-sync-db-2gnwb
Name: polyaxon-sync-db-2gnwb
Namespace: polyaxon
Priority: 0
Node: polyaxon2/10.0.1.5
Start Time: Thu, 10 Oct 2019 09:00:42 +0000
Labels: app=polyaxon-polyaxon
controller-uid=e567a51d-7191-4f0a-9b94-6182d762140c
job-name=polyaxon-sync-db
release=polyaxon
Annotations:
Normal Scheduled 28m default-scheduler Successfully assigned polyaxon/polyaxon-sync-db-2gnwb to polyaxon2 Normal Pulling 28m kubelet, polyaxon2 Pulling image "polyaxon/polyaxon-manage:0.5.6" Normal Pulled 28m kubelet, polyaxon2 Successfully pulled image "polyaxon/polyaxon-manage:0.5.6" Normal Created 28m kubelet, polyaxon2 Created container sync-db-job Normal Started 28m kubelet, polyaxon2 Started container sync-db-job
/var/log/syslog has messages like the below on the node which the pod is assigned to
Oct 10 09:32:20 polyaxon2 kubelet[87689]: E1010 09:32:20.108137 87689 pod_workers.go:190] Error syncing pod 44476a60-04de-4890-9bf6-f483e96c0172 ("polyaxon-polyaxon-resources-wvwns_polyaxon(44476a60-04de-4890-9bf6-f483e96c0172)"), skipping: failed to "StartContainer" for "polyaxon-resources" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=polyaxon-resources pod=polyaxon-polyaxon-resources-wvwns_polyaxon(44476a60-04de-4890-9bf6-f483e96c0172)"
cat config.yml rbac: enabled: false
ingress: enabled: false
serviceType: LoadBalancer
postgresql: persistence: enabled: true size: 5Gi
user: username: "root" email: "[email protected]" password: "dummypassword"
If you are using a local kubernetes then rbac can be disabled, but it you are deploying on the cloud then is should be enabled. You might also need to change your yaml to something like:
rbac:
enabled: true
ingress:
enabled: true
serviceType: LoadBalancer
postgresql:
enabled: false
externalServices:
postgresql:
user: your_user
password: your_password
database: postgres
host: ip_for_postgres
You can reference @mouradmourafiq answer: https://github.com/polyaxon/polyaxon/issues/588#issuecomment-540767107
I have the same issue and the proposed solution doesn't do much for me.
I am experiencing the same issue.
Environment
kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:56:40Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:48:36Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
helm version
Client: &version.Version{SemVer:"v2.16.7", GitCommit:"5f2584fd3d35552c4af26036f0c464191287986b", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.7", GitCommit:"5f2584fd3d35552c4af26036f0c464191287986b", GitTreeState:"clean"}
Problem
Based on the isse https://github.com/polyaxon/polyaxon/issues/656 I provided own (self hosted) postgresql in the config
postgresql:
enabled: false
externalServices:
postgresql:
user: polyaxon
password: polyaxon
database: polyaxon
host: <IP of postgresql host>:5432
Executing
polyaxon admin deploy -f polyaxon-config.yml
returns
Polyaxon could not be installed.
Error message ``helm` command ('helm', 'install', 'polyaxon', 'polyaxon/polyaxon', '--namespace=polyaxon', '-f', 'polyaxon-config.yml') failed with exit status 1
stdout:
stderr:
Error: This command needs 1 argument: chart name
`.
Trying with
helm install polyaxon/polyaxon --name=polyaxon --namespace=polyaxon -f polyaxon-config.yml --wait
leads
Error: release polyaxon failed: timed out waiting for the condition
helm ls --all polyaxon
NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
polyaxon 1 Mon May 18 09:06:32 2020 FAILED polyaxon-0.6.1 polyaxon
kubectl get pods -n polyaxon
NAME READY STATUS RESTARTS AGE
polyaxon-docker-registry-69c8c67467-wnskm 0/1 Pending 0 7m19s
polyaxon-polyaxon-api-7956dbfffb-xspq4 0/2 Pending 0 7m19s
polyaxon-polyaxon-beat-74c8f74767-5qbwp 2/2 Running 0 7m19s
polyaxon-polyaxon-events-6cc46f4479-sb4cd 1/1 Running 0 7m19s
polyaxon-polyaxon-hpsearch-65d459785d-2tzvq 1/1 Running 0 7m19s
polyaxon-polyaxon-k8s-events-7c458b884c-kc4js 1/1 Running 0 7m19s
polyaxon-polyaxon-monitors-6b85744899-567d2 1/1 Running 0 7m19s
polyaxon-polyaxon-scheduler-7fc8c84c9f-q864g 0/1 Pending 0 7m19s
polyaxon-rabbitmq-ha-0 1/1 Running 0 7m19s
polyaxon-redis-master-0 0/1 Pending 0 7m19s
polyaxon-redis-slave-0 0/1 Running 5 7m19s
polyaxon-sync-db-4dsv5 0/1 Error 0 23m
polyaxon-sync-db-hmjr6 0/1 Error 0 25m
polyaxon-sync-db-j4kbh 0/1 Error 0 22m
polyaxon-sync-db-qtxmc 0/1 Error 0 21m
polyaxon-sync-db-rqdnb 0/1 Error 0 23m
After changing the config as described above as
rbac:
enabled: true
ingress:
enabled: false
serviceType: LoadBalancer
I was able to get rid of the pods with error
kubectl get pods -n polyaxon
NAME READY STATUS RESTARTS AGE
polyaxon-docker-registry-69c8c67467-d8tgr 0/1 Pending 0 6m29s
polyaxon-polyaxon-api-68bb994b4d-dcjc8 0/2 Pending 0 6m29s
polyaxon-polyaxon-beat-8595966944-hn29w 2/2 Running 0 6m29s
polyaxon-polyaxon-events-86b4476887-ggpfg 1/1 Running 0 6m29s
polyaxon-polyaxon-hpsearch-7f86c7c997-lr2bq 1/1 Running 0 6m29s
polyaxon-polyaxon-k8s-events-5645f7b4f6-2sjrc 1/1 Running 0 6m29s
polyaxon-polyaxon-monitors-55796dc87d-ktp6s 1/1 Running 0 6m29s
polyaxon-polyaxon-scheduler-595d4dc459-2vk2b 0/1 Pending 0 6m29s
polyaxon-rabbitmq-ha-0 1/1 Running 0 6m29s
polyaxon-redis-master-0 0/1 Pending 0 6m29s
polyaxon-redis-slave-0 0/1 Running 4 6m29s
But the error with the installation is still there
helm install polyaxon/polyaxon --name=polyaxon --namespace=polyaxon -f polyaxon-config.yml --wait
Error: release polyaxon failed: timed out waiting for the condition
This issue has not seen any recent activity.