Commit Graph

44752 Commits

Author SHA1 Message Date
Dina Belova ecc8de8d6c Integrate OSProfiler and Nova
* Add osprofiler wsgi middleware. This middleware is used for 2 things:
  1) It checks that person who want to trace is trusted and knows
     secret HMAC key.
  2) It starts tracing in case of proper trace headers
     and adds the first wsgi trace point with info about the HTTP request

* Add initialization of osprofiler on start of a service
  Currently that includes oslo.messaging notifier instance creation
  to send Ceilometer backend notifications.

oslo-spec: https://review.openstack.org/#/c/103825/
python-novaclient change: https://review.openstack.org/#/c/254699/
based on: https://review.openstack.org/#/c/105096/

Co-Authored-By: Boris Pavlovic <boris@pavlovic.me>
Co-Authored-By: Munoz, Obed N <obed.n.munoz@intel.com>
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Co-Authored-By: Tovin Seven <vinhnt@vn.fujitsu.com>

Implements: blueprint osprofiler-support-in-nova
Change-Id: I82d2badc8c1fcec27c3fce7c3c20e0f3b76414f1
2017-01-18 15:00:14 +07:00
Jenkins 045f08ab8a Merge "placement: validate member_of values are uuids" 2017-01-18 04:28:31 +00:00
Jenkins d720cea319 Merge "Add service_token for nova-neutron interaction" 2017-01-18 02:24:40 +00:00
Jenkins 1a487f35d0 Merge "Updated from global requirements" 2017-01-17 19:04:29 +00:00
Jenkins d6861ff5aa Merge "Remove nova-manage image from man pages" 2017-01-17 17:44:38 +00:00
Jenkins 84a527c171 Merge "Fix class type error in attach_interface() function" 2017-01-17 15:24:57 +00:00
Jenkins 658ade3aca Merge "Add some cellsv2 setup docs" 2017-01-17 01:50:25 +00:00
Jenkins 099e0be427 Merge "Fix the generated cell0 default database name" 2017-01-17 01:49:59 +00:00
OpenStack Proposal Bot 209a42dae2 Updated from global requirements
Change-Id: I5da442a0b03f0a7fbb92aea3bf79c9d881d30719
2017-01-17 01:13:35 +00:00
Jenkins 098c4e8ca6 Merge "Create HostMappingList object" 2017-01-17 01:01:58 +00:00
Dan Smith db79c53090 Add some cellsv2 setup docs
Change-Id: If0d4e435a5c687492d7d820031a3a0261e29d2ee
2017-01-16 17:03:10 -05:00
Dan Smith 5b44737e0c Fix the generated cell0 default database name
This makes the default database name for cell0 be based on the
main database name, not the api one. Before this, we would get
a database name of nova_api_cell0 by default, intead of nova_cell0.
This was confusing because cell0 has "main" schema inside, not "api"
schema.

Closes-Bug: #1656673
Change-Id: I86797785f76c2c927a4db8fef72b8f8d986af6b9
2017-01-16 17:02:59 -05:00
Jenkins a287c5f2b9 Merge "Add nova-manage cell_v2 list_cells command" 2017-01-16 21:38:18 +00:00
Jenkins 7cb416546a Merge "Add nova-manage cell_v2 create_cell command" 2017-01-16 20:09:22 +00:00
Jenkins 5ddd68727d Merge "Stop using mox stubs in test_attach_interfaces.py" 2017-01-16 20:03:07 +00:00
Jenkins 855ab895f3 Merge "Remove mox from api/openstack/compute/test_extended_hypervisors.py" 2017-01-16 19:12:18 +00:00
Jenkins f24af190e7 Merge "Remove redundant arg check in nova-manage cell_v2 verify_instance" 2017-01-16 18:30:58 +00:00
Jenkins 810c8a0545 Merge "Make metadata server know about cell mappings" 2017-01-16 18:08:04 +00:00
Matt Riedemann 8677aca654 Create HostMappingList object
This creates the HostMappingList object which will provide
a way to list HostMappings by a given CellMapping.id. This
is going to be used later in a "nova-manage cell_v2 delete_cell"
command.

Change-Id: I58e0c5565013d8ef9753a9566841e83573a85afd
Related-Bug: #1656691
2017-01-16 12:04:21 -05:00
Matt Riedemann 4bfc550261 Add nova-manage cell_v2 list_cells command
We have some commands which create cells and some commands
which take a cell uuid as an argument but don't have a way
to list cells, so this adds a command to do that.

Change-Id: I0f79e8c16c41ed45f9f59c20644511c7f130cdf9
Closes-Bug: #1656675
2017-01-16 12:03:36 -05:00
Andrey Volkov f7e9f312a0 Add nova-manage cell_v2 create_cell command
Currently, all of the commands that create a new cell require the
presence of compute hosts, else they won't create a cell mapping.
In the use case of a fresh install, it's reasonable that compute
host records may not yet exist at the time of cells v2 setup.

