691 Commits

Author SHA1 Message Date
Jon Bernard
3c80a58418 Include full license text
The Apache 2.0 license requires that you include a copy of the license
text in the source code distributed under that license.

Change-Id: I0fd94cece535fbe18bf94c7128e412942e6e30b9
2014-03-21 10:16:28 +01:00
Jon Bernard
153efedbc7 Update license headers on select source files
Once a top-level LICENSE file is included, pep8 will compare the license
header of a source file to its expected value and complain if they don't
match.  This patch re-formats the headers in question to please pep8.

No license content is changed, only formatting.

Change-Id: I0f1318b23f343523ca679ca331ef6f9f7084ebc2
2014-03-21 10:16:28 +01:00
Jenkins
5ce7f69610 Merge "Marconi Operations Document" 2014-03-18 20:38:52 +00:00
Ozgur Akan
bf09f09d0d Marconi Operations Document
Adding developer/operation documents including:
1. Glossary
2. Install and configure
3. Deploy Marconi in a minimal HA env
4. Access API with Marconi client

Co-Authored-By: Fei Long Wang <flwang@cn.ibm.com>

Implements: blueprint docs

Change-Id: I2549995fb0754c7f3c8ce718639e1299e2805795
2014-03-18 14:49:25 -04:00
root
638b79afab adds docs directory with dev guide
Change-Id: I1f2652cc471f3fa39627a63f09fefdd0b9f5bb6b
2014-03-18 14:48:54 -04:00
Alejandro Cabrera
dc7adefc82 fix(gate): one for pypy, one for docs
Drop the version requirement for setuptools w/ tox:pypy to workaround:

https://bugs.launchpad.net/openstack-ci/+bug/1290562

Also add in sphinx-reqs to make the docs gate happy.

Change-Id: I5ac510373809733129401b51ad39579d2963fab2
2014-03-18 12:50:43 -04:00
Jenkins
e6431b5a3a Merge "Rename logging.conf-sample to logging.conf.sample" 2014-03-14 13:55:16 +00:00
Jenkins
99c4b3e8d3 Merge "Fix config file name in README instructions" 2014-03-14 13:54:31 +00:00
Jenkins
42a39e139c Merge "Improve README file" 2014-03-13 17:13:59 +00:00
Nataliia Uvarova
ddf9004111 Improve README file
Fix curl command example, add link to wiki and section about tests.

Change-Id: I7033cf3e281d0738a8b11f6b81afd900eebb81fd
2014-03-13 17:09:49 +01:00
Jenkins
60c7c8f40d Merge "Enable the basic dev doc for Marconi" 2014-03-13 14:58:26 +00:00
Jenkins
7bf93dc82e Merge "Keep python 3.X compatibility for xrange" 2014-03-13 14:40:49 +00:00
Fei Long Wang
a46f5bf1e2 Enable the basic dev doc for Marconi
Adding sphinx_build config in setup.cfg, the conf.py which
needed by sphinx_build. And a default index.rst.

Partially implement blueprint: docs

Change-Id: Icfd25f212681595055e5326831191391fd41ed19
2014-03-13 22:17:48 +08:00
Mike Panetta
122aeac53a Allow marconi-server to properly daemonize
This patch allows marconi-server to properly detach from the controlling terminal and daemonize.

Change-Id: Ib6eabf8c44c5526ea71f913908bf2d4d37c06511
Closes-Bug: #1287490
2014-03-12 13:02:06 -04:00
Sascha Peilicke
cf12eae9ce Rename logging.conf-sample to logging.conf.sample
Align with commit a4ed60fe, like other projects name it.

Change-Id: I4f73f0e2b1cc2a37d10903d8780ef71ce2b143ea
2014-03-12 13:26:37 +01:00
Sascha Peilicke
5cde236c68 Fix config file name in README instructions
Change-Id: I45af4ff430c53e26657ef3ed659fe5c3fc3adc09
2014-03-12 13:20:53 +01:00
Fengqian Gao
524eaeba94 Keep python 3.X compatibility for xrange
Use six.move.xrange instead of  xrange. xrange is replaced
by range in python3.

closes-bug: #1291191

Change-Id: I95b68c055c4a7e7c0d77e08e6ce409cf1892ed56
2014-03-12 16:41:19 +08:00
Flavio Percoco
a4ed60feed Use oslo's config generator to generate sample
This patch adds oslo's config generator to the source tree and uses it
to generate marconi's sample configs. It also adds a check to pep8 that
verifies the config file is up-to-date.

Change-Id: Iec7defa244dc8649a5c832bb81b9ec6f30f0ee37
2014-03-11 20:14:35 +01:00
Flavio Percoco
c3f6e4f79a Prepare Marconi to support oslo's config.generator
This patch removes the options_iter function and prepares marconi's code
base to play nice with oslo's config.generator. The replacement of lists
with tuples is necessary to avoid oslo's config.generator to parse the
globally defined options. In Marconi's case, we want it to use the
registered entry_points. (This is a workaround).

