workflow icon indicating copy to clipboard operation
workflow copied to clipboard

Deis Workflow v2.9.1 deis pull deis/example-go -a <app-name> Error

Open dinkarthakur opened this issue 9 years ago • 15 comments

I'm trying to test Deis Workflow. My cluster is good and running fine, but when i try to do

deis pull deis/example-go -a molten-electron I'm getting error

Creating build... Error: Unknown Error (400): {"detail":"'NoneType' object is not iterable"} When i look into the logs for deis-controller using

kubectl logs -f deis-controller-2092062600-xdd1g --namespace=deis i get error

INFO Pulling Docker image deis/example-go:latest
INFO Tagging Docker image deis/example-go:latest as localhost:5555/molten-  electron:v2
INFO Pushing Docker image localhost:5555/molten-electron:v2
INFO Pulling Docker image localhost:5555/molten-electron:v2
INFO Pulling Docker image localhost:5555/molten-electron:v2
INFO [molten-electron]: adding 5s on to the original 120s timeout to account   for the initial delay specified in the liveness / readiness probe
INFO [molten-electron]: This deployments overall timeout is 125s - batch timout is 125s and there are 1 batches to deploy with a total of 1 pods
INFO [molten-electron]: waited 10s and 1 pods are in service
INFO [molten-electron]: waited 20s and 1 pods are in service
INFO [molten-electron]: waited 30s and 1 pods are in service
INFO [molten-electron]: waited 40s and 1 pods are in service
INFO [molten-electron]: waited 50s and 1 pods are in service
INFO [molten-electron]: waited 60s and 1 pods are in service
INFO [molten-electron]: waited 70s and 1 pods are in service
INFO [molten-electron]: waited 80s and 1 pods are in service
INFO [molten-electron]: waited 90s and 1 pods are in service
INFO [molten-electron]: waited 100s and 1 pods are in service
INFO [molten-electron]: waited 110s and 1 pods are in service
INFO [molten-electron]: waited 120s and 1 pods are in service
ERROR:root:'NoneType' object is not iterable
Traceback (most recent call last):
File "/app/api/models/build.py", line 65, in create self.app.deploy(new_release)
File "/app/api/models/app.py", line 545, in deploy
release.cleanup_old()
File "/app/api/models/release.py", line 267, in cleanup_old
for controller in controllers['items']:
TypeError: 'NoneType' object is not iterable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/rest_framework/views.py", line 474, in dispatch
response = handler(request, *args, **kwargs)
File "/app/api/views.py", line 185, in create
return super(AppResourceViewSet, self).create(request, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/rest_framework/mixins.py", line 21, in create
self.perform_create(serializer)
File "/app/api/viewsets.py", line 21, in perform_create
self.post_save(obj)
File "/app/api/views.py", line 268, in post_save
self.release = build.create(self.request.user)
File "/app/api/models/build.py", line 79, in create
raise DeisException(str(e)) from e
api.exceptions.DeisException: 'NoneType' object is not iterable
10.2.50.10 "POST /v2/apps/molten-electron/builds/ HTTP/1.1" 400 46 "Deis Client v2.9.1"

Can you guys please help what went wrong?

dinkarthakur avatar Dec 16 '16 06:12 dinkarthakur

This error occurs on kubernetes v1.5.1. Can you try this using Workflow v2.9.1? We explicitly rolled that out yesterday for 1.5.1 compatibility.

bacongobbler avatar Dec 16 '16 07:12 bacongobbler

for reference: https://github.com/deis/controller/pull/1178

bacongobbler avatar Dec 16 '16 07:12 bacongobbler

I'm using Deis v2.9.1 and

kubernetes version is

Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.6", GitCommit:"e569a27d02001e343cb68086bc06d47804f62af6", GitTreeState:"clean", BuildDate:"2016-11-12T05:22:15Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+coreos.0", GitCommit:"cc65f5321f9230bf9a3fa171155c1213d6e3480e", GitTreeState:"clean", BuildDate:"2016-12-14T04:08:28Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}

But still getting the issue

dinkarthakur avatar Dec 16 '16 07:12 dinkarthakur

Can you confirm with deis version --all? That exact code:

for controller in controller['items']:

Was what was fixed in v2.9.1.

bacongobbler avatar Dec 16 '16 12:12 bacongobbler

when i did deis version --all i get

Workflow CLI Version: v2.9.1 Workflow CLI API Version: 2.3 Workflow Controller API Version: 2.3

can you please tell me how to upgrade the version. do I need to update deis version or only Controller api version, Im already using deis v2.9.1

dinkarthakur avatar Dec 16 '16 15:12 dinkarthakur

Your client is v2.9.1 but you need to upgrade the platform as well.

You'll need to follow the upgrading documentation to upgrade the platform. You'll want to upgrade to v2.8 or v2.9 via helm-classic, then use the workflow-migration project to migrate over to helm. From there you'll want to run helm upgrade to bring the platform up to v2.9.1.

Hope this helps!

bacongobbler avatar Dec 16 '16 15:12 bacongobbler

Just an FYI that you might want to upgrade your kubectl client as well. Your kubernetes cluster is at v1.5.1 but your client is at v1.4.6.

bacongobbler avatar Dec 16 '16 15:12 bacongobbler

i did helm upgrade yucky-gecko deis/workflow --version=v2.9.1 but i got

Fetched deis/workflow to workflow-v2.9.1.tgz
Error: UPGRADE FAILED: release: not found

dinkarthakur avatar Dec 16 '16 16:12 dinkarthakur

That's why I said

You'll want to upgrade to v2.8 or v2.9 via helm-classic first, then use the workflow-migration project to migrate over to helm. From there you'll want to run helm upgrade to bring the platform up to v2.9.1.

bacongobbler avatar Dec 16 '16 16:12 bacongobbler

I did helm list and got back

NAME REVISION UPDATED STATUS CHART
xrayed-unicorn 1 Fri Dec 16 20:59:08 2016 DEPLOYED workflow-migration-v1.0.0 yucky-gecko 2 Fri Dec 16 21:39:36 2016 DEPLOYED workflow-v2.9.1

i guess i have updated deis :) . how to verify it

dinkarthakur avatar Dec 16 '16 16:12 dinkarthakur

use deis version --all again.

bacongobbler avatar Dec 16 '16 16:12 bacongobbler

its saying

Workflow CLI Version: v2.9.1 Workflow CLI API Version: 2.3 Workflow Controller API Version: 2.3

but earlier

yucky-gecko 2 Fri Dec 16 21:39:36 2016 DEPLOYED workflow-v2.9.1

was

yucky-gecko 2 Fri Dec 16 21:39:36 2016 DEPLOYED workflow-v2.9.0

dinkarthakur avatar Dec 16 '16 16:12 dinkarthakur

I'd check your client settings and ensure it's targeting the right endpoint. You might be hitting a different cluster then. Check the troubleshooting docs if you're having more trouble.

$ cat ~/.deis/client.json
$ deis login http://blahblah...

bacongobbler avatar Dec 16 '16 16:12 bacongobbler

It worked I'm now able to deploy the application. I setup coreos cluster in Virtual box and then Kubernetes and then deis, now everything is working fine, Thanks a lot 👍. Now i want to see the deis workflow dashboard for monitoring loging and cluster health, can you point me in right direction.

Thanks :)

dinkarthakur avatar Dec 16 '16 16:12 dinkarthakur

https://deis.com/docs/workflow/managing-workflow/platform-monitoring/ https://deis.com/docs/workflow/managing-workflow/platform-logging/

bacongobbler avatar Dec 16 '16 16:12 bacongobbler