Commit Graph

44645 Commits

Author SHA1 Message Date
Huan Xie 062065ca9e XenAPI Use os-xenapi lib for nova
XenServer has released os-xenapi lib on pypi, this patch is to
use os-xenapi in nova project. In this patch, we only change
the usage of XenAPI to os-xenapi and fix unit tests. In the next
patch, we will delete those unused files.

Partially-Implements: blueprint add-os-xenapi-library

Depends-On: Ic327135b893a77672fd42af919f47f181e932773

Change-Id: I424dfcd507c4b7fbeea5245cc1c234dec01d5781
2017-01-10 17:26:23 -08:00
Jenkins 8e3e9f6d2d Merge "Remove unnecessary attrs from TenantNetworksDeprecationTest" 2017-01-11 00:08:41 +00:00
Jenkins f5d7ea52c6 Merge "move gate hooks to gate/" 2017-01-10 20:08:49 +00:00
Jenkins 379e41f653 Merge "cors: update default configuration in config" 2017-01-10 19:59:50 +00:00
Jenkins da25ec9f7a Merge "Create schema generation for NetworkModel" 2017-01-10 17:29:58 +00:00
Jenkins 6cf6a4ebbb Merge "[placement] fix typo in call to create auth middleware" 2017-01-10 17:25:51 +00:00
Jenkins da54487eda Merge "Port xenapi test_vm_utils to Python 3" 2017-01-10 06:10:24 +00:00
Jenkins 778b1428ff Merge "Move FlavorPayload to a seperate file" 2017-01-10 03:10:35 +00:00
Jenkins ab46ebe03d Merge "libvirt: remove hack for dom.vcpus() returning None" 2017-01-09 20:14:57 +00:00
Jenkins 9bb494fcce Merge "Add missing CLI commands in support-matrix.ini" 2017-01-09 17:06:41 +00:00
Jenkins b1ee1db0be Merge "Trivial indentation fix" 2017-01-09 17:01:52 +00:00
Jenkins f55815b2f9 Merge "libvirt: Stop misusing NovaException" 2017-01-09 01:12:54 +00:00
Jenkins fbae5f37e0 Merge "libvirt: Flatten 'get_domain' function" 2017-01-08 10:03:39 +00:00
ChangBo Guo(gcb) d631ac0c97 Port xenapi test_vm_utils to Python 3
* we can't compare str and int in Python 3, and code make sure
  product_version must be a tuple of 3 integers[1], so we can remove
  invalid tests.

* Set correct exception type to catch

[1]https://github.com/openstack/nova/blob/3304115b73ace6b3336c4f80f70de4661d3b1ef6/nova/virt/xenapi/client/session.py#L173

Partially-Implements: blueprint goal-python35

Change-Id: I0ba1e1f2ef37ade9bdc6d19066e4a33a07246416
2017-01-08 11:39:14 +08:00
Jenkins 939000938b Merge "Make the SingleCellSimple fixture a little more comprehensive" 2017-01-08 03:23:58 +00:00
Jenkins 6d66295a0b Merge "Port libvirt.test_vif to Python 3" 2017-01-07 20:52:36 +00:00
Jenkins 3130b1cec0 Merge "Don't translate exceptions w/ no message" 2017-01-07 07:57:34 +00:00
Jenkins 9b918199d8 Merge "Return uuid attribute for aggregates" 2017-01-07 05:12:18 +00:00
Jenkins b868d682ba Merge "Fix TypeError in _update_from_compute_node race" 2017-01-07 00:47:20 +00:00
Jenkins a96ffd5a7c Merge "Fix non-parameterized service id in hypervisors sample tests" 2017-01-06 20:29:21 +00:00
Dan Smith 0e2b3bab7b Make the SingleCellSimple fixture a little more comprehensive
This also mocks out CellMapping.get_by_uuid() as well as the hostmapping
to fool the compute api changes (and any others) that come later.

