Commit Graph

126 Commits

Author SHA1 Message Date
OpenStack Release Bot 96a9aeb3b4 Update master for stable/2024.1
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: Ideffed96cfc56ad74898308f039cdf5e005bcda8
2024-03-15 14:17:12 +00:00
Zuul 3c832094a4 Merge "reno: Update master for unmaintained/xena" 2024-03-15 09:59:02 +00:00
Zuul dc5d1864f8 Merge "reno: Update master for unmaintained/victoria" 2024-03-15 09:59:01 +00:00
OpenStack Release Bot a641167298 reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: I4206138a2294cebf40bc5441abde2a4a91edb964
2024-03-05 18:52:06 +00:00
OpenStack Release Bot d64f8b0f02 reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: I8fae20381d8ad4e1824adb1356342241935829b9
2024-03-05 18:50:30 +00:00
OpenStack Release Bot 5c4c51de28 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: I09b7570845ee2e5eed306640f3c8cc8843e993bd
2024-03-05 18:48:33 +00:00
OpenStack Release Bot 8e705fa460 reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: Ibb210d60e99c65d801a88a4ba1cec42c2748c693
2024-02-06 14:27:46 +00:00
OpenStack Release Bot 141780c0ce Update master for stable/2023.2
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: Ibe63023c8e1c74118ebae76ea1d4a93eec2aaa31
2023-09-15 16:15:25 +00:00
Zuul d15666bc9f Merge "Update python testing as per zed cycle testing runtime" 2023-04-17 16:41:10 +00:00
OpenStack Release Bot 1a6cc9af4a Update master for stable/2023.1
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: If400681138cdb2b63790567bed6354ade2a49f8b
2023-03-01 10:50:38 +00:00
Ghanshyam Mann 636d65e3ef Modify the placement API policies defaults and scope_type
Placement API policies have been modified to drop the system
scope (every policy is now project scoped) and also modified
the defaults. Most of the policies are default to admin_or_service
role except reshape which is service role only and project resource
usage which is allowed for project reader and admin-or-service role.

Implement: policy-defaults-improvement
Change-Id: I806753e5b36a18be191a839256aaa84b511778f4
2023-01-26 11:31:16 -06:00
OpenStack Release Bot 396c270d0b Update master for stable/zed
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: I14ea1cdff8272e3c5f7796558ab9aff70557180f
2022-09-15 15:49:02 +00:00
Zuul 723da65faf Merge "Fix typo in schema" 2022-09-02 17:34:54 +00:00
Zuul d0e05e89ac Merge "Remove unicode literal strings" 2022-08-05 14:36:10 +00:00
anguoming 5fbb22901b Remove unicode literal strings
Python 2 has been deprecated. This patch removes all unicode strings.

Change-Id: Ie323d459923b36de544c15c45d61eb89866fc550
2022-08-05 02:15:19 +00:00
Zuul 929ec22a2c Merge "doc: Comment out language option" 2022-08-02 14:43:32 +00:00
Stephen Finucane 7d4d49f41c Fix typo in schema
We should have been specifying a minimum number of properties for the
'mappings' field when creating allocations [1]. We were not, thanks to a
typo. Correct this typo.

[1] https://docs.openstack.org/api-ref/placement/#allocations

Change-Id: I79bd5bf36a57983c38abc9235a8420931f373ca4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-07-11 13:09:34 +01:00
Takashi Kajinami d013b37066 Update python testing as per zed cycle testing runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Add release notes and update the python
classifier for the same.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Co-Authored-By: Ghanshyam Mann <gmann@ghanshyammann.com>
Change-Id: I998b34f884a2869d46ff05a179708a7f775e1615
2022-06-08 08:14:53 +09:00
Takashi Kajinami 19315d2132 doc: Comment out language option
... because explicit language=None causes the below warning since
Sphinx 5.0.0.

Invalid configuration value found: 'language = None'. Update your
configuration to a valid language code. Falling back to 'en' (English).

