| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \ |
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We're seeing this test fail very regularly in Jenkins and it's become
a serious distraction for everyone.
Disable the test temporarily and use a bug #1095957 to track that the
test itself needs fixing.
Change-Id: I0645d8f5f740d40f83d82e5ef7a048f33a44ac2b
|
|\ \ \ \ \
| |/ / / /
|/| / / /
| |/ / / |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The tests for timeutils use some canned datetime values that include
timezones, and override the result of utcnow() with the same. This
is not correct because the real utcnow() returns naive datetime
objects, so tests that assume the contrary are incorrect.
This came about because I was unable to satisfy both the oslo unit
tests and the nova ones with the same code. That happened because
the oslo ones override utcnow() with an invalid result, and the
nova tests use the real one.
Change-Id: I683818f77ce0d3e3b2f07c0326d7a7196f3346c3
|
|/ /
| |
| |
| |
| |
| |
| | |
Cells puts the data to be sanitized deeper into the message. We
should get this into oslo ready for when cells lands.
Change-Id: Ic5d111f11c979a179e0edcb314feb3f9d93f66ce
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds a message envelope that includes a envelope format
version number. This message envelope will allow us to embed
additional metadata later on, such as a signature for the message
payload.
Up to this point, we've deferred message serialization as a
responsibility of the messaging library we're using by passing it a
message as Python types and letting it deal with how to pass it over a
network. This patch adds json serialization in the rpc layer of the
application message payload before passing the message down into the
messaging library.
There are some benefits to be gained by doing a pass at serialization
ourselves. As an example, we occasionally hit serialization bugs that
only affect some messaging drivers. The kombu driver has always had a
nice advantage. It uses anyjson internally for serializing messages,
which we hook into using our jsonutils module. When there is a problem
serializing, we automatically use to_primitive() to fix it. This patch
allows all drivers to take advantage of this automatic message fix-up.
This also creates a convenient common hook point for messages coming in
and out of the system, regardless of the driver in use.
While this changes the base format of the messages sent between nodes,
it has been done in a backwards compatible manner. The new message
format will not be used by default. The idea is that all nodes will be
upgraded to a version that is capable of receiving the new format
(Grizzly) before switching it on. We will turn it on post-Grizzly.
Implement blueprint version-rpc-messages.
Change-Id: Ib6b2d11ca42abaa64c40986d72233e7048e504a0
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Copies current nova-rootwrap code to openstack.common, so that it
can be reused by Cinder and Quantum.
Implements blueprint common-rootwrap.
Before it can be used in projects, update.py needs to grow the
capability to deploy files in bin/ and etc/, as well as replacing
a placeholder text by the destination project name in source files
and binary names.
In this proposed version, the placeholder text is "oslo".
Change-Id: I8655d5b3cccacd1cc2225aa539339fb478615422
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Need to get rid of the deferred string approach as
the problem was overriding string methods is hard and
flaky. There is just no other documented
argparse hook to allow deferring of the version
calculation as version passed in has to be a str
or buffer. Added a test to try longer string and even
run it in a loop just to be sure.
Fixes LP #1087575
Change-Id: Icf83944d67b8ce5d3230627f3de10501da3276f2
|
|\ |
|
| |
| |
| |
| |
| |
| | |
fixes LP 1087369
Change-Id: Icf222b5bffe1f40a5c325ffe2a1b397f22713c00
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
--logfile and --logdir are aliases Nova has for the --log-file and
--log-dir. If we're to support --logfile as a deprecated common
option, we should do the same for --logdir.
Change-Id: I16485a93070d9ad7789a287d5b035c6f270ffead
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes bug #1086798
Add 'exceptions' to allowed_rpc_exception_modules so that stdlib
exceptions (like NotImplementedError) can be deserialized from a
RemoteError.
Change-Id: I57f40fed2a86cc08fb64b81d648c71cd7db8027c
|
|\ \ \ \
| | |/ /
| |/| | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This adds a deprecated common options for --logfile which
is an alias for --log_file. This resolves some backwards compatability
issues with the most recent oslo common code where --logfile
was no longer a valid opt.
Change-Id: I17b1277da94a2d81ae439d650a6d7321420dfe14
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- In log.py, indicate that logging module allows tweaking
of just logging_context_format_string option
- In cfg.py, add a method that can alter the default given
the options and new default
- add testcases for log.set_defaults and cfg.set_defaults
Fixes LP #1083218
Change-Id: Iefdbce8505eb7a07f2b59d4ed7564b0146f1b0cd
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When one service performs an operation on behalf of another, the
act of passing back an exception (even a known one) causes a lot
of scary log messages about the (presumed to be) error case. This
patch adds a client_exceptions decorator common/rpc/common.py,
which allows RPC services to declare the list of expected exceptions
for each method. If such an exception is raised during the RPC
dispatch, it is wrapped in a ClientException so that the RPC layer
can gracefully pass it back without overly-verbose logging.
This will allow us to fix nova bug 1084707
Change-Id: I4e7b19dc730342091fd70a717065741d56da4555
|
|\ \ \ \
| |_|/ /
|/| | /
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes Bug 1087018
Change-Id: I1c2d34166ae85add86daab6a7483b63297d00f66
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patches addresses a regression in the qpid driver for the
cast_to_server and fanout_cast_to_server methods. The regression was
introduced in 86952852c1dadd54f1294ae0adba01cfe827b8ce.
There are test cases that cover this code, but unfortunately they are
not being run by jenkins because python-qpid is not available in pypi.
Fix bug 1086848.
Change-Id: I89d4f81149f9a05c578b5ec544c5e34311484c6c
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code for lazy loading of version string was broken. The way it
breaks in glance and oslo is different. This patch is just for oslo.
Here we end up overriding more methods in our lazy string class to make
argparse happy and added test cases to make sure we don't break again.
we also sure we cache the result of the lookup so we return the same
version everytime and for performance. Added a few test cases as well.
Fixes LP #1085984
Change-Id: I0635899c37fa8e5a7edf282907d2a5e04aa064cb
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
blueprint oslo-cliutils
In nova-manage and cinder-manage, we allow command arguments to be
passed as optional or positional arguments.
e.g.
$> nova-manage floating create 10.0.0.1/28
$> nova-manage floating create --ip_range 10.0.0.1/28
are equivalent.
Once nova-manage has collected those arguments, it calls the
appropriate command function with them as positional and keyword
arguments. If the user forgets to supply a required argument, they
merely get a TypeError with little useful information.
Improve the usability of these commands using a new utility function
to check that the required arguments have been supplied and raise a
useful exception if not.
Change-Id: If6e4a9f222a30472bbfbcd06859865bd4e37e139
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Porting to argparse broke set_default() with boolean CLI options. The
new test case shows this borkage.
The issue is that, by default, argparse differs subtly from optparse in
its handling of defaults for boolean options. Compare:
>>> p = optparse.OptionParser()
>>> p.add_option('--foo', action='store_true')
>>> p.add_option('--bar', action='store_true', default=False)
>>> p.parse_args([])
(<Values at 0x7f28aba066c8: {'foo': None, 'bar': False}>, [])
to:
>>> p = argparse.ArgumentParser()
>>> p.add_argument('--foo', action='store_true')
>>> p.add_argument('--bar', action='store_true', default=False)
>>> p.add_argument('--blaa', action='store_true', default=None)
>>> p.parse_args([])
Namespace(bar=False, blaa=None, foo=False)
i.e. unless you specify a default for a boolean option, optparse
defaults to None whereas argparse defaults to False. To get the
same optparse behaviour with argparse, you need default=None.
Change-Id: Ifc92a834c4ba59e939d80ac5de24d7051232f5b5
|
|\| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In order for sub-parsers to be useful, you need some way of knowing
which sub-parser was chosen during argument parsing. It's pretty obvious
from the current sub-parsers test case that we don't have a convenient
interface for this.
One way of doing it is to use the 'dest' argument when adding
sub-parsers:
>>> subparsers = parser.add_subparsers(dest='cmd')
>>> subparsers.add_parser('a')
>>> subparsers.add_parser('b')
>>> parser.parse_args(['a'])
Namespace(cmd='a')
The most sensible way to map this into cfg concepts is to register
sub-parsers as an Opt. This way, we can make name and argument values
of the sub-parser as an attribute on the ConfigOpts object:
>>> def add_parsers(subparsers):
... a = subparsers.add_parser('a')
... a.add_argument('id')
... b = subparsers.add_parser('b')
...
>>> CONF.register_cli_opt(SubCommandOpt('cmd', handler=add_parsers))
True
>>> CONF(['a', '10'])
>>> CONF.cmd.name, CONF.cmd.id
('a', '10')
The handler method is a bit awkward, but each time cfg is to parse
command line args it takes all the registered opts and creates a new
argparse parser. So we need to be able to re-add the sub-parsers each
time.
Change-Id: I01bfd01bf8853cf57a9248b1663eb3da142366a4
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes bug #1083956
Change-Id: I681227e9428778adb7824a1930a33cfa5ffa13a1
|
|\| | | | |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | | |
Fixes bug #1084821
Change-Id: I1199d264b911036d142c6d1b58a41d740d795dd5
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The fake rpc backend uses json just to make sure the data that was
passed in can be serialized. Our jsonutils module makes this check a
no-op, because it will automatically convert the data we pass in as
primitive types if needed. Change this module back to using the json
module directly and add a comment about why we don't use jsonutils here.
Also add a test that ensures that non-primitive types raise an exception
in the fake rpc driver.
Change-Id: I61f46242cb98c875a94d86283e30efb24cc580ad
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
bug 1081498
There are a few log messages without _(), but a lot messages with _().
Wrap these log messages with _() in order to make the code consistent.
fix missing imports for _
Pass the log message and interpolation argument(s) to the logger separately
remove extra parens
rework the patch against latest trunk
Change-Id: Ib0a7b0f9c57aadfbc2cfc477c6123b885c9c6060
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Reuse the pool from thread group in service.Service
instead of creating a new green pool
- Add ability to control the size of the pool in service.Service
- Add a couple of tests for wsgi.Service() to test the size
of pool a start/stop as well
- Get rid of the wait method by using tg.add_thread
- Get rid of pool in wsgi.Service
- Added explicit property for host and port
Fixes LP #1050379
Change-Id: I40507dc7887fb036ec594bb167cdaa42c278607e
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
There's no reason why an option group shouldn't have options called
'group' or 'conf'.
Add a test case which would have failed because the 'conf' attribute
would have been a ConfigOpts instance and fix it by making those
attributes private.
Change-Id: Ic3e41a546c0d1b7b6aae04e1dbac2933ac661f57
|
|\ \ \ \ \
| |_|/ / /
|/| | | /
| | |_|/
| |/| | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes bug #1082279
Only options registered using register_cli_opt() should be available via
the CLI, but since e42276a all options are added to the CLI.
Also modify one of the existing unit tests to catch this problem.
Change-Id: I742a4ae4e0fc17cd9ae5e4424c2edd38e2bc50a2
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
This gets the code coverage of the tests back up to 100%.
Change-Id: I737c1cfa52d10b3813237a9cb88b15211e0872c1
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we switched to argparse, the way help strings are interpolated
have changed and broken --help with the options registered by
CommonConfigOpts.
Fix and add a new test case which would catch the issue.
Change-Id: I10e42efe4721e22ff41d0efbf390c805ccb9a6a0
|