This provides a way for operators to create a new empty cell at
setup time and defer adding hosts to the cell until they have
started their compute hosts later (via the 'discover_hosts'
command).

The command optionally accepts a database connection url and
message queue transport url, else it will take the values from
the nova.conf. It returns the uuid of the newly created cell.

Change-Id: I2fd7d854ffa579e550f6002cfb7223d7f40acac6
Related-Bug: #1656276
2017-01-16 11:44:31 -05:00
Jenkins 9008f6d561 Merge "Fixes to get all functional tests working on py35" 2017-01-16 16:35:19 +00:00
Jenkins 7e0edc6710 Merge "api-ref: Fix parameters and response in os-quota-sets.inc" 2017-01-16 15:02:27 +00:00
Jenkins cee14139bd Merge "Enable TestOSAPIFixture.test_responds_to_version on Python 3" 2017-01-16 03:14:45 +00:00
Jenkins 46b8cdfd00 Merge "Fix missing RP generation update" 2017-01-16 00:40:25 +00:00
Takashi NATSUME 69f27a7ced api-ref: Fix parameters and response in os-quota-sets.inc
The type of 'quota_set' is changed to 'object'.
Add a missing response description of DELETE method.

Change-Id: I0a51861c68866303734a1d161b85689e1a3ba636
Closes-Bug: #1653897
2017-01-16 00:12:20 +00:00
Jenkins bb63560a5f Merge "[placement] Add a bit about extraction plans to placement_dev" 2017-01-15 20:59:41 +00:00
Jenkins aeb83e7bb0 Merge "[placement] Add an "Adding a Handler" section to placement_dev" 2017-01-15 20:46:52 +00:00
Jenkins 210b926536 Merge "[placement] placement_dev info for testing and gabbi" 2017-01-15 20:43:23 +00:00
Matt Riedemann e88c0bbb79 Remove nova-manage image from man pages
There is no 'nova-manage image' subcommand so this removes
it's reference from the man pages.

Change-Id: Ia918006d58c8d7536c37187c37b8004c6f7d3aac
Closes-Bug: #1656686
2017-01-15 14:17:10 -05:00
OpenStack Proposal Bot 3f0b023825 Updated from global requirements
Change-Id: I0df44a42a2484b1394c45f0173dfbe13300a1851
2017-01-15 09:25:44 +00:00
Jenkins f7456a8838 Merge "rt: explicitly pass compute node to _update()" 2017-01-14 18:09:46 +00:00
Davanum Srinivas c78a86c558 Fixes to get all functional tests working on py35
tests-functional-py3.txt:
* Remove all tests except snowman from blacklist
* snowman seems to be a gabbi problem under py35

nova/objects/resource_provider.py:
* Cannot compare None and integer under py35
* wrap keys() in a list before comparing to a list as
  keys() is an iterator

nova/virt/fake.py:
* list_instance_uuids should return a list, keys() returns
    an iterator.

