summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Remove openstack.common.db.commonMark McLoughlin2013-02-074-61/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this only contains exceptions that are either used in session.py or utils.py (not both), it seems sensible to move them into the modules where they are used. Also, remove the use of the Invalid base exception class since we don't seem to be making use of the base class anywhere by catching it rather than the more specialized exceptions. Change-Id: Ib05bb2e0a9494e1dc60c60b8eee0e76b5d2ee555
* | | | | | Provide creating real unique constraints for columnsBoris Pavlovic2013-02-072-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main issue is that we can't create unique constraint for columns, because we are using soft deletion of entries (set `deleted` column to True). The main idea is to use `deleted` columns to create unique constraint for columns. For example (`col1`, `deleted`). To make (`col1`, `deleted`) unique after entry deletion, we should assign the value of `id` to `deleted` column. Change type of `deleted` column from Boolean to table.id.type for all tables. Change models.soft_delete() method to assign table.id instead of True to `deleted` column. Change query.soft_delete() method to assign literal_column("id") instead of True blueprint db-unique-keys Change-Id: Ie1f67f49a5d085e6371efb63fc23a1c8b25d9464
* | | | | | Fix missing wrap_db_error for Session.execute() methodBoris Pavlovic2013-02-072-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should add wrap_db_error for Session.execute() method, because Query.update() method will call Session.execute() and it is not inside Session.flush(), so exceptions from Query.update() wouldn't be wrapped. Add test for Session.flush() wrapper Add test for Session.execute() wrapper Fixes bug 1107890 Change-Id: I96894e502f9f279999b61a1e66469e34a07a022d
* | | | | | Fix eventlet/mysql db pooling codeBrian Elliott2013-02-071-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eventlet versions >= 0.10 return a tuple from db_pool.ConnectionPool().create(), not a scalar. Also, set the FOUND_ROWS client flag, which sqlalchemy appears to require to sanity check the number of rows touch. bug 1097992 Change-Id: I64e798660c506fcd13947a232cb7832db0318360
* | | | | | Add missing DBDuplicateEntryMark McLoughlin2013-02-071-0/+7
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The session.py part of nova's 8835866 was imported, but not the newly added exception. Change-Id: I0d79a8536f0c8f14cb062dc61c5fce100b63fd64
* | | | | Add support for directly stringifying VersionInfo.Monty Taylor2013-02-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glanceclient, and others, want to have a __version__ member in their top-level __init__.py. This leads to attempting to process the version information to realize the string at import time, rather than at request time. If we make VersionInfo a thing which can behave like a string, then, we should get the things we want without the operational weirdness. Change-Id: I3eb15006f50ed1155c85977aaae842677c5ec4bc
* | | | | Merge "timeutils: considers that now is soon"Jenkins2013-02-062-7/+12
|\ \ \ \ \
| * | | | | timeutils: considers that now is soonJulien Danjou2013-01-312-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to Doug suggestion at https://review.openstack.org/#/c/20323/2/openstack/common/timeutils.py Change-Id: Ic318202234202e56054df1b5cc7f82a404c307bc Signed-off-by: Julien Danjou <julien@danjou.info>
* | | | | | Merge "Emit a warning if RPC calls made with lock."Jenkins2013-02-064-59/+130
|\ \ \ \ \ \
| * | | | | | Emit a warning if RPC calls made with lock.Michael Still2013-02-064-59/+130
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will log a warning every time a RPC call is made while a lock is held if the caller has requested it. This should help us track down performance problems such as the security group refresh problem recently found in nova. RPC calls can emit a warning if called with check_for_lock=True and debugging is turned on. Sneaks up on bug 1063222. Change-Id: Ice94093efb3cb95dd58b31d6ba817c7d505c15af
* | | | | | Merge "Be explicit about set_default() parameters"Jenkins2013-02-061-2/+4
|\ \ \ \ \ \
| * | | | | | Be explicit about set_default() parametersMark McLoughlin2013-02-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We probably only want to support people using set_defaults() for a limited set of config options, so explicitly list those as parameters to the method. This is what we do for rpc and log options too. Change-Id: I3bfc5355e82eec17480b9547662e847dc0d74138
* | | | | | | Merge "Remove duplicate DB options"Jenkins2013-02-061-6/+0
|\| | | | | |
| * | | | | | Remove duplicate DB optionsMark McLoughlin2013-02-051-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql_dbpool_enable and sql_connection_trace are declared twice. Looks like this was a merge conflict when sql_dbpool_enable changed from int to bool. Change-Id: I553c5beea916e0ee296648342324fd53167c073a
* | | | | | | Merge "Eliminate gratuitous DB difference vs Nova"Jenkins2013-02-061-3/+2
|\| | | | | |
| * | | | | | Eliminate gratuitous DB difference vs NovaMark McLoughlin2013-02-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like this was an abritrary cleanup done as part of the import. It conflicts with a more recent change in Nova. We can move to using try_import() once we've killed the Nova copy of this code. Change-Id: I5c67d3fbd846a262feb724e26b14447a76561ae6
* | | | | | | Merge "Import sqlalchemy session/models/utils"Jenkins2013-02-0612-0/+1122
|\| | | | | | | |/ / / / / |/| | | | |
| * | | | | Import sqlalchemy session/models/utilsEric Windisch2013-02-0512-0/+1122
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring in session, base model, utilities, and tests for sqlalchemy from Nova. Add sqlalchemy to pip-requires and and python-mysql to test-requires. Partially implements blueprint common-db Change-Id: I3e0065cdac87e10c4e0742d66c293c72bb3acbb2
* | | | | Merge "Allow tools/install_venv_common.py to be run from within the source ↵Jenkins2013-02-052-0/+11
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | directory."
| * | | | Allow tools/install_venv_common.py to be run from within theJosh Kearney2013-02-052-0/+11
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source directory. Not doing this raised exceptions when it tried importing modules that didn't exist in the path. Change-Id: I10e02cd9ce6beb8fdf822dd397688450ac6981a1
* | | | Merge "Mark password config options with secret"Jenkins2013-02-052-2/+4
|\ \ \ \
| * | | | Mark password config options with secretMichael J Fork2013-02-042-2/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Config object supports masking values when writing out if the secret flag is set on the option definition. This change flags all oslo-incubator options containing a password. Change-Id: I78451c4fdfdb3d6e28a7bd5f35d1c4c9a1b2be99
* | | | Merge "Only unpack replies on caller."Jenkins2013-02-051-22/+18
|\ \ \ \
| * | | | Only unpack replies on caller.Eric Windisch2013-01-311-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opening the messages is unnecessary in ZmqProxy, given that the msg_id is already in the (zmq-specific) message envelope. Additionally, by not opening the messages, we save a bit of complexity. This avoids having to deserialize and reserialize messages in ZmqProxy, a necessary improvement for trusted-messaging and should also have a markable performance benefit. Also cleans up msg_id handling a bit. Change-Id: I31f365b9e1040503206b1d8320a0266a8121c821
* | | | | Merge "Use bytes instead of str"Jenkins2013-02-051-4/+3
|\| | | | | |/ / / |/| | |
| * | | Use bytes instead of strEric Windisch2013-01-311-4/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarifies that str is the wrong datatype for passing messages over ZeroMQ. This distinction will be more important with the eventual migration to Python 3.0, but (I hope) this also helps clarify WHY typecasting is performed before sending messages. Change-Id: I4dd4661a5730a24ba7b514520b0429b721b05e9c
* | | Support for ipv6 in wsgi.ServiceDavanum Srinivas2013-02-032-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable wsgi.Service to listen on ipv6 address by checking if the host specified is ipv6. Based on that set the appropriate family in the eventlet.listen api More tests for just the ipv6, ipv6 with app, ipv6+ssl with app to make sure everything is working fine Change-Id: I2772905128bdbc69dd0fafe4ced848f5c477d7c8
* | | Merge "Support for SSL in wsgi.Service"Jenkins2013-02-026-5/+324
|\ \ \
| * | | Support for SSL in wsgi.ServiceDavanum Srinivas2013-01-296-5/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable support for SSL as well using code from glance. We have some new options for configuring the SSL support. test_app starts wsgi.Service with a test app, then creates a url to make sure the http requests are actually served properly test_app_using_router adds wsgi.Router and Mapper() to the mix along with using the wsgify annotation for serving the http requests Fixes LP# 979488 (partial) Fixes LP# 869884 (partial) DocImpact Change-Id: Iae47b13b50e00c102c8c36f4a3e73b24fa4e6303
* | | | Merge "Add _FATAL_EXCEPTION_FORMAT_ERRORS global."Jenkins2013-02-023-4/+18
|\ \ \ \
| * | | | Add _FATAL_EXCEPTION_FORMAT_ERRORS global.Dan Prince2013-01-303-4/+18
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new global variable to control when exception format errors are fatal. Also, updates the Oslo test base class to enable fatal exception format errors. The motivation for this change is to give projects that use openstack common a hook to enable exception format checking when testing. Change-Id: Id8f4a0946b1614c8e987976b79069532a2e8608f
* | | | Merge "Use importutils for matchmaker import."Jenkins2013-02-021-15/+1
|\ \ \ \
| * | | | Use importutils for matchmaker import.Eric Windisch2013-01-301-15/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Per Vish's suggestion. this should be simplier, cull redundant code, and otherwise cut the fat. Change-Id: I9fa3effdc8e9e2f3f124690ecf77ee8bb7d4d39e
* | | | Merge "Dict args safe processing."Jenkins2013-02-021-8/+9
|\ \ \ \ | |_|_|/ |/| | |
| * | | Dict args safe processing.Eric Windisch2013-01-281-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve safety of dict args in process() Change-Id: I0eae36ca6566c1b60f0a01ebee57ae8a7530fcb1
* | | | Fixes 'not in' operator usageZhongyue Luo2013-01-312-1/+13
| |/ / |/| | | | | | | | Change-Id: Ibac9853fc72e2452fa5e2b3a493bd03523faabfb
* | | Merge "Add tests for setup"Jenkins2013-01-301-0/+114
|\ \ \
| * | | Add tests for setupAlessio Ababilov2013-01-301-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test write_git_changelog, generate_authors, get_cmdclass, and parse_dependency_links. Also test private _run_shell_command function. Change-Id: I583d679afc1dc805c920b4beffc2f664833aabd0
* | | | Fix PEP8 error in oslo-rootwrapThierry Carrez2013-01-301-2/+2
|/ / / | | | | | | | | | | | | | | | | | | Fix a PEP8 error uncovered during the cinder import of the rootwrap module. A bit weird oslo's own tests didn't catch it. Change-Id: Ib107023dd6e4178dd51b358cf9374e7a8468d1bf
* | | Merge "Support running uninstalled in a tarball dir."Jenkins2013-01-301-3/+10
|\ \ \ | |_|/ |/| |
| * | Support running uninstalled in a tarball dir.Monty Taylor2013-01-251-3/+10
| |/ | | | | | | | | | | | | | | | | | | Running tests from the directory of an expanded tarball is a reasonable thing to do, so support it by checking for PKG-INFO file if the pkg_resources version grab fails. Fixes bug 1103473 Change-Id: I2bf1fc39b070d3a2cdf6a3abe5e816c81d2916a0
* | Merge "rootwrap: Avoid PEP8 errors on name replacement"Jenkins2013-01-291-5/+8
|\ \
| * | rootwrap: Avoid PEP8 errors on name replacementThierry Carrez2013-01-281-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | Avoid triggering PEP8 errors when "oslo" is replaced by the project name in oslo-rootwrap. Made necessary by "cinder", but tested compatible with "ceilometer". Change-Id: I9a1e25ec58e8b1e833c00f6cbb2083f967cbef76
* | | Merge "Only import modules in tools/flakes"Jenkins2013-01-291-2/+2
|\ \ \
| * | | Only import modules in tools/flakesJoe Gordon2013-01-281-2/+2
| |/ / | | | | | | | | | Change-Id: I049f4e4d3927d0bf792697d30250083c87ca0b73
* | | Merge "Fix MonekyPatch typo in test_qpid"Jenkins2013-01-290-0/+0
|\ \ \
| * | | Fix MonekyPatch typo in test_qpidAlessio Ababilov2013-01-281-1/+1
| |/ / | | | | | | | | | Change-Id: I55943cca1053de09a3fc004d40c940fb92322211
* | | Merge "Default lockutils to using a tempdir"Jenkins2013-01-291-3/+2
|\ \ \
| * | | Default lockutils to using a tempdirJason Kölker2013-01-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Previously lockutils attempted to use __file__/../ as the lock path. This causes packages to fail if the user running the code doesn't have +w access to that dir. Remove the default so it will use mkdtemp instead * Fixes bug 1107950 Change-Id: Ie0cd6fac5403a53a768eb4a0ce7da602b3fef755
* | | | Merge "Fix Pep8 Warning"Jenkins2013-01-291-1/+1
|\ \ \ \