Change-Id: I072bb023fe3c197b757d3ea4232cefc1b27bb615
2022-06-07 00:33:45 +09:00
songwenping fcd9e88da2 Update python testing as per zed cycle testing runtime
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: I9c807c2bad39fed288314b1fb291d2a286aa09c3
2022-05-13 16:42:23 +08:00
OpenStack Release Bot cd899b66fa Update master for stable/yoga
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: Id7b917a26bbaecf08a20e83375bf5940d08cc4c7
2022-03-10 08:21:32 +00:00
Balazs Gibizer b2afade159 Add microversion 1.39 to support any-trait queries
The new microversion adds support for the ``in:`` syntax in the ``required``
query parameter in the ``GET /resource_providers`` API as well as to the
``required`` and ``requiredN`` query params of the
``GET /allocation_candidates`` API. Also adds support for repeating the
``required`` and ``requiredN`` parameters in the respective APIs. So

  required=in:T3,T4&required=T1,!T2

is supported and it means T1 and not T2 and (T3 or T4).

Story: 2005345
Story: 2005346
Change-Id: I66543c0c5509739d1461af2fb2c327a003202d74
2022-02-10 11:09:20 +01:00
Zuul 6e8c4cbffc Merge "Enable HTTPProxyToWSGI middleware to find actual client ips" 2021-11-29 21:54:55 +00:00
OpenStack Release Bot de4eb283d3 Update master for stable/xena
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: Ifa543f0d6265bf7937937b62f7ae2ff23fc6b4ba
2021-09-16 10:36:24 +00:00
Chris Dent 3772132579 Microversion 1.38: API support for consumer types
Update allocations, reshaper and usage APIs to accept and present
consumer_type in microversion 1.38.

ensure_consumer in placement/handlers/util.py is updated to be consumer
type aware.

allocation, usage and reshaper schema and handlers are updated

gabbits/consumer-types-1.38.yaml adds tests across the various URIs

A TODO is left in placement/handlers/allocation.py where the database
is being accessed in a way that is not ideal. This will be cleared
up in a followup patch (to add use of an AttributeCache).

Co-Authored-By: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Co-Authored-By: melanie witt <melwittt@gmail.com>

Story: 2005473
Task: 36421

Change-Id: I24c2315093e07dbf25c4fb53152e6a4de7477a51
2021-08-05 23:23:47 +00:00
Takashi Kajinami 2007f8fb45 Enable HTTPProxyToWSGI middleware to find actual client ips
Currently placement records REMOTE_ADDR environment as source ip but
this environment points load balancer ips instead of actual client ips
when placmenet runs behind load balancers like haproxy.

This change enables HTTPProxyToWSGI middleware to parse request
headers to look up actual client address.

Story: 2009049
Task: 42819
Change-Id: I4d15201dd2f94d00f4f2b53f773511ea020ef4ac
2021-08-01 20:56:44 +09:00
Balazs Gibizer 00795f31b8 Add support for RP re-parenting and orphaning
This patch adds the new microversion 1.37 in which changing the
parent_provider_uuid of a resource provider to any other provider
(except in the same subtree to avoid loops) or to null (un-parenting /
orphaning) is supported.

Story: 2008764
Task: 42131
Change-Id: I9d16ab7944d7e6ce725a892827b9508b7ba52d7c
2021-07-14 17:55:41 +02:00
OpenStack Release Bot 48b9d6f2d7 Update master for stable/wallaby
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: I389984da2de958b4520ca3f26de48ef634d2c466
2021-03-26 09:35:45 +00:00
Stephen Finucane b2ecae242d policy: Add releasenote for RBAC work
Now that this feature is complete, we should document it. Do so with a
release note.

Change-Id: I69c4923463dea6f528d4fb98ac0d78b8b4cad12f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-02-10 11:10:06 +00:00
Stephen Finucane c9284130be policy: Remove the deprecated 'placement' rule
The 'placement' rule pre-dates the granular policies introduced in the
Rocky release, back when placement was still part of nova. It's no
longer used anywhere and can/should be removed.

This commit also updates a policy test to use a registered policy,
instead of the `placement` rule we're removing here.  Otherwise, the
`authorize()` implementation will fail because the rule isn't officially
registered by placement.

Change-Id: I4b34c86a1991f954fc562b8e252fe9a178a08ad7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-02-02 20:06:12 +00:00
Ghanshyam Mann fa95ef8772 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the 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 doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ia7365cc3ae09e2ff916ab9f9ff0ba4fef0dc446b
2021-01-15 20:34:51 +00:00
Ghanshyam Mann 0c8cc6eef9 Remove deprecated [placement]/policy_file config option
[placement]/policy_file config option is deprecated since Train
release in favor of ``[oslo_policy]/policy_file`` config option.

In wallaby cycle, default value of ``[oslo_policy]/policy_file``
is going to change to 'policy.yaml' so it is better to remove
the old deprecated config option to avoid confusion for operator.

Change-Id: I427f1f5a82dc1b2e27fa29b68db9ab549df92289
2020-12-21 18:13:09 +00:00
OpenStack Release Bot 116541a762 Update master for stable/victoria
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: Ie0d53caa9dbf07e9bfea27ed5668e5ccba7824f7
Sem-Ver: feature
2020-09-28 09:32:09 +00:00
Andreas Jaeger 2009e61335 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.

Disable openstackdocs_auto_name to use 'project' variable as name.

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: I4e3fe772adffbd70d55ce1b73d9161a6de5b9c11
2020-05-21 16:23:00 +02:00
OpenStack Release Bot a43144e04a Update master for stable/ussuri
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: I76fe1db32281d79a27a5362d2821e7ba56a0f5b6
Sem-Ver: feature
2020-04-24 18:00:07 +00:00
Zuul b87073c991 Merge "Add allocation_conflict_retry_count conf setting" 2019-11-14 21:07:05 +00:00
Chris Dent 7753694d29 Add allocation_conflict_retry_count conf setting
A [placement]/allocation_conflict_retry_count config setting
has been added to replace the RP_CONFLICT_RETRY_COUNT constant
previous used to set the number of retries that will be
attempted when there is a resource provider generation conflict
when writing allocations.

Change-Id: Iaa2c9007d8656dd02cda9313459a233efd38c841
Story: 2006467
Task: 36398
2019-11-13 12:13:22 +00:00
Chris Dent 8436f45d01 Drop support for python 2
This is modelled on the similar change in nova [1] but is
simpler because Placement was already using python3 for
"integration" style tests.

The 'train' python3 template is replaced with corresponding 'ussuri'.

The python template is removed (it is 2.7) and the pep8 job that was
included in that template is now listed in check and gate jobs.

.zuul.yaml is updated to not do a generic 'funtional' test,
instead versioned tests only.

setup.cfg removes indications of support for python 2.

A reno is added.

tox.ini is changed to make the functional environment a
base environment for specific functional jobs.

[1] Ie1a0cbd82a617dbcc15729647218ac3e9cd0e5a9

Change-Id: Ifce3b0c0ff11553f32b2d02df07fde81efc34100
2019-10-18 12:58:36 +00:00
OpenStack Release Bot 6fd51f8831 Update master for stable/train
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: If49ac35aca61f331e9d0e06e39ca9449b2a80c98
Sem-Ver: feature
2019-09-26 09:43:14 +00:00
Zuul 3a7513dfab Merge "Add train-prelude release note" 2019-09-25 00:31:52 +00:00
Chris Dent abb14fe23c Add train-prelude release note
This is essentially a duplicate of the cycle highlights provided
with the release, plus a warning about needing to upgrade to extracted
placement in stein before the train upgrade.

Few links are provided because the rest of the release notes are very
short and will be presented adjacent to the prelude, and they have
links.

Change-Id: I872271688fbee69ff35bf44ef82fad9ab34f5229
2019-09-24 22:37:48 +00:00
Matt Riedemann 9ece3d35ab Deprecate [placement]/policy_file config option
The [placement]/policy_file option was necessary when placement
was in nova since nova uses the standard [oslo_policy]/policy_file
option for defining custom policy rules. Now that placement is
extracted (+1 release) we can deprecate the placement-specific
option and use the standard [oslo_policy]/policy_file option as well.

The tricky thing with this is both options define a default value
but those values are different, and neither need to exist or can
exist but be empty and we'll use policy defaults from code. So some
logic is necessary for detecting which option we should pass to the
oslo.policy Enforcer object. We prefer to use [oslo_policy]/policy_file
if it exists but will fallback to use [placement]/policy_file for
backward compatibility. We also check for a couple of edge cases to
try and detect misconfiguration and usage of the deprecated option.

The config generation docs are updated to include the [oslo_policy]
options as well as registering the options from that library for
runtime code.

Change-Id: Ifb14d2c14b17fc5bcdf7d124744ac2e1b58fd063
Story: #2005171
Task: #29913
2019-09-12 18:18:49 -04:00
Tetsuro Nakamura efaa36443f Follow up fix for same_subtree documentation
This patch fixes incorrect usages of fixed articles changing them to
indefinite articles in same_subtree documentation.

Change-Id: I6ba2e2f13400b4c2ae9a44cad7a1fc9a9e39b41d
Story: 2005575
Task: 30784
2019-07-09 10:23:54 +00:00
Tetsuro Nakamura 8395e3f099 Support `same_subtree` queryparam
A new same_subtree query parameter will be accepted. The value is
a comma-separated list of request group suffix strings $S. Each must
exactly match a suffix on a granular group somewhere else in the
request. Importantly, the identified request groups need not have
a resources$S.

If this is provided, at least one of the resource providers satisfying
the specified request group must be an ancestor of the rest.

The same_subtree query parameter can be repeated and each repeat group
is treated independently.

Co-Authored-By: Chris Dent <cdent@anticdent.org>
Change-Id: I7fdeac24606359d37f1a7405d22c5797840e1a9e
Story: 2005575
Task: 30784
2019-07-09 07:21:53 +00:00
Zuul d99039de9e Merge "Microversion 1.35: root_required" 2019-06-26 18:43:23 +00:00
Zuul e214ef3734 Merge "Add support for osprofiler in wsgi" 2019-06-21 18:34:32 +00:00
Eric Fried b733786a0a Microversion 1.35: root_required
Microversion 1.35_ adds support for the ``root_required`` query
parameter to the ``GET /allocation_candidates`` API. It accepts a
comma-delimited list of trait names, each optionally prefixed with ``!``
to indicate a forbidden trait, in the same format as the ``required``
query parameter. This restricts allocation requests in the response to
only those whose (non-sharing) tree's root resource provider satisfies
the specified trait requirements.

This is to support use cases like, "Land my VM on a host that is capable
of multi-attach," or, "Reserve my Windows-licensed hosts for special
use."

Story: #2005575
Task: #33753
Change-Id: I76cad83248920fa71da122711f1f763c4ebdb1ba
2019-06-20 17:30:35 -05:00
Balazs Gibizer 40c97d7346 Add support for osprofiler in wsgi
To use osprofiler with placement:

* Add a [profiler] section to the placement.conf (and other openstack
  service conf files):

  [profiler]
  connection_string = mysql+pymysql://root:admin@127.0.0.1/osprofiler?charset=utf8
  hmac_keys = my-secret-key
  trace_sqlalchemy = True
  enabled = True

* Include the hmac_keys in your API request

  $ openstack server create --flavor c1 --image cirros-0.4.0-x86_64-disk \
    --os-profile my-secret-key vm --wait

  The openstack client will return the trace id:

  Trace ID: 67428cdd-bfaa-496f-b430-507165729246
  $

* Extrace the trace in html format

  $ osprofiler trace show --html 67428cdd-bfaa-496f-b430-507165729246 \
    --connection-string mysql+pymysql://root:admin@127.0.0.1/osprofiler?charset=utf8

Here is an example trace output for the above server create request
including the placement interactions enabled by this patch:
https://pste.eu/p/ZFsb.html

Story: 2005842
Task: 33616

Change-Id: I5a0e805fe04c00c5e7cf316f0ea8d432b940e560
2019-06-20 13:53:19 +00:00
Chris Dent d38844e390 Implement allocation candidate mappings
In microversion 1.34 add a 'mappings' key to each allocation
request. Its value is dict keyed by resource group suffixes
with values of a list of resource providers satisfying that
group.

To preserve symmetry, the mappings key may be sent back when
writing allocations so the schema for POST and PUT allocations
and POST /reshaper are updated.

api history, api-ref and reno are added

Change-Id: Ie78ed7e050416d4ccb62697ba608131038bb4303
Story: 2005575
Task: 33536
2019-06-12 21:19:14 +00:00
Chris Dent e1783b0087 Correctly limit provider summaries when nested
When making a GET /allocation_candidates request with the 'limit'
parameter, include all the providers in the same tree as the providers
mentioned in the allocation requests. That is, in a nested situation,
if we limit the allocation requests to 10, we would usually expect
considerably more than 10 providers in provider summaries, to include
any non-contributing providers in the same tree.

Accomplish this by filtering provider summaries on root_provider_uuid
instead of individual provider uuid.

A gabbi test is added which exercises this in a nested situation.

An existing test is updated to reflect the new filtering style. It
does not exercise the nested scenario.

A reno is added indicating the fix.

Change-Id: I136bd7cd89f1bd54f0d1691268545850af234f18
Story: 2005859
Task: 33654
2019-06-11 14:40:25 +01:00