In order to support running unit tests on RHEL 6.x we need to patch
eventlet with contrib/redhat-eventlet.patch. We already
have support for this in the tools/install_venv_common.py but we need
to make a couple changes to allow tox to consume this:
1) Sync in the latest intall_venv_common.py from oslo. This changes
patch to use the -N option (ignore already applied patches) and makes
it safe to call the patching function more than once.
2) Add a new patch_tox_venv.py script in tools.
3) Update tox.ini to call patch_tox_venv.py before it runs tests and
coverage.
Change-Id: I3e2b07c3f718e4aede5c5f231ff0cdb7721ec885
It's unnecessary to implement setUp() and tearDown() when they only call
the parent class method of the same name.
Change-Id: I8a2c7f50e17def87ada8d4f1c1b554eb916afbd1
Before each API call logged the same data three times on INFO level. We only need to log the information once.
Fix bug 975589
Change-Id: I24131cf9f1c27030ecc99e638e9f4126096a0b96
Note that this includes a fix to tests/db/fakes.py to make the fake
instance_type structures look like the database models.
This is one change in a series aimed at removing the use of instance-linked
instance_type objects, in favor of the decoupled type data in
system_metadata. See bug 1140119 for more details.
Change-Id: Ieb107fbaf0f3b5a42681aefc0ffdefdb8c0f98a5
Migration 153 adds instance_type data to sys_meta, but creates entries
with the default value of deleted.. which is NULL. This means these
entries do not get pulled in on a join when querying an instance, as
there is a condition of deleted=0.
This converts 'deleted' NULL entries to be 0.
Fixes bug 1147839
Change-Id: I3caf92b3992b22089a2653c2e7220585d616a102
compute.manager methods often takes password parameters in methods
that are wrapped with exception handlers and notifiers. What can
happen is these passwords will get bundled up and sent outside of
the system.
This patch will strip out any parameter with *_pass* in the name.
The side effect of this is that all notification will have the
error parameters in the 'args' part of the notification payload.
Previously only the positional args were in the 'args' part and
keyword args were placed in the payload directly.
This may affect consumers of the error notifications.
Change-Id: I2e7822eb5416d315ceb690f739e4dba9d52a7954
When trying to delete a resized instance Nova will automatically
call confirm on the resized instance to help clean things
up. With some of the recent action event changes in grizzly this
code path was broken due to a missing record_action_start
call on the confirm_resize operation.
Fixes LP Bug #1147387.
Change-Id: I23e84de8675c980656a71b71e34ffa0a0801f389
There is complication with re-raising exceptions and our usage of
eventlet. If the code in the exception handler accesses the db or rpc
in the exception handler, it will no longer be able to re-raise the
exception. Using excutils.save_and_reraise_exception() works aorund
this issue.
The most common error is calling LOG.error() or LOG.exception(), as it
is possible for these to go access rpc. There is an option to turn on
notifications for these errors.
Fix bug 845866.
Change-Id: Icfca2af63805711229249aa7abe60a938edd1b35
When trying to get a keypair that did not exist, a traceback would end
up in the nova-api log. Handle this exception in the API extension so
that it doesn't make a mess of the log.
Also add a unit test for this particular scenario.
Fix bug 1145545.
Change-Id: Id1647d4ac56629c2931099320d271e34fc2f99b9
Fixes Bug: 1140778
Due to the large number of options available in Nova, in order to
achieve better option organization and naming (e.g. avoid the hyperv_*
prefix) and to avoid option name clashes, options specific to the
Hyper-V driver are moved to a section named "hyperv".
Backwards compatibility is mantained by providing the "deprecated_group"
argument in option definitions.
For case consistency the group name as been changed to "hyperv" for options
introduced in Grizzly belonging to the group "HYPERV"
Change-Id: If2710822cdf6e4ae108a6d1e7977735ac8104a2e
Until now when you used values non-integer to max_count and/or min_count the
coercion worked like: min_count = int(2.5) so min_count received 2 instead of
raise bad request.
Convert to string before coerce to int solves the problem since int coercion
cannot convert from a string which is not a perfect int.
Change-Id: Ifaa9910e13614554d1769e71e8eba9587ec5a13b
Details:
- Use the nova/utils.py validations along the code
- refactor ipv4 validator to looks like ipv6 validator
- interprets ip validations exceptions as Invalid IP values
Change-Id: Ia506c00510a066e167d3dcd9dd371a371129a9dd
All deferred delete tests set reclaim_instance_interval to 1. This is
fine for the test_deferred_delete test that depends on the periodic
task _reclaim_queued_deletes to run.
For the other tests however, in the unlikely event that the periodic
task do run before the tests are done, it will interfere with the tests
by terminating the instance in the middle of it.
By setting the interval longer than the actual test run, this can be
avoided.
Resolves bug 1146510.
Change-Id: I606cd9f3277cc86cf4f9811da2a10efc7433b9d0
Update nova.notifications configuration options to be in a list, like
pretty much everywhere else. For some reason when I saw this it buged
me so ... I changed it.
Change-Id: I551aba4eaceed2d1a8925e9ab621a030af83eeca
Update add-fixed-ip and remove-fixed-ip code paths to update the
updated_at field of the instance, since from the user's perspective
through the API, they have made a change to the instance's
configuration. In that case, it makes sense to expect that the
updated_at field gets changed.
Fix bug 1143466.
Change-Id: Icfd7d0b1b556795d94a22c1719727f8c9fc744f0