Go to file
Alejandro Cabrera eb66cfe767 feat: connect sharding manager to control drivers
This patch implements the register/deregister/lookup operations for
the sharding manager.

As a result of this patch, the sharding driver now takes the control
driver as a paramater. This gives it the access needed to make
decisions about queue placement (and lookups) based on the entries in
the control plane.

In order to get the sharding manager working correctly, several
methods had to be overridden to properly handle the QueueNotMapped
error. When a QueueNotMapped error is encountered under normal
conditions, it is equivalent to the target resource not being
found. The overrides mimic the default behavior of those controllers'
methods in the case where the queue isn't found.

An inconsistency was found between the base storage driver and the
concrete implementations. message_controller.list did not provide an
include_claimed parameter. This has been corrected.

To avoid DuplicateOptErrors in the mongodb driver in a sharded
context, a filtering algorithm is applied. To make it clear to data
drivers that they need to apply this filtering algorithm, conf.dynamic
is set by the sharding driver.

Unit tests have been added for the weighted select algorithm.

Up next: sharded queue listing support, caching

Change-Id: Ic36cd657ba13fa4c0b624dc5c71bfe99f9a70139
Partitally-implements: blueprint storage-sharding
2013-11-19 11:34:54 -05:00
2013-08-14 16:10:08 -05:00
2012-11-01 09:52:20 +01:00

Marconi

Message queuing service for OpenStack

Running a local Marconi server with MongoDB

Note: These instructions are for running a local instance of Marconi and not all of these steps are required. It is assumed you have MongoDB installed and running.

  1. From your home folder create the ~/.marconi folder and clone the repo:

    $ cd
    $ mkdir .marconi
    $ git clone https://github.com/openstack/marconi.git
  2. Copy the Marconi config files to the directory ~/.marconi:

    $ cp marconi/etc/marconi-proxy.conf-sample ~/.marconi/marconi-proxy.conf
    $ cp marconi/etc/marconi-queues.conf-sample ~/.marconi/marconi-queues.conf
    $ cp marconi/etc/logging.conf-sample ~/.marconi/logging.conf
  3. Find the [drivers:storage:mongodb] section in ~/.marconi/marconi-queues.conf and modify the URI to point to your local mongod instance:

    uri = mongodb://$MONGODB_HOST:$MONGODB_PORT
  4. For logging, find the [DEFAULT] section in ~/.marconi/marconi-queues.conf and modify as desired:

    log_file = server.log
  5. Change directories back to your local copy of the repo:

    $ cd marconi
  6. Run the following so you can see the results of any changes you make to the code without having to reinstall the package each time:

    $ pip install -e .
  7. Start the Marconi server:

    $ marconi-server
  8. Test out that Marconi is working by creating a queue:

    $ curl -i -X PUT http://127.0.0.1:8888/v1/queues/samplequeue -H
    "Content-type: application/json" -d '{"metadata": "Sample Queue"}'

You should get an HTTP 201 along with some headers that will look similar to this:

HTTP/1.0 201 Created
Date: Fri, 25 Oct 2013 15:34:37 GMT
Server: WSGIServer/0.1 Python/2.7.3
Content-Length: 0
Location: /v1/queues/samplequeue
Description
OpenStack Messaging (Zaqar)
Readme 46 MiB
Languages
Python 95.6%
PHP 1.8%
Shell 1.3%
HTML 0.9%
Lua 0.3%