Change-Id: I56995fe16cd0b6e092b522dac3c32e4ec75bb269
2014-03-11 20:14:35 +01:00
Flavio Percoco
9cea1741a2 Add an options module to sqlalchemy
Let sqla follow the pattern used in other storage drivers. This patch
adds a new options module with a function used by the oslo.config.opts
namespace in the entry_point section.

Change-Id: I0e8b24d7de220104cf59c09883415ae8c5bed8f6
2014-03-11 20:14:35 +01:00
OpenStack Jenkins
fd17127712 Updated from global requirements
Change-Id: Ic0f7822b7ff2cc201c7723e7b220cb5c87a70cb0
2014-03-11 17:30:22 +00:00
Jenkins
2aab889ff4 Merge "Use a colon instead of a . in setup.cfg" 2014-03-11 16:46:34 +00:00
Jenkins
46f60cef8b Merge "Sync from oslo-incubator" 2014-03-11 16:46:13 +00:00
Jenkins
c5b894ac00 Merge "fix(cli): Print statement in global error handler" 2014-03-11 16:33:25 +00:00
Jenkins
b011893f9c Merge "Add missing logging trace queues collection" 2014-03-11 16:32:54 +00:00
Flavio Percoco
be735165cb Use a colon instead of a . in setup.cfg
Mistakenly, the commit that added the oslo.config.opts entry_points used
a `.` before the final function instead of a `:`. This commit fixes
that.

Change-Id: I305cfe9067640bb91ce30e5f13c540931de800a6
2014-03-11 15:42:18 +01:00
Flavio Percoco
bad264dad9 Sync from oslo-incubator
This patch is intended to bring in `config.generator`. It also syncs
Marconi's modules to the latest oslo-incubator version for the sake of
being up-to-date.

Change-Id: I9cd3ccf0ce509349d561132025add42dec83ca0a
2014-03-11 15:42:18 +01:00
Flavio Percoco
356540df55 Add MySQL-python as a dependency
This is required for the sqlalchemy driver. We can argue whether it is
needed as a default dependency or completely optional but as of now, I'd
recommend having it as a hard dependency and relaxing it later.

Change-Id: I43df1e9f7386888a354119b659d4de3bc69d3b46
2014-03-11 15:41:13 +01:00
kgriffs
cfe82d39fd Add missing logging trace queues collection
This was done for consistency with the other request
responders in the transport driver.

Change-Id: Id1ae72f984c66a2dfd3a8d20253dd2908e1c4e4a
2014-03-10 15:36:02 -05:00
kgriffs
1301ac3dbb fix(cli): Print statement in global error handler
This is the last place we could be writing to stderr from our code. It
seems unlikely this is the root cause of the devstack issue, since our
monkey-patch test should have turned this up, but let's remove it to
be absolutely certain.

Change-Id: Id454d9affcf060d5308f965e25119693ec790624
Partial-Bug: #1287490
2014-03-10 15:32:36 -05:00
Jenkins
ce20e91b77 Merge "Remove unused method from timeutils" 2014-03-07 23:12:34 +00:00
Jenkins
69c809bd79 Merge "Update marconi.conf-sample to deprecate sqlite" 2014-03-07 20:45:43 +00:00
Jenkins
e218b3ad92 Merge "Slighty refactored url_prefix usage in WSGI tests" 2014-03-07 20:37:36 +00:00
Fei Long Wang
8835aee20c Enable shards test for sqlalchemy
Now we have already implemented the sqlalchemy for shards and
catalogue, so this patch will enable the shards test for
sqlalchemy.

Closes-Bug: #1288148

Change-Id: I1bc96419f2525d5211448d68c8c871dda14535a7
2014-03-07 16:33:51 +08:00
Zhongyue Luo
0d0f3b34c0 Remove unused method from timeutils
Marconi no longer uses set_time_override. Therefore there is no need to
invoke clear_time_override anymore.

Change-Id: Ifa5c6ab958130b2edbce57780fe6462ebfc37409
Related-Bug: #1266962
2014-03-07 11:36:15 +08:00
Flavio Percoco
364945f990 Reuse the transaction before getting messages
The message get helper for claims used its own connection and ran
outside the transaction where the 'claiming' happened. This caused the
get to fail at retrieving the messages because the query was being
executed 'before' the transaction.

This patch fixes the aforementioned issue and also ensures that records
ids are 'int' before calling `message_encode`.

Change-Id: I076ffc171adf02fdb15160b6c7b29646ee3fb280
Closes-bug: #1288820
2014-03-06 18:10:54 +01:00
Flavio Percoco
477bc46bfe Set time_zone to UTC on MySQL
MySQL uses UTC for all date fields but other operations like `now()` use
the timezone of the server. This patch changes the timezone of the
connection to UTC when the connection is first established.

