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
The blazar installation was removed in [1].
However, stevedore requires blazar to generate docs for
configuration. Currently, they are mostly empty.
Instead of removing the blazar installation, this change makes
sure that deps are installed with constraints so that blazar
installation does not bring havoc and the original issue is fixed.
[1] Ic55dba0038a2209e9fb291a604a5c1da57607e1e
Change-Id: I28d06ae31c4cf44d010e0892a094138112b08641
After installing doc build requirements with upper constraints, tox was
installing blazar without constraints, which was pulling Jinja2 3.1.0
(released today) as a Flask dependency. This caused a docs build failure
on stable/wallaby, because Jinja2 dropped support for environmentfilter
used by the version of Sphinx in upper constraints.
Use skip_install to instruct tox not to install blazar when not needed.
This requires adding oslo.config and oslo.policy to doc/requirements.txt
because we use their sphinx extensions.
Change-Id: Ic55dba0038a2209e9fb291a604a5c1da57607e1e
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
Synchronise with default enabled_filters: RetryFilter and RamFilter were
removed from Nova. Also remove filters which were only required by
earlier implementations of instance reservation.
Change-Id: I7f60008d995266bda6d6880a952649f9b6477e3c
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
This adds examples next to the existing blazar command examples, for the
commands added implementing blueprint openstackclient-support.
Change-Id: I211de88f5d0f8f6fe54660c904692db975d663bd
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
With the new release of Sphinx 3.1.0, building blazar pdf docs started
failing with a "! Dimension too large." error.
TeX memory gets exhausted during the pdf build due to the inclusion of
large sample files. With this fix, sample files are included in html but
not in pdf.
Disable other Zuul jobs since some are failing. They will be enabled
again in https://review.opendev.org/#/c/738071/
Change-Id: I1287ebdeab2be521c2d19177560c8467f2acc182
Closes-Bug: #1885250
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
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build; fix build warnings
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Raise oslo.utils version, 3.36.5 introduced uuidsentinel.
Change-Id: I8c81e0c1944c239e460befbf886993270902ee04
With Sphinx 3.0.0 released yesterday, docs build started to fail:
Extension error:
Could not import extension wsmeext.sphinxext (exception: cannot import name 'l_' from 'sphinx.locale'
We only use wsme in the deprecated Blazar v2 API which we intend to
remove. Remove its documentation and the Sphinx extension from the
configuration first in order to fix the gate.
Change-Id: Ia740b98016c3384b37d55aff6e54ed640332fa01
The following sections were empty in the pdf document.
3. Installation Guide
4. Configuration Reference
5. CLI Reference
6. API Reference
This was because it is already referred in the second section.
2. Admin Guide
This patch fixes the empty sections by moving the admin guide after
those sections.
Change-Id: I96d8b2fa9475c097e9eda6ecfc7ebb5a9f471567
Story: 2006073
Task: 34795
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
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.
Note that redirects will be set up as well but let's point now to the
new location.
For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html
Change-Id: Icee2189e5a56e06ae01c7e3eee585e4c7a9553a6
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.
Change-Id: Ia4386840658666079f4902fc72bd6772b42f00dc
In the Train cycle, the Blazar project has started to use the
openstack/blazar-specs repository instead of the specs directory
doc/source/specs within the openstack/blazar repository.
Therefore, this patch removes old specs from the blazar repository and
issues a release note.
Change-Id: Ic238c61f6cc39984edad807bb5a180a63db2bcb9
For instance reservation, blazar has checked the affinity policy and
raised an exception if it is None or True. Since we are now ready to
support affinity=None/True, this patch deletes the check and adds a
migration script to accept a NULL value for the affinity column in the
database.
This patch also updates the CLI usage document of the instance
reservation and adds the release note for the instance reservation
affinity policy.
Change-Id: Icf26d1b7dffe64f82d7084dcebb5df1c7c9f106d
Closes-Bug: #1737676
Blueprint: no-affinity-instance-reservation
This is a spec for floating IP reservation.
Partially Implements: blueprint floatingip-reservation
Change-Id: Ic99f9f644126b5e5b6e4d5fa9a5b86e06113b3ed
This patch exposes List and Get Reservation Allocations API to cloud
admins by default.
Partially Implements: blueprint resource-allocation-api
Change-Id: Ib8aa479b2b297b4564f734d07a25ca2637a56f49