nova/tests/functional/api_sample_tests/*.py:
* use response.text to compare with a string as response.context
  contains bytes under python3
* user_data should be strings not bytes, so convert them
  as necessary

nova/tests/functional/regressions/test_bug_1554631.py:
* cinder exceptions need the http code as the first parameter
  (not a string)
* use response.text to compare with a string as response.context
  contains bytes under python3

nova/tests/functional/test_servers.py:
* zlib.compress needs bytes

Change-Id: I73be94afbb02dac46467555a8469f222a69025da
2017-01-14 13:06:56 -05:00
Jenkins 1b4d21180b Merge "Updated from global requirements" 2017-01-14 17:42:13 +00:00
Chris Dent 9dd48cf4c8 [placement] Add a bit about extraction plans to placement_dev
While we've not made any immediate plans to do the extraction we
should avoid adding complexity that would make it harder later, so
this new section discusses the plan to eventually extract, and the
structures that either help or hinder this.

Change-Id: Ia3e95e4b85aa768b8f94d4a99963c7ec719b8a13
2017-01-14 10:55:21 -05:00
Chris Dent 88a456b189 [placement] Add an "Adding a Handler" section to placement_dev
The section gives an overview of the steps required to add a new
handler to the placement API and the usual expectations of those
steps.

Change-Id: I41e8e413c30c44f3b6f6b1a8b559f0d39d793f68
2017-01-14 10:55:21 -05:00
Chris Dent 4aae9d5862 [placement] placement_dev info for testing and gabbi
Add a section to placement_dev.rst explaining how testing of the
placement API works, mostly gabbi. The idea here is not to duplicate
the gabbi docs, but to provide some context on how the use of gabbi
fits in to the existing tests and how to add more, with links off to
the docs for a bit more info.

Change-Id: If99521881a017543acdbbf7e8f1b7f170f5d633d
2017-01-14 10:55:20 -05:00
Chris Dent 2d0dfc632f [placement] placement_dev info for microversion handling
A section for placement_dev.rst describing how to manage
microversions, including available utility methods.

Change-Id: I8ace96ed7fd721c547cedf5285833a8baa52a70a
2017-01-14 10:55:15 -05:00
OpenStack Proposal Bot eb7c7365bb Updated from global requirements
Change-Id: I70b17e0384af760e761b1e54b177354b380f54c9
2017-01-14 14:47:03 +00:00
Jenkins db203ffe62 Merge "[py35] Fixes to get rally scenarios working" 2017-01-14 05:05:30 +00:00
Jenkins cdeb88431a Merge "Expose a REST API for a specific list of RPs" 2017-01-14 05:04:31 +00:00
Matt Riedemann c17772e1f2 placement: validate member_of values are uuids
The 1.3 microversion adds the member_of query parameter
for listing resource providers which are members of
one or more aggregates based on the aggregate uuids. However
the REST API handler code is simply parsing and passing the
member_of values through to the object code which is doing a
SQL IN statement which will result in no resource providers if
an invalidate aggregate uuid is provided, i.e. not actually a
uuid.

This patch adds simple uuid validation to the handler code
that's parsing the member_of query parameter.

Change-Id: I912f731e0d75979aea0a0f22c15e6cfb84a95050
Closes-Bug: #1656482
2017-01-13 21:47:52 -05:00
Dan Smith 4590308581 Make metadata server know about cell mappings
This will make the metadata api server look up instance mappings and
target the appropriate cell when looking up the instance. This is
required if you have a global api for metadata.

Change-Id: I226bf54c70c8d1fbc8b8e3d2c9c6825ca485ee26
Depends-On: I3c9101a34b2bb0804fc4deda62dbb8637e7b8f94
2017-01-13 17:43:20 -08:00
Matt Riedemann a649311af7 Remove redundant arg check in nova-manage cell_v2 verify_instance
argparse will validate that the --uuid is provided, we don't need
an explicit manual check for that in the code, plus the manual
check was violating the --quiet option by printing out an error
message anyway.

This also removes the unit test which we don't really need as
argparse is going to do it's job.

Change-Id: Id1cb79c9be8ff6b94f5a7fcab99e960ad774ceac
Closes-Bug: #1656479
2017-01-13 20:42:11 -05:00
Sylvain Bauza a5dc7f1a11 Expose a REST API for a specific list of RPs
Now that we merged the object method for getting the list of ResourceProviders
based on a specific amount request, we need to expose that method into a REST
API call so that the scheduler client could be calling it.

Co-Authored-By: Jay Pipes <jaypipes@gmail.com>

Change-Id: Ia8b534d20c064eb3a767f95ca22814925acfaa77
Implements: blueprint resource-providers-get-by-request
2017-01-13 17:57:29 -05:00
Diana Clarke a04ffdc940 copy pasta error
This test means to test the 'detail' controller method, not the 'index'
controller method.

Change-Id: I1b922c1c66121182c5203d6ca719abe7056a0785
2017-01-13 16:16:10 -05:00
Jenkins 31774fa228 Merge "Don't bypass cellsv1 replication if cellsv2 maps are in place" 2017-01-13 19:22:44 +00:00
Davanum Srinivas 584969aff1 [py35] Fixes to get rally scenarios working
Get nova.boot_server, nova.attach_volume, nova.detach_volume and
nova.delete_server working. Please see the following cinder review
for the experiment (see gate-rally-dsvm-py35-cinder-nv):
Id78b136ad15ac77717711ebcbb671c2f1dd3a10c

nova/api/openstack/placement/handlers:
* make sure we convert to bytes before we set the response.body

nova/tests/functional/db/api/test_migrations.py:
* range is an iterator and must be converted to a list

nova/tests/unit/virt/libvirt/test_driver.py:
nova/tests/unit/virt/libvirt/test_fakelibvirt.py:
nova/virt/libvirt/config.py:
nova/virt/libvirt/guest.py:
nova/virt/libvirt/host.py:
* libvirt API expects strings, some of the code paths ended up
  being bytes, so convert them to strings before calling libvirt

Finally, eliminated the tests that now started to pass from
tests-functional-py3.txt

Change-Id: Ib721442e9d83a3b9a7fe597f3886430449a9e684
2017-01-13 15:44:00 +00:00
EdLeafe ac01ba559d Fix missing RP generation update
Most of the methods that increase the generation for a resource provider
also update the value of generation in the object that calls it, but
there was one place where it was missing. This patch fixes that
omission.

Closes-Bug: #1655761

Change-Id: Ic237c4b3456ee9887c022d562b53b675763bafda
2017-01-13 13:55:30 +00:00
Jenkins 3ec43d81c3 Merge "libvirt: make live migration possible with Virtuozzo" 2017-01-13 12:01:26 +00:00