Commit Graph

43134 Commits

Author SHA1 Message Date
Matt Riedemann 2fe5daeb5f Determine disk_format for volume-backed snapshot from schema
Xen deployments don't support qcow2 images which is what the
glance v2 API code in nova defaults to, so basically you can't
create a snapshot of a volume-backed instance with glance v2 and
Xen right now.

This change uses the glance v2 image schema to determine the
disk_format to use based on some rules:

1. Look for a preferred disk_format using an ordered list.
2. If we still can't figure it out, just use the first
   supported disk_format available.

Change-Id: Ifaa150fda393e2b49114e30dd5e30e5bf52b4ed1
Closes-Bug: #1616938
2016-09-24 20:23:07 -04:00
Jenkins c983a6a2bc Merge "Update instance node on rebuild only when it is recreate" 2016-09-24 14:38:35 +00:00
Jenkins 15a159b3fc Merge "Remove internal_id attribute from instances table" 2016-09-23 21:42:34 +00:00
Jenkins 3db8995380 Merge "Remove unused code" 2016-09-23 17:06:34 +00:00
Jenkins fa856ab21b Merge "[placement] Adjust the name of the gabbi tests" 2016-09-23 14:40:11 +00:00
Jenkins 2be8f702eb Merge "Remove redundant str typecasting" 2016-09-23 14:23:38 +00:00
Jenkins 1b1eda97dd Merge "Fix stdout leakage during opportunistic db tests" 2016-09-23 11:49:27 +00:00
Jenkins a3c96b359e Merge "conf: Add 'deprecated_reason' to osapi opts" 2016-09-23 11:43:57 +00:00
Jenkins 0ebb0b019e Merge "Remove nova.image.s3 and configs" 2016-09-23 11:16:34 +00:00
Jenkins fe374ddfa5 Merge "Nova shelve creates duplicated images in cells" 2016-09-23 10:41:07 +00:00
hussainchachuliya e53f3edf4e Remove unused code
Removed certain methods which are not used
anywhere in the code.

TrivialFix

Change-Id: I54d6f887dabb791715831519a56b6eaab42d6fa3
2016-09-23 09:42:39 +00:00
hussainchachuliya 2a5b7773af Remove redundant str typecasting
generate_uuid method returns uuid as str so there is no need
to typecast it to str again.

TrivialFix

Change-Id: I1c9cb410a175249467c4934d6820f55a63aaed6a
2016-09-23 12:53:34 +05:30
Jenkins c40b5fbc1d Merge "Add placeholder DB migrations for Ocata" 2016-09-23 02:10:09 +00:00
Jenkins f46a662c56 Merge "Remove PCI parent_addr online migration" 2016-09-23 02:09:27 +00:00
Jenkins 07620edf30 Merge "Make nova-manage online migrations more verbose" 2016-09-23 02:08:40 +00:00
Clint Byrum 8a215843dd Remove nova.image.s3 and configs
This code has no unit tests, and all of its config options were
deprecated in Newton. As pointed out by Matt Riedemann, it's time for
this code to be removed if nobody has stepped up to make sure it is well
tested and functional. This also removes the last dependency on boto.

Change-Id: I60a304f242ce342d16b6465559b04194041ff240
2016-09-22 19:29:47 -04:00
Jenkins b847b26c05 Merge "plugins/xenserver: Add '.py' extension" 2016-09-22 23:11:16 +00:00
Pushkar Umaranikar 94d5c886ba Remove internal_id attribute from instances table
internal_id attribute column from instances table is no
longer used. This commit removes internal_id from object
layer.

In the later release, this can be removed from schema
by adding migration script.

Change-Id: Ia285a16a8fab38a61959df847d30bce2d60ad081
Closes-Bug: #1441242
2016-09-22 21:32:26 +00:00
Sean Dague 0f5edd663e Fix stdout leakage during opportunistic db tests
The oslo_db base class does not handle proper logging capture. This
inserts the correct capture before we setup those classes to prevent
leakage into the raw stdout stream which makes it confusing to read
test results.