Change-Id: Id94c0ed0913d0ce6d8ff598c670af4da0e58e968
2017-01-06 11:39:28 -08:00
Jenkins cf6592df3c Merge "Add support matrix for attach and detach interfaces" 2017-01-06 17:55:47 +00:00
Jenkins 941dd78a33 Merge "Port libvirt.test_firewall to Python 3" 2017-01-06 17:54:59 +00:00
Jenkins 9c5c06e231 Merge "HTTP interface for resource providers by aggregates" 2017-01-06 17:50:00 +00:00
Jenkins 95fd12b053 Merge "Fix ksa mocking in test_cinderclient_unsupported_v1" 2017-01-06 17:49:21 +00:00
Jenkins f98006f8a4 Merge "correct misleading wording" 2017-01-06 17:48:23 +00:00
Jenkins a5a94cefb5 Merge "Move quota options to a config group." 2017-01-06 17:47:34 +00:00
Dan Smith cf1d3f8792 Fix non-parameterized service id in hypervisors sample tests
The hypervisors sample tests hard code the service id in the templates,
which can vary (and will in a subsequent patch). This makes it parameterized
so that it doesn't obsess over the actual value.

Change-Id: I28ae3eb14aa1630deaf6f943c9ad78dc3c36c7b3
2017-01-06 09:32:50 -08:00
Matt Riedemann 2f1245a56c Fix TypeError in _update_from_compute_node race
A compute node record is created in the database from the
_init_compute_node method in the resource tracker in the
nova-compute service. It is created without the updated_at
or free_disk_gb fields being set.

Shortly after it's created, update_resource_stats() is called
on the scheduler report client which calls compute_node.save()
which calls the update_compute_node() method in the DB API which
*always* updates the updated_at field even if nothing else
was changed.

So at this point, we have a compute node with updated_at set
but not free_disk_gb. The free_disk_gb field gets set by the
_update_usage_from_instances() method in the resource tracker
and then that value is later saved off when the compute node
is updated in the database on a second call to the
update_resource_stats() method in the scheduler report client.
At that point the free_disk_gb field is set on the compute
node record.

There is a race in between the compute node create and initial
update but before free_disk_gb is set where the scheduler host
manager can be attempting to update the HostState object from
the same compute node when selecting host destinations during
a server build. If that picks up the compute node before its
free_disk_gb field is set it will result in a TypeError when
trying to multiply None * 1024.

Change 36a0ba9c81 was an earlier
attempt at fixing this bug and shortened the race window but
didn't handle the problem where updated_at is set but free_disk_gb
is not yet.

This change builds on that by simply checking for the thing
the scheduler host manager actually cares about, which is the
free_disk_gb field.

Closes-Bug: #1654102
Closes-Bug: #1610679

Change-Id: I37b75dabb3ea7ec2d5678550d9aff30b1a0c29e6
2017-01-06 17:15:49 +00:00
EdLeafe be2893ee58 Trivial indentation fix
This fixes one of those cases where "visual" indentation results in
legal, but very ugly Python, as it makes the continued line indented to
the same level as the block below it. Indentation has semantic meaning
in Python, so two adjacent lines in different blocks should never be
indented to the same level.

Change-Id: I6014980d3aebcac60979852f6d571146d7b47042
2017-01-06 15:29:38 +00:00
Samantha Blanco dda01c52c3 Add missing CLI commands in support-matrix.ini
Change-Id: I2b41ba44385eb398605390b65bfdf09e22cbeeb5
Partial-Bug:#1653731
2017-01-06 10:24:29 -05:00
jichenjc e4ae7e91dc correct misleading wording
this schema tells us host is required
https://github.com/openstack/nova/blob/master/nova/api/
openstack/compute/schemas/migrate_server.py#L33
and also param say it's required, but the doc says 'if you omit'
will misleading user ,actually, user can't omit it, they need
to input null to let scheduler decide

Implements: blueprint api-ref-in-rst-ocata

