Add file to the reno documentation build to show release notes for
stable/2024.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.
Sem-Ver: feature
Change-Id: Iaaf00db2aeb3be44ed2abdd6f494465facea365d
The current implementation of enforcement exceptions
during lease creation and update transitions the lease into an error
state, which is undesirable.This update introduces non-fatal handling
for the following enforcement exceptions:
- MaxLeaseDurationException
- ExternalServiceFilterException
Now, these exceptions will not cause the lease status to be
updated to an error state, allowing smoother lease management.
Test Plan:
PASS: Verify behavior for lease creation with non-fatal
enforcement exceptions
PASS: Verify behavior for lease update with non-fatal
enforcement exceptions
PASS: Confirm consistent lease status for non-fatal exceptions
Negative Testing:
PASS: Ensure that lease status remains unaffected for
non-fatal exceptions
PASS: Validate expected outcomes for various enforcement scenarios
Change-Id: I5d807d33e07d80f69f9734735c11e8d801bf5cde
Adds the new config option ``cafile``, which is passed into the
Session invocations for SSL verification.
Partial-Bug: #2045281
Change-Id: I2ec5bc7ac929534175d380d2e3e535a5e7abd962
Add file to the reno documentation build to show release notes for
stable/2023.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.
Sem-Ver: feature
Change-Id: I0cc06001ef8cae5d9abf153c8a705aa5250ac765
Add file to the reno documentation build to show release notes for
stable/2023.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.
Sem-Ver: feature
Change-Id: I64523195b78562f70bb4a98ed908b29164ad7c21
In the event that a given physical node has reliability issues, it can
be difficult for users to "get around" the problem because we currently
deterministically pick the first node from the list of nodes available.
Adding randomness to this process helps spread the probability that a
given lease will nab a node that has issues (but has not yet been
identified as such.)
Co-Authored-By: Matt Crees <mattc@stackhpc.com>
Change-Id: I0f0ddb14ed5d21f0ccc5c9659c821d58cea5cbde
Add file to the reno documentation build to show release notes for
stable/zed.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.
Sem-Ver: feature
Change-Id: Ic64eb1aa7cc764cf025cfa281a9df183e31daa68
Co-Authored-By: Jacob Colleran <jakecoll@uchicago.edu>
Co-Authored-By: Jason Anderson <jasonanderson@uchicago.edu>
Co-Authored-By: Pierre Riteau <pierre@stackhpc.com>
Change-Id: I0728f556829ba84e222c27bd8c407738b4be2f76
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Removing the py36 centos8 job as well as
updating the python classifier also to reflect the same.
[1] https://governance.openstack.org/tc/reference/runtimes/zed.html
Change-Id: I6c31cc6ab8c58f77216d869dbbcd6c68bec09b7e
Add file to the reno documentation build to show release notes for
stable/yoga.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.
Sem-Ver: feature
Change-Id: I100f1b72f754df48aaa2446de7ec00a35956139e
This allows users to query for resource properties of hosts,
allowing them to be used in creating leases more effectively. Two new
API endpoints are added for hosts, ``/properties`` and
``/properties/<property_name>``, which allow for listing available
properties, and updating a property respectively. Properties can be
listed with detail, showing possible values and visibility. Admins can
list public and private properties.
A new database table is added ``resource_properties``, which stores
property names and resource types. Resource specific property tables
(e.g. ``computehost_extra_capabilities``) entries store a foreign key to
``resource_properties``, rather than the capability name.
Implements blueprint resource-properties-discovery-api
Change-Id: Ib9f1140c44c5e4fbef6e019c48a842869368cb21
This commit makes endpoint types configurable and uses the internal
endpoint as default for Blazar, except admin for reaching keystone to
keep legacy behaviour for now.
Update devstack configuration to use public endpoints, since internal
endpoints are not created by devstack anymore (except for keystone).
Change-Id: I6414be91a1b629df680641050cfd415252b0a3c5
Closes-Bug: #1960335
If a lease update raises an exception that is recoverable (such as
specifying an invalid date range) the lease would be set to ERROR
status. Other cases with wrong input have similar effects.
This change allows for non fatal exceptions to be specified in
the lease status code. If one is raised, the lease is restored
to the original status.
Closes-Bug: #1786031
Change-Id: I73df4587d223dc4582cb15e0f4cb8de1a02ffee7
This change modifies the DB utility to fetch reservation allocations so
that a list of reservations is returned with host_ids as an attribute to
each reservation.
This allows the host plugin to include more information when listing
allocations, namely start and end dates. This can be used to see when
resources are available, and for the creation of a reservation calendar
(blueprint calendar-view).
Change-Id: I464898bdeda6b55a028c8a14a54eb137c92a83c1
The get_reservation_allocations_by_host_ids function builds an
allocation dictionary that looks like this:
allocations = {
'r1': ['host1'],
'r2': ['host1', 'host2']
}
The list returned by this function was only using the first host of each
reservation:
allocations[r['id']][0]
Loop over hosts to build the list of (reservation, lease, host) tuples.
Change-Id: I55b3cb4e736f6f747c8b3254c62fa40bac3f288f
Closes-Bug: #1958307
The oslo context library has built-in mechanisms to deserialize a
context object from a set of headers; Blazar's built in extension of the
context class was ignoring several possibly-important pieces of
information, notably the Keystone domain name.
To fix, this removes much of the custom logic in the BlazarContext and
keeps only the two important bits:
1. A stack of contexts is maintained to allow for nested operations w/
different sets of credentials
2. The service_catalog is preserved. It's unclear if this is really
needed long-term, but some code still relies on it. Also unclear why
the oslo context doesn't include this when parsing headers.
Support for multiple domains is included as part of this changeset.
Before, it was assumed that all users (admins and project users) were
part of the default domain.
Closes-Bug: #1881162
Change-Id: I75fcd97cf7a53d17c909620fcf41a8b5a3699dfa
The usage enforcement framework is currently included in both Xena and
Wallaby release notes. Update Xena configuration to ignore it.
Change-Id: I2bf9b85b19df211ae53e9453ccb999c34ce4f24c
Add file to the reno documentation build to show release notes for
stable/xena.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.
Sem-Ver: feature
Change-Id: I0df58ad0f20b91a8a2f02718e211b3b75b5fba1a
Add file to the reno documentation build to show release notes for
stable/wallaby.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.
Sem-Ver: feature
Change-Id: I3abd87790e34e4549917705ae1c2f5e92363575a
Implements filter-based architecture for usage enforcement.
One filter is initially included: MaxLeaseDurationFilter allows
operators to define the maximum duration of a lease in seconds. All
filters must be enabled and configured in the [enforcement] group of
blazar.conf.
When ending a lease, the allocations currently associated with the
reservations of the lease are sent to the enforcement layer for
processing. This works fine when deleting a lease, but when a lease
naturally ends, that is, when the current time is greater than the
lease's recorded end time, the allocation lookup returns 0 results
because we have a filter on the time of the lease/reservation by
default, which starts from datetime.now. This is really not what we want
to do when explicitly filtering on a lease/reservation, so this updates
the generic query function to not apply this filtering in this case.
It turns out, it was possible for usage enforcement's on_end hook to run
multiple times if the first reservation teardown failed. In this
circumstance, the end_lease event would be IN_PROGRESS but the
reservations would be in an error state. The code only checks if any
reservation is DELETED before trying to run on_end again.
To fix this, only try to run on_end if we detected that there was an
UNDONE end_lease event; that's the only time in which we'll actually be
responsible for running this logic.
This also updates the delete logic to be a bit more consistent with the
internal way we track states. It is not enough to check dates, because
it could be that Blazar never got around to actually starting the
leases; we should be checking events. This also makes the logic a bit
easier to understand.
Change-Id: Ic106bee4fc3f5c401c4f8d8ecb1c4e735560bcc2
Co-Authored-By: Jason Anderson <jasonanderson@uchicago.edu>
Co-Authored-By: Pierre Riteau <pierre@stackhpc.com>
Implements: blueprint flexible-reservation-usage-enforcement
As per the community goal of migrating the policy file format from JSON
to YAML [1], we need to do two things:
1. Change the default value of '[oslo_policy] policy_file' config option
from 'policy.json' to 'policy.yaml' with upgrade checks.
2. Deprecate the JSON formatted policy file on the project side via
warning in documentation and release notes.
[1] https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html
Change-Id: I9ca5459a6968d93dee1bf24b3e0012a4cc7020b5
The `name` keyword argument for Operations.alter_column() has been
deprecated since version 0.8. It was finally removed in Alembic 1.5.0,
causing the following error during installation of Blazar:
TypeError: alter_column() got multiple values for keyword argument 'name'
Change-Id: I05541da4d87575f65d8e78f0fc54bd415328b9f2
Closes-Bug: #1912502
Add file to the reno documentation build to show release notes for
stable/victoria.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.
Change-Id: Ibce320ad948c113c2afc513a2f7fe5ee77c769a3
Sem-Ver: feature
1. Nova AZ returns hosts as service hosts as opposed to hypervisor
hostnames
2. Handle case where a Nova AZ has no hosts
Change-Id: If6f6cf21170e95c58dd8a0a1b41b9b5f4797a627
Closes-Bug: #1880646
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: Ib2fc9304a6db9f01eb6d0eb82363906fd322612f
Add file to the reno documentation build to show release notes for
stable/ussuri.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.
Change-Id: Ie52668228b9f16f62b2e4fa37558c78da47b6629
Sem-Ver: feature
If an aggregate fails to be created for some reason, for example because
the requested node is not in the freepool, some cleanup occurs. Part of
the cleanup is ensuring the target node is moved _back_ to the freepool.
This should theoretically "heal" cases where the node wasn't in the
freepool but also wasn't in some lease aggregate.
However, this call to Nova's API refers to the freepool aggregate by its
name, which is not supported here: the ID must be used[1]. This caused
this operation to fail and raise a NotFound, confusingly (because Nova
couldn't find an aggregate with ID='freepool' for example.)
[1]:
https://docs.openstack.org/api-ref/compute/?expanded=add-host-detail#add-host
Closes-Bug: #1847821
Change-Id: I7af4d407b183578617131f0de42becb3dc2bc415
The release notes for version 3.0.0 were displayed both on the Stein and
Train pages. Use earliest-version to hide them from the Train page.
Change-Id: I248430a9407d1944ae05ba2352b370862ef4e0e0
Add file to the reno documentation build to show release notes for
stable/train.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.
Change-Id: Ief70dd33d7b3dd955a892f4e3775ff1a6235fa8a
Sem-Ver: feature
The update reservation functionality was not implemented in the original
plugin. Consequently, any mixed resource lease containing a floating IP
resource would fail when the lease was updated.
Co-Authored-By: Jacob Colleran <jakecoll@uchicago.edu>
Change-Id: I2f55f33ba5af9d9f2b84b716caaa8ed1cfd0db66
This patch adds microversion support so that it is possible to make
minor changes to the APIs as required to fix Launchpad bug #1740091.
Change-Id: I7ea48be72897a77fc8424a57f4ce2d4798daf4eb
Related-Bug: #1740091
This patch adds global_request_id to the constructor for nova client,
keystone client, neutron client and placement client which will pass the
global_request_id to these respective services on all API calls.
Supporting global_request_id makes debugging easier when requests reach
many different OpenStack services. The blazar global_request_id will be
sent to these services in the request header like below and it will be
available with context.global_request_id:
-H "X-OpenStack-Request-ID: req-1a9b7b24-02ed-4400-bcc3-cc1bcbb59147"
Sample log output of neutron service for ``POST v1/floatingips`` API
which logs global request ID `req-e19f8f4f-40e7-441e-b776-7b43ed15c7dd`
is shown at: http://paste.openstack.org/show/753807
Oslo spec I65de8261746b25d45e105394f4eeb95b9cb3bd42
Change-Id: I5bb3631c4fb178293ee8eefbe1aa8b819a196a9f
'x-openstack-request-id' is the common header name for request ID
which is implemented in most of the OpenStack services. Using the
oslo middleware `request_id` middleware is a convenient way to
generate request ID and also include it in the response.
The request ID will be generated by the oslo middleware and is
inserted into the request environment. On the response end, the
middleware is again used, this time to attach the
'x-openstack-request-id' header, using the value of the generated
request ID.
Sample log output of blazar-api service for ``GET v1/os-hosts`` API
which logs local request ID `req-de45521c-2a04-4e7d-809a-960e782eb1e7`
is shown below:
http://paste.openstack.org/show/753805/
Note: For v2 apis, the request_id is not returned in response header
but it will be logged in logs.
APIImpact:
responses of the API will include 'x-openstack-request-id' header.
Implements: blueprint oslo-middleware-request-id
Change-Id: I437f783787514ff1add2d7f0059cb27addd12c3e