all tasks stuck in 'pending' when running under uwsgi

Bug #1742813 reported by Brian Rosmaita
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Triaged
Undecided
Unassigned

Bug Description

The Pike devstack runs Glance using the wsgi configuration. All created tasks are stuck in 'pending'. This doesn't happen in Ocata devstack.

Tags: uwsgi
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

In the Tasks and Images controllers, when an API request comes in, a task is created and a spawn_n is called on the 'tasks_eventlet_pool'. In the pike devstack, these tasks remain stuck in pending. I added a waitall() right after the spawn_n() call, and the tasks run to completion. This happens whether the taskflow engine is being run in serial or parallel mode. It does not occur when glance is run in the screen-based devstack.

Changed in glance:
status: New → Triaged
Revision history for this message
Matthew Treinish (treinish) wrote :

Just a clarification devstack doesn't use screen anymore, it hasn't been the default for local use since early in Ocata (and even earlier for the gate), when it was deprecated, and all screen support was removed early in Pike. The bug here is not because of how the service is launched (screen vs systemd) it is because starting in pike glance api is not being with the standalone eventlet server anymore.

My guess is this is because of an implicit assumption that the eventlet setup is already done in our use of taskflow. Which in the standalone eventlet server world is probably something we got for free.

tags: added: uwsgi
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Matt is correct, it's not a screen thing. The key thing is that everything works when you run Glance in its eventlet server mode. I've got a patch up to make this the default in devstack: https://review.openstack.org/#/c/545483/

Revision history for this message
Matthew Treinish (treinish) wrote :

I'm thinking we might be able to use a different executor with the taskflow engine to fix this. I have an attempt at that here: https://review.openstack.org/#/c/549743/1

Revision history for this message
Joshua Randall (jcrandall) wrote :

It appears that this is likely to have been fixed as of the victoria release (according to https://review.opendev.org/c/openstack/glance/+/754748 and https://review.opendev.org/c/openstack/glance/+/756865/1#message-daaca94a08228abfa2b6f41b21255a416cc42c4c).

The suggestion in those two reviews is that glance has working support for task execution when running in uWSGI as of victoria.

If this is true, there remains a documentation issue in that the warning box still says it is not supported at present: https://docs.openstack.org/glance/victoria/admin/apache-httpd.html

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.