There's space for improvement here. For instance, we could try to avoid
doing this for every new connection and let the operator configure it on
the server side. We could also use `CONVERT_TZ` on every query using
`now()`.

Change-Id: I2e8415dbb9a6ce19d3a66f3226756094b3e0f6a4
Partial-bug: #1288820
2014-03-06 18:08:22 +01:00
Flavio Percoco
b892d6d4e4 MySQL requires VARCHARs to have a length
This patch adds the length to all the `sa.String` usages in the tables
module. The values chosen are based on the already enforced limits.

Change-Id: Idcdd3f6c8027e6d79a4fb6d006e0d85dd81f3cdd
2014-03-06 16:22:20 +01:00
Victoria Martínez de la Cruz
2d53d8840e Slighty refactored url_prefix usage in WSGI tests
Several calls to url_prefix has been replaced
with the usage of a common variable in WSGI tests
in order to adjust to DRY principles.

Change-Id: I056e1e8879a97f6a30aff924e55bdf50897c08e4
Closes-Bug: #1285219
2014-03-06 09:46:04 -03:00
Fei Long Wang
8ec7ae70b4 Update marconi.conf-sample to deprecate sqlite
Now we're supporting sqlalchemy and the sqlite is deprecated.
So the marconi.conf-sample should be update to reflect the
change so as to avoid confusion.

Closes-Bug: #1288619

Change-Id: Ief5dad6345dc24e70af18e9e47d0f8dd384cee47
2014-03-06 16:58:17 +08:00
Flavio Percoco
bf055a485b Replace Sqlite with Sqlalchemy in test names
Change-Id: I94f6aaa1e608e34717bd1d3f2b5b0c9a606aa8bc
2014-03-05 21:52:34 +01:00
Jenkins
edae7f388a Merge "fix(MongoDB): Driver does not retry on AutoReconnect errors" 2014-03-05 17:22:08 +00:00
Jenkins
ce233b2bc1 Merge "Removed debug level messages translations" 2014-03-05 15:40:27 +00:00
Victoria Martínez de la Cruz
62095da758 Removed debug level messages translations
Cleared _() from all debug level messages
in order to stick to new translations guidelines

Change-Id: I724f790c733c67f1111a862c77cf44f7f17d194c
Closes-Bug: #1276335
2014-03-05 10:40:35 -03:00
kgriffs
c13fb6f93e fix(MongoDB): Driver does not retry on AutoReconnect errors
When a primary MongoDB node fails over to a secondary, pymongo raises an
AutoReconnect error. Let's catch that and retry the operation so that
we truly are Highly Available (in the sense that the user will never notice
the few ms of "downtime" caused by a failover).

This is particularly important when hosting backend with a DBaaS that
routinely fails over the master as a way of compacting shards.

NOTE: In order to get all MongoDB tests green, a tiny unrelated bug in
test_shards was fixed as part of this patch.

Closes-Bug: 1214973
Change-Id: Ibf172e30ec6e7fa0bbb8fdcebda9e985d1e49714
2014-03-05 03:19:25 -06:00
Jenkins
51c0ce24f5 Merge "Fix assertion for Testutils to check on sqlite://:memory:" 2014-03-05 05:08:41 +00:00
Jenkins
266ca5380a Merge "fix(mongodb): Limit kwarg must be an int" 2014-03-04 19:11:18 +00:00
Seif Lotfy
dd19919923 Fix assertion for Testutils to check on sqlite://:memory:
The current uses sqlite://memory to test a connection. This is a faulty path to
memory. Corrent path is sqlite://:memory:

Change-Id: I950521f9b9c6aa8ae73be24121a836e84e409ca2
2014-03-04 15:54:03 +01:00
Flavio Percoco
e43e7e7101 Deprecate sqlite in favor of sqlalchemy
Since the default engine used by the new sqlalchemy driver is sqlite, it
doesn't make sense to keep the sqlite driver around. This patch replaces
all usages of `sqlite` with `sqlalchemy`.

Although sqlite is being deprecated, the patch keeps the entry point for
backwards compatibility so that environments currently using the sqlite
backend won't be suddenly broken.

Implement blueprint: sql-storage-driver

Change-Id: Ib7e32fa56ab0c6621dc9a888feb6b0e4981b4e91
2014-03-04 09:15:50 +01:00
Flavio Percoco
bbcd593a74 Don't raise DoesNotExist on claims deletion
We don't raise DoesNotExist when the queue that a claim has to be
deleted from does not exist.

Implements blueprint: sql-storage-driver

Change-Id: I2a3e11d493b066c5dae7af81db81989468e90726
2014-03-03 21:30:45 +01:00