Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prealloc requests fail #242

Closed
cg2v opened this issue Jan 12, 2024 · 1 comment · Fixed by #243
Closed

Prealloc requests fail #242

cg2v opened this issue Jan 12, 2024 · 1 comment · Fixed by #243
Assignees

Comments

@cg2v
Copy link
Member

cg2v commented Jan 12, 2024

Expected Behavior

sending a preallocate request should allocate the execution slots and return a successful result

Actual Behavior

The slots are allocated, but the request fails with an internal server error.

tornado.application|Uncaught exception POST /prealloc/[KEY]/[image]/[count]/ (::1)
HTTPServerRequest(protocol='http', host='localhost:3000', method='POST', uri='/prealloc/[KEY]/[image]/[count]/', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/usr/local/lib64/python3.9/site-packages/tornado/web.py", line 1786, in _execute
result = await result
File "/usr/local/lib/Tango/restful_tango/server.py", line 124, in post
instances = await tangoREST.prealloc(key, image, num, self.request.body)
TypeError: object dict can't be used in 'await' expression
tornado.access|500 POST /prealloc/[KEY]/[image]/[count]/ (::1) 14397.99ms

Steps to Reproduce the Behavior

on the tango server:
tango-cli.py -k [KEY] --prealloc --num [count] --image [image] --vmms localDocker

@damianhxy
Copy link
Member

damianhxy commented Jan 13, 2024

The fix should be to make the prealloc method in tangoREST.py async

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants