Commit Graph

151 Commits

Author SHA1 Message Date
Zuul 68c6487465 Merge "[docs] Rewrite the architecture description" 2022-10-06 15:30:29 +00:00
Radosław Piliszek e93abfe536 [docs] Rewrite the architecture description
To match the reality.

Closes-Bug: #1801794
Change-Id: I5f2044da0efcbe3e091d25f97d69fec877858d7e
2022-09-26 18:42:28 +00:00
Radosław Piliszek 83f805eb72 Improve ExternalServiceFilter
Apply my comments from the original patch [1] and add unit tests.

[1] https://review.opendev.org/c/openstack/blazar/+/781917

Change-Id: I116aad6677423aedb5dda48f06b36afc32819ba8
2022-09-15 09:32:43 +00:00
Pierre Riteau 22e99c1827 Add enforcement filter using an external HTTP service
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
2022-08-30 22:06:54 +02:00
Radosław Piliszek 42e4b7639f [docs] Install blazar to generate proper docs
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
2022-08-03 10:40:57 +00:00
Pierre Riteau ac06f1f9f6 Update IRC meeting information
Change-Id: I01abce1ddee907ce8f0bb1ed9340e5508ac173f3
2022-06-07 09:15:26 +02:00
Zuul be7c3c07c4 Merge "Fix references to start and end dates" 2022-05-06 08:34:41 +00:00
Pierre Riteau bd6469d53c Fix references to start and end dates
The lease attributes are called start_date and end_date, not start_time
and end_time.

Change-Id: I77fb08a3811ed1445e31b3552ca23d5bfc43a07d
2022-04-15 09:52:50 +00:00
Pierre Riteau 2c3d94ce3b Skip blazar install in docs and pep8 jobs
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
2022-03-24 23:09:24 +01:00
Zuul e1c16e6b55 Merge "Add resource properties discovery API" 2022-02-21 22:54:52 +00:00
Mark Powers f5e6d24826 Add resource properties discovery API
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
2022-02-10 17:23:15 +00:00
Pierre Riteau 4064f0eabd Update Nova scheduler filter configuration
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
2022-02-07 15:33:52 +01:00
Mark Powers bf38e16ec3 Update list_allocations in hosts plugin to expose start and end dates
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
2022-01-27 15:03:24 +01:00
Mark Powers 21c015264c Add openstackclient command examples in CLI pages
This adds examples next to the existing blazar command examples, for the
commands added implementing blueprint openstackclient-support.

Change-Id: I211de88f5d0f8f6fe54660c904692db975d663bd
2021-07-29 17:37:44 +02:00
Pierre Riteau cfb561e7d4 docs: Update Freenode to OFTC
Change-Id: I4270d553abc604267a20ebc99b6c29ff59fd2435
2021-05-31 10:53:13 +02:00
Jacob Colleran d3f77fd0c5 Add usage enforcement framework
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
2021-03-24 16:57:13 +01:00
Zuul 2d95b84e7d Merge "remove unicode from code" 2021-02-23 11:38:11 +00:00
Ghanshyam Mann 3f1c1ed312 [goal] Deprecate the JSON formatted policy file
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
2021-01-28 16:37:30 +01:00
wu.shiming e81bbc72b7 remove unicode from code
Change-Id: I2e6e9c3b3d934e1ba60b07d239e970137c32a48f
2021-01-13 09:26:38 +08:00
Hervé Beraud 963097ee7f Add doc/requirements
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver [1] for the release team [2][3].
Removed specific doc requirements from test-requirements.txt.

The problem here is that this repos haven't doc/requirements.txt file
and by default in this case zuul will use the test-requirements.txt file
to pull requirements [4].

This requirements file contains extra requirements like flake8 that
collided with those allowed in our job environment and so the new pip
resolver fails to install these requirements and the job exits in error.

This project meet the conditions leading to the bug.

[1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html
[4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36

Change-Id: I0c39bb5581c120190a764b25890ba868180a59fe
2021-01-05 16:20:37 +01:00
Pierre Riteau fe0fea186a Fix pdf-docs build failure
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
2020-06-26 11:35:20 +02:00
Andreas Jaeger b489995c8b Switch to newer openstackdocstheme and reno versions
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
2020-05-21 16:12:27 +02:00
Andreas Jaeger a98989b2ef Cleanup py27 support
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
2020-04-13 18:18:44 +02:00
Pierre Riteau eb5cef0bf5 Remove documentation of v2 API
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
2020-04-06 22:05:31 +02:00
Pierre Riteau 71b064b36a Update contributor docs for Python 2 drop
Change-Id: Ia19e529d066a35d7bda1441cfd1a9fa4b95db5ef
2020-01-27 22:25:44 +01:00
wangfaxin a1f805ce02 Update Gerrit links following the move to opendev.org
Change-Id: I9b21c4b65887b5ca2bc52ae10a04ae9f885b377d
2019-10-22 09:37:59 +00:00
Zuul a2bcedbb9c Merge "Document how to update a floating IP reservation" 2019-09-27 12:50:23 +00:00
Zuul 5a8d7bcefc Merge "Document parameters for virtual:floatingip resource type" 2019-09-27 12:50:22 +00:00
Tetsuro Nakamura b0ed63db7d Fix empty sections in pdf document
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
2019-09-26 15:30:56 +02:00
Pierre Riteau 06d102c655 Build pdf doc
One of community goals is that each project should produce a single PDF
file. The pdf should be in the output of the openstack-tox-docs job.

TeX packages are required to build PDF locally, the following are
recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:

* https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
* https://etherpad.openstack.org/p/train-pdf-support-goal
* https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: If9850d8275e8c4f46b393b2cdd91c8963b9844a1
Story: 2006073
Task: 34795
2019-09-26 15:30:55 +02:00
Pierre Riteau 7853019a53 Document how to update a floating IP reservation
This commit also fixes some issues with console outputs not matching
each other.

Change-Id: If24d7763fad7dc0f560032c9cc9dc382d533709f
2019-09-24 14:23:10 +02:00
Pierre Riteau 2d77291677 Document parameters for virtual:floatingip resource type
Change-Id: I55365b023a6941b3fdd0705b9e530ccca5c596a2
2019-09-23 10:00:04 +02:00
Pierre Riteau 9a7cb65e6a Remove CRLF line terminators
Change-Id: I6ce3df84a063d2189f9fc4c6077accea7ac9560c
2019-09-16 18:27:24 +02:00
asmita singh 520005b13d Add microversion support
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
2019-09-10 18:59:36 +02:00
Pierre Riteau 66a5206591 Add documentation for floating IP reservation
Change-Id: I59ebd1b2bfa74f3d103580e1359f33f7114b6cbe
2019-08-27 13:09:26 +02:00
Zuul 5123399a91 Merge "Update api-ref location" 2019-07-29 20:24:39 +00:00
Andreas Jaeger 7fa2da6164 Update api-ref location
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
2019-07-22 19:16:35 +02:00
zhangyangyang a501624684 Bump the openstackdocstheme extension to 1.20
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
2019-07-19 17:37:41 +08:00
Tetsuro Nakamura 7127931f4c Delete specs from blazar repository
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
2019-07-16 10:01:11 +02:00
Le Hou 933be7dc5d Update to opendev
Change-Id: I116dd2025399f51d557c1bcaa5adcbb508568ea6
2019-04-23 15:56:11 +08:00
Zuul f781eedcae Merge "Expose floatingip APIs and virtual:floatingip resources" 2019-03-20 22:35:28 +00:00
Masahito Muroi 59b0968ea1 Expose floatingip APIs and virtual:floatingip resources
Partially Implements: blueprint floatingip-reservation
Change-Id: Idc2571027ebd24ca1af73941203411990172eb45
2019-03-19 09:59:53 +00:00
Zuul ffc0c549e7 Merge "Spec: Floating IP reservation plugin" 2019-03-19 05:09:01 +00:00
Tetsuro Nakamura 122c61ad88 Expose instance reservation affinity support
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
2019-03-17 07:59:59 +00:00
Masahito Muroi 80938dfab9 Spec: Floating IP reservation plugin
This is a spec for floating IP reservation.

Partially Implements: blueprint floatingip-reservation
Change-Id: Ic99f9f644126b5e5b6e4d5fa9a5b86e06113b3ed
2019-03-15 18:26:07 +00:00
Zuul 1418b29a44 Merge "Fix typo in spec" 2019-01-29 09:34:07 +00:00
Zuul b529f478ea Merge "Expose List/Get Allocations API" 2019-01-22 12:49:46 +00:00
Masahito Muroi 5dd2fd1044 Expose List/Get Allocations API
This patch exposes List and Get Reservation Allocations API to cloud
admins by default.

Partially Implements: blueprint resource-allocation-api
Change-Id: Ib8aa479b2b297b4564f734d07a25ca2637a56f49
2019-01-08 12:32:30 +00:00
Tetsuro Nakamura 469ddca009 Change "Resource Allocation API" spec
This patch changes the "Resource Allocation API" spec according to the
discussion in the IRC meeting [1].

[1] http://eavesdrop.openstack.org/meetings/blazar/2018/blazar.2018-11-27-09.00.log.html

Partially Implements: blueprint resource-allocation-api
Change-Id: I7c6c00ab63c7229a19b38425d35091b738a47bb4
2019-01-03 09:55:57 +00:00
MaoyangLiu 793bb585a3 Fix typo in spec
Change-Id: I0b2da162dd549e5ccbcccdf73ce5fd67389e4683
2018-12-18 08:57:59 +00:00