Change-Id: If44c399e29373d2ef6bce6e1df5f96ed2caab462
2016-09-22 16:41:15 -04:00
OpenStack Proposal Bot 2ddcb5829c Updated from global requirements
Change-Id: Ie9882234a54f83a7707c52b25c876b7e5a1b1ab0
2016-09-22 20:30:27 +00:00
Jenkins a25c2b2768 Merge "Add hacking checks for xrange()" 2016-09-22 20:05:11 +00:00
Jenkins adf25115ff Merge "Standardize output capture for nova-manage tests" 2016-09-22 19:59:59 +00:00
Jenkins e7601e5c1c Merge "Work around tests that don't use nova.test as a base" 2016-09-22 19:59:17 +00:00
Jenkins f3854e5d8c Merge "Don't print to stdout when executing hacking checks" 2016-09-22 19:58:35 +00:00
Jenkins aa45044c4c Merge "Remove support for deprecated driver import" 2016-09-22 19:57:53 +00:00
Jenkins 36691e1732 Merge "Make test logging setup fixture disable future setup" 2016-09-22 17:18:37 +00:00
Jenkins 18195811bd Merge "[placement] clean up some nits in the requestlog middleware" 2016-09-22 15:44:59 +00:00
Dan Smith 05304b5c73 Add placeholder DB migrations for Ocata
This adds placeholder migrations for potential backports of database
migrations to newton.

Change-Id: I3ead9c09fb033592f752b26cac7482cefaa5d12b
2016-09-22 07:42:57 -07:00
Dan Smith 15cda7141b Remove PCI parent_addr online migration
This migration was added in mitaka and should have been done either in
mitaka or newton. Newton had some migrations that came after it which
were higher-visibility and should have forced everyone to have done
this by now.

Because of the nature of the migration, there isn't really an easy or
efficient way to validate that they have done this like we have done
for some other migrations.

Change-Id: Idb033e9e52b149372308eabb19c5774e10c56156
2016-09-22 07:42:57 -07:00
Dan Smith 7e71a4e0a2 Make nova-manage online migrations more verbose
This makes the online_data_migrations command for nova-manage a little
more verbose in what it is doing. Each time it is run, it will show you
all the migrations that need running and how many records remain for
each. Basically, you run this until you see all zeroes.

Change-Id: I78c6312ec8e226a6ef9185382b6180f246f8fe84
2016-09-22 07:42:54 -07:00
Jenkins 26e33800b0 Merge "[placement] Manage log and other output in gabbi fixure" 2016-09-22 14:30:49 +00:00
Sean Dague c0addfa07f Standardize output capture for nova-manage tests
The nova-manage tests used a large mix of output capture
techniques. monkey patching sys.stdout inside a test. Doing a direct
symbol replace of sys.stdout. Sometimes doing nothing, which meant the
output was going all the way to the test buffer.

This standardizes a model of doing creating a self.output during class
setup where output is expected, which is fixture monkey patched to
replace sys.stdout. It brings some consistency to the output handling,
as well as removes a large number of leaked through stdout lines that
were confusing in the test output stream.

Change-Id: Iff630e74bb86349c9ed9ae6b85c177948710f7c1
2016-09-22 08:59:25 -04:00
Sean Dague 759dfc0fbd Work around tests that don't use nova.test as a base
The db migration tests use a bunch of setup inside oslo_db that is
only exported as a base test class. This means that none of these do
the standard setup that the rest of the Nova tests do, including
things like logging capture.

Long term, the relationship between nova and oslo_db needs to be fixed
so that these are available as fixtures, not just base class. However,
in the short term we can setup logging correctly before initializing
the rest of the test class to keep these from scrambling the test
output.

Change-Id: I3c663d276cffa6146ac8f45bde7d70f7aece0c89
2016-09-22 08:32:04 -04:00
Sean Dague 15b392a67b Don't print to stdout when executing hacking checks
The way the hacking tests _run_check works, it ends up evaluating
python code in a context where all of our stdout capture has been
undone. The pep8 check_all method *also* prints out the errors found,
not only accumulating them for later. We can patch out the method
doing that to keep this from leaking through the test output, which
only causes confusion.

