* 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
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
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
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
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
The type of 'quota_set' is changed to 'object'.
Add a missing response description of DELETE method.
Change-Id: I0a51861c68866303734a1d161b85689e1a3ba636
Closes-Bug: #1653897
There is no 'nova-manage image' subcommand so this removes
it's reference from the man pages.
Change-Id: Ia918006d58c8d7536c37187c37b8004c6f7d3aac
Closes-Bug: #1656686
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
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
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
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
A section for placement_dev.rst describing how to manage
microversions, including available utility methods.
Change-Id: I8ace96ed7fd721c547cedf5285833a8baa52a70a
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
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
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
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
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
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