Bug 1127574 - Dispatch multiple requests to OpenStack in parallel
Summary: Dispatch multiple requests to OpenStack in parallel
Alias: None
Product: Beaker
Classification: Community
Component: scheduler
Version: develop
Hardware: Unspecified
OS: Unspecified
unspecified vote
Target Milestone: 24.0
Assignee: matt jia
QA Contact: tools-bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-08-07 07:50 UTC by Nick Coghlan
Modified: 2018-02-06 00:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2017-02-21 18:51:02 UTC

Attachments (Terms of Use)

Description Nick Coghlan 2014-08-07 07:50:05 UTC
The initial OpenStack integration only makes a single VM creation request at a time. This clearly doesn't scale in systems which may be attempting to schedule dozens or hundreds of recipes in parallel.

This needs to be changed so the requests can be dispatched in parallel.

- the current MySQL client library is known to be incompatible with gevent, so that can't be used to provide asynchronous IO for the requests
- we've had issues with MySQL deadlocks when attempting to run recipe state updates in parallel, so we're wary of switching back to that configuration

- use the backported concurrent.futures module from Python 3: https://pypi.python.org/pypi/futures

This provides a nice abstraction for submitting work to a thread pool as callables and then waiting for the results: https://docs.python.org/dev/library/concurrent.futures.html#threadpoolexecutor-example

Alternatively, we could use the threading and Queue modules directly, but I think the futures abstraction is a better choice.

Comment 1 matt jia 2016-10-19 04:06:12 UTC
I have tried using concurrent.futures to dispatch multiple requests to OpenStack. Everything seems working fine when I run five jobs in my testing environment. I can see that the requests were dispatched asynchronously to OpenStack.

On Gerrit:


Note: python-futures is not available on RHEL6 so we have to build it by ourselves.

Comment 4 Dan Callaghan 2017-02-21 18:51:02 UTC
Beaker 24.0 has been released.

Note You need to log in before you can comment on or make changes to this bug.