Change-Id: I2661c85f32eff8e199856635a4c40a494a5decb6
2017-01-06 14:38:40 +00:00
Jenkins 45f14c2018 Merge "conf: remove deprecated barbican options" 2017-01-06 13:53:16 +00:00
Jenkins 0c22c571e2 Merge "api-ref: microversion 2.40 overview" 2017-01-06 13:20:10 +00:00
Jenkins d5746bf57a Merge "pci: Clarify SR-IOV ports vs direct passthrough ports" 2017-01-06 13:19:31 +00:00
Jenkins 573a1f9e59 Merge "Add support for setting boot order in Hyper-V" 2017-01-06 13:18:51 +00:00
Jenkins 7083017ab9 Merge "Missing usage next links in api-ref" 2017-01-06 13:11:26 +00:00
Jenkins 09af5c83d3 Merge "fakelibvirt: Remove unused functions" 2017-01-06 13:10:37 +00:00
poojajadhav 28fe229a6f Don't translate exceptions w/ no message
These messages only contain variable references,
so there is nothing to translate.

Trivial Fix

Change-Id: I38ef82f0fa846d3b23f6a6ebb1ab9a1fa69e300d
2017-01-06 12:02:20 +05:30
Jenkins b2f16d9940 Merge "api-ref: use the examples with paging links" 2017-01-06 02:01:26 +00:00
Jenkins 407ecffcd3 Merge "Update docstring of _schema_validation_helper" 2017-01-06 02:00:47 +00:00
Matt Riedemann 5593049ace Fix ksa mocking in test_cinderclient_unsupported_v1
This test was previously mocking the keystoneauth1
loading code globally which was getting randomly
trampled by other tests that were mocking the
same thing.

This changes the scope on the mock so it should be
isolated from other tests mocking out the same thing.

Change-Id: Id6c35c583edf0938b5d0178ab2cfb54277f0225f
Closes-Bug: #1654393
2017-01-05 19:52:10 -05:00
Jenkins 120bdee552 Merge "Handle Unauthorized exception in report client's safe_connect()" 2017-01-05 22:28:03 +00:00
Jenkins 2479f51bf3 Merge "Actually test online flavor migrations" 2017-01-05 21:57:11 +00:00
Jenkins 289484df27 Merge "Add aggregate notification related enum values" 2017-01-05 21:55:49 +00:00
Jenkins 75a4869a84 Merge "Remove Rules.load_json warning" 2017-01-05 20:54:25 +00:00
Chris Dent aeecfe09c4 [placement] fix typo in call to create auth middleware
The typo meant that the intended non global config was not being
used, and instead the config was loaded in the normal way. This
worked because the config loaded by the project name is the same
as the config loaded otherwise.

There's no test coverage of this in unit and functional tests
because the NoAuthMiddleware is always used based on overridden
configuration. The gate tests that turn on placement will exercise
this code.

Change-Id: I9f1b8905fd9d5aadac61718e24c76b1b2f80410d
Closes-Bug: #1645306
2017-01-05 20:34:17 +00:00
Chris Dent ea5d0576cc HTTP interface for resource providers by aggregates
In a new 1.3 microversion, the GET /resource_providers handler gains
support for a new query parameter 'member_of' which takes a value of
'in:' and a comma separated list of aggregate uuids, or a single
aggregate uuid.

The response is the list of resource providers that are associated
with any of those aggregates, or an empty list if there are none.

If in an old microversion, the query parameter is not accepted and a
400 is returned.

Change-Id: I82fc2003ce85dcadfecfea506e7d4adb47258c7a
2017-01-05 20:26:18 +00:00
Jenkins 9c2308424e Merge "api-ref: add notes about POST/DELETE errors for os-tenant-networks" 2017-01-05 20:17:30 +00:00
Jay Pipes 03c2776e49 Return uuid attribute for aggregates
Adds a Compute API microversion that triggers returning an aggregate's UUID
field. This field is necessary for scripts that must populate the placement API
with resource provider to aggregate relationships, which rely on UUIDs for
global identification.

APIImpact
blueprint: return-uuid-from-os-aggregates-api
Change-Id: I4112ccd508eb85403933fec8b52efd468e866772
Closes-bug: #1652642
2017-01-05 14:32:43 -05:00