Change-Id: I9be4801352c4977504d95123d01bcbe309f22347
2016-09-22 08:32:04 -04:00
Jenkins a4d846f439 Merge "[placement] Stringify class and provider uuid in error" 2016-09-22 12:18:36 +00:00
Jenkins 406eac913a Merge "Fix require thread policy for multi-NUMA computes" 2016-09-22 11:56:54 +00:00
Sean Dague dc2f4f88ac Make test logging setup fixture disable future setup
Our logging fixture sets up logging in a way that we need to capture
things during tests. However, some of our tests do things like call
back into main functions, which then call logging setup again, and
unwind everything we're doing (including debug message testing).

This patches out oslo_log setup after the fixture runs, thus ignoring
calls to it in the future. It removes a couple of scary looking stack
traces from the test stream that shouldn't be there.

Change-Id: Ie1b7d4370f20597961a841c5bc0a1ad7cc42b2ef
2016-09-22 07:44:24 -04:00
Jenkins 339f11a4f9 Merge "Fix database poison warnings, part 11" 2016-09-22 11:43:25 +00:00
Jenkins 832e277198 Merge "Fix database poison warnings, part 13" 2016-09-22 11:42:41 +00:00
Jenkins f55ea78680 Merge "Fix database poison warnings, part 10" 2016-09-22 11:42:01 +00:00
Jenkins d18eff38eb Merge "Add missing slash to dir path" 2016-09-22 10:36:24 +00:00
Jenkins 3e0e632463 Merge "trivial: Rewrap guide at 79 characters" 2016-09-22 09:48:05 +00:00
Jenkins f97c16554a Merge "move os_vif.initialize() to nova-compute start" 2016-09-22 09:27:20 +00:00
EdLeafe fe3d6dba3d Remove support for deprecated driver import
Support for specifying the scheduler driver via a full classpath was
deprecated in Mitaka, and with this patch is removed in Ocata.

Change-Id: I72e392aafa886ba19c874f1e0a0c95f6d1757ab9
2016-09-22 09:43:56 +01:00
Stephen Finucane c1dd24062d conf: Add 'deprecated_reason' to osapi opts
This is the standardized way of explaining why an option was removed.
The 'deprecated_group' arguments are also removed as they name the same
group that the option is currently in thus making them superfluous.

Change-Id: I3040441470f0e2f2e53d26b980a0b6a48e41b1ea
Implements: blueprint centralize-config-options-ocata
2016-09-22 09:39:07 +01:00
sonu.kumar 059d257b94 Add hacking checks for xrange()
Partially-Implements: blueprint goal-python35

Change-Id: Iea2e9e5d5782b898ba5b18314745962cc059a213
2016-09-22 04:16:53 +00:00
Luong Anh Tuan 7a204383d5 Using assertIsNone() instead of assertEqual(None)
Following OpenStack Style Guidelines[1]:
http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Unit test assertions tend to give better messages for more specific assertions.
As a result, assertIsNone(...) is preferred over assertEqual(None, ...) and assertIs(..,None)

Change-Id: I8881abed6e7962d1516323725e194937bce1346f
2016-09-22 07:40:57 +07:00
Jenkins 25be3fa02c Merge "Add deprecated_since parameter" 2016-09-21 22:44:50 +00:00
Jenkins 39c31b33cd Merge "Fix invalid exception mock for InvalidNUMANodesNumber" 2016-09-21 20:58:58 +00:00
Sean Dague 735f710ae0 move os_vif.initialize() to nova-compute start
os_vif.initialize() was previously executed during module load. This
means it was entirely possible that it was run before things like
logging were actually set up in the expected way. Move this back into
execution time instead of load time to ensure that logging is actually
setup.

Changes need to be made to tests which make assumptions about os_vif
objects to manually initialize os_vif when it will be used. os_vif
objects can't be created until it is initialized, so some delayed
object creation is also done in test_vif.py.

Closes-Bug: #1615676

Change-Id: I89fe5c5b3d762f3a3238b587685df85d15ee56c4
2016-09-21 16:49:50 -04:00