* Update placement from branch 'master'
to 96a9aeb3b4a6ffff5bbf247b213409395239fc7a
- 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
* Update placement from branch 'master'
to 6ac0521e76eb7f688dd99d9dca18e3abd87d588e
- Merge "Update python classifier in setup.cfg"
- Update python classifier in setup.cfg
As per the current release tested runtime, we test
till python 3.11 so updating the same in python
classifier in setup.cfg
Change-Id: Id0f37bebfb5298c5a84aa8f46f9b2d161b1f81ca
* Update placement from branch 'master'
to 3c832094a4fac091cccc6b18c0cbcf72409fb63f
- Merge "reno: Update master for unmaintained/xena"
- reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.
Change-Id: I4206138a2294cebf40bc5441abde2a4a91edb964
* Update placement from branch 'master'
to dc5d1864f8664cbd6932417b48162927ff665809
- Merge "reno: Update master for unmaintained/victoria"
- reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.
Change-Id: I09b7570845ee2e5eed306640f3c8cc8843e993bd
* Update placement from branch 'master'
to 0444d253e5dda8f1648859212c47bf149639fca1
- Merge "reno: Update master for unmaintained/wallaby"
- reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.
Change-Id: I8fae20381d8ad4e1824adb1356342241935829b9
* Update placement from branch 'master'
to 3a12c003bb50fc7b23c4ee657e7a0e5c6480079c
- Merge "Add upgrade job from 2023.1"
- Add upgrade job from 2023.1
The 2024.1 release will support direct upgrade from 2023.1, so this
scenario should be tested in CI.
Change-Id: Idbe56fd0eaa2e4b04ce64051bd706ad7757cddf2
* Update placement from branch 'master'
to 8e705fa460df161875e8973a4946d4453124b280
- reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.
Change-Id: Ibb210d60e99c65d801a88a4ba1cec42c2748c693
* Update placement from branch 'master'
to e10099bd800c2ffd4f084b00d0d063103dc45fe0
- Bump hacking
hacking 4.0.x is very old (it was released 3 years ago).
Change-Id: Id931b3a0110af7d6eb6dc11df5f3b0bbaad67b5e
* Update placement from branch 'master'
to e51085604ca57d78469c4497289a687eade6a5e6
- Merge "Add job to test with SQLAlchemy master (2.x)"
- Add job to test with SQLAlchemy master (2.x)
Change-Id: Ib5ba66ba32dd1b2981be338682556018fc41826c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Update placement from branch 'master'
to d822a3456ed4ea95bf5bf54919f0eee34bdc9af4
- Merge "db: Wrap raw SQL query in sqlalchemy.text"
- db: Wrap raw SQL query in sqlalchemy.text
Another change in SQLAlchemy 2.x.
Change-Id: I31123c70c9664844181eeaaf9d0846a319af7c2c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Update placement from branch 'master'
to 141780c0ce0836cbb258a9520dfc26648bb133c5
- 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
* Update placement from branch 'master'
to cf2678f2b9a65c184643a46038efb7687afe70f9
- Update 2023.2 reqs to support os-traits 3.0.0 as min version
We're now close to RC1, we need to ensure that 2023.2 Placement will support
the new traits.
Change-Id: I3b3e2f57fcc18ce8e6c326ab2e2fcead40603ca2
* Update placement from branch 'master'
to 5ce841588b4bfd3bc17e5df70dba46886492a046
- Fix bindep.txt for python 3.11 job(Debian Bookworm)
Python 3.11 job run on Debian Bookworm which does
not the mysql pkg for example, libmysqlclient-dev
instead they have mariadb. Updating bindep.txt file
to adjust the pkgs as per Debian bookworm.
Change-Id: Ib47d5e77b14353402fad06e7adc04f8ee8a7e94c
* Update placement from branch 'master'
to a85a8be32332b68e98a0146195f098cd7e6cd71f
- Merge "Modify the comment that is confused"
- Modify the comment that is confused
This SQL clause is confused and `usage` is the keyword of MySql.
Change-Id: I42f808d042bb52e70e2a5e10206c95698e3bfc42
* Update placement from branch 'master'
to 07b2a3a249f5fe2b82909bb1dc2f514132edbff9
- Merge "tests: Warn on *any* SAWarning warning"
- tests: Warn on *any* SAWarning warning
We were explicitly warning on one type of warning. We should warn on all
of them, since they are issues that need prompt addressing.
Change-Id: Ice70d5f0eb93537c4580964d0c70d439182977c0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Update placement from branch 'master'
to 6fe6b3713c6f0f92bf10a07d335ca6cc6b919ce0
- Merge "tests: Use base class for all functional tests"
- tests: Use base class for all functional tests
We were not using our own base class for some of the functional tests,
which resulted in us missing SQLAlchemy 2.0 issues. Correct this.
Change-Id: I921646053c9c68b06df54d206c3d51838c4cafa6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Update placement from branch 'master'
to b62cbabc18c295b55c3baccc6a8c5a37542d40cc
- Merge "db: Replace use of deprecated API"
- db: Replace use of deprecated API
We were missing a number of users of SQLALchemy APIs that were either
changed or removed in 2.0. These were yielding the following errors in
2.0.
TypeError: MetaData.__init__() got an unexpected keyword argument
'bind'
TypeError: TableClause.insert() got an unexpected keyword argument
'values'
TypeError: TableClause.update() got an unexpected keyword argument
'values'
AttributeError: 'Engine' object has no attribute 'execute'
Resolve these issues. We will fix the test class issue in a follow-up.
Change-Id: I8724b0738f097739f55cd8566bb30b7ddbe154d9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Update placement from branch 'master'
to e2cd4a28c09d440def35d2e11362251fd4325a91
- Merge "Bugtracker link update"
- Bugtracker link update
As discussed in the upstream meeting, update the placement bug tracker,
link from storyboard to launchpad, so new bugs should be reported in
launchpad instead storyboad.
Whats not updated:
- all links of storyboard which do not point to bugs
- links of existing stories, features, docs etc
Change-Id: I64b9d6feb4fb35f36c5a290b8b79d9b78736efd2
* Update placement from branch 'master'
to d15666bc9f0ceb4da134f335d882bb20f5efee8c
- Merge "Update python testing as per zed cycle testing runtime"
- 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
* Update placement from branch 'master'
to 9668281a4e824cfe9d102514ef4131ae97036fa6
- Do not use coalesce for consumers.uuid
The consumers.uuid and allocations.consumer_id are not Nullable.
Change-Id: I37065f7eb0809921a885f62ad6f30e6a2fbfd174
* Update placement from branch 'master'
to 1a6cc9af4af58a901a57b4e22727bfee1229342f
- 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
* Update placement from branch 'master'
to 9fa635bd60cff51effc7ae65e8562664ce7ce24c
- Update 2023.1 reqs to support os-traits 2.10 as min version
We're now close to RC1, we need to ensure that 2023.1 Placement will support
the new traits.
NOTE(sbauza) : We recently removed the gabbit check on the number of traits,
we don't need to amend it (I31431a6eb4f144135da0dc9c6d5e4c6b75d1af5d)
Change-Id: Id0f93c6a42d4e42cce668fe8927ab4249bfa9bd6
* Update placement from branch 'master'
to 636d65e3ef3a3a8e97e32844dd335a24c80799b0
- 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
* Update placement from branch 'master'
to ff8bee1fbc8151a399b096d8e4929ec923a9b02e
- Avoid rbac defaults conflict in functional tests
RBAC defaults for enforce_scope and enforce_new_defaults for
placement service is False. Nova is setting them for Nova service
to True in https://review.opendev.org/c/openstack/nova/+/866218
Placement tests fixture are used in Nova functional tests and
setting the rbac defaults causing placement to run with defaults
of what Nova is setting. To avoid this conflict, in placement
tests fixture, we need to set enforce_scope and enforce_new_defaults
to the same value it is for placement service.
Needed-By: https://review.opendev.org/c/openstack/nova/+/866218
Change-Id: I7e94d107962efdd7779733375327f5c8248c7087
* Update placement from branch 'master'
to 1c8afcd3f10a2ace8fdbada4f758b27bb2774cec
- Make tox.ini tox 4.0.0 compatible
* removed skipsdist=True to make sure placement available in the virtual
env
* passenv fixed as space separated list is not allowed any more
* improved the doc generation command line to print all the errors
instead of stopping at the first one
* added functional-py310 for convenience
* removed basepython = python3 as we assume all developer switched to
python3 in their env already
* removed ignore_basepython_conflict = True as without the basepython
definition generative targets now work without conflict
* updated the install_command to mimic better what tox uses by default
Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943
Change-Id: I1de24b7a98f149fce33d4e5eca82460eea72140b
* Update placement from branch 'master'
to bacd2c039345dd12f22b0474b8a0f6a691a8ed98
- Policy defaults improvement spec
This spec is to improve the policies default
as per the community wide goal
- https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html
APIImpact
Partial implement blueprint policy-defaults-improvement
Change-Id: I12dce16a7f18bb065e1412d2f2d9bd91452d8672
* Update placement from branch 'master'
to 4e345e55c2d695f7c271ac5119cfed761eb7d206
- Switch to 2023.1 Python3 unit tests and generic template name
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope. Also,
updating the template name to generic one.
See also the PTI in governance [1].
[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html
Change-Id: I7bef657a342fa8b7b08ffcca4459e2831204ee60
* Update placement from branch 'master'
to 92753e4a3a09e68e4149a91d1ee2761b66805901
- update bindep for ubuntu 22.04
The python 3.10 tox job runs on ubuntu 22.04 in the A cycle ubuntu 22.04
will also become the default for other jobs. python-dev is nolonger packaged
on ubuntu 22.04 so the tox job fails.
This change sync the python deps to match those use in nova which
already works across all tested distros.
Change-Id: I7fa25fea03f0c9c645a1eb10b22f058ca548d2fb
* Update placement from branch 'master'
to c6b1b92b1dc967c8721cc160e7f7c78a83950459
- Merge "Update master for stable/zed"
- 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
* Update placement from branch 'master'
to 5ec38f6d3b76619fac442a85a9b5c73dc606b83a
- Make us compatible with oslo.db 12.1.0
With oslo.db 12.1.0 the following sqlalchemy warning become an error:
sqlalchemy.exc.RemovedIn20Warning: Retrieving row members using strings
or other non-integers is deprecated; use row._mapping for a dictionary
interface to the row (Background on SQLAlchemy 2.0 at:
https://sqlalche.me/e/b8d9)
We tried to fix this before but missed a test_case that still used dict
access to get the fields of a Row instead of attribute access. We fixed
that test here. Also while fixed it I noticed that the generic
_AttributeCache object states that it stores dicts but actually it
sometimes stores dict but sometimes it stores Row objects. So the doc is
updated and the dict path converted to store namedtuple objects in the
cache instead. Note that Row is also acts like a namedtuple except that
._mapping does not exists in namedtuple but exists in Row. The trait
object assumed it gets a Row object with ._mapping from the cache so
that is adjusted to only assume a namedtuple and use _asdict() to covert
it to dict which is available both in Row and namedtuple.
Change-Id: I23ac1d85290a2dec307f8e76aafb02096259b605
* Update placement from branch 'master'
to 723da65faf66cc9b8d02f3756387dc58437e62af
- Merge "Fix typo in schema"
- 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>
* Update placement from branch 'master'
to 9c7f869b84df2dcc7c5d5644944e4452d6e5641e
- Func test for os-traits and os-resource-classes lib sync
Placement synchronizes the content of the os-traits and
os-resource-classes lib to its internal DB at service startup. We had
gabbi tests to test that by asserting a hard coded number of traits and
RCs. These test were always blocking the global version bump of such os-
libs as the placement test needed to be updated. This created a deadlock
between the version bump in the requirements repo and the test update in
the placement repo. To avoid the need to always do three steps for a lib
version bump (turn of test, bump global req, update an re-enable the test)
the test logic is changed. Now these tests compares the content of the
lib with the DB automatically instead of hard coding a number of
expected traits and RCs. To be able to this these tests are move from
gabbi to python.
Change-Id: I31431a6eb4f144135da0dc9c6d5e4c6b75d1af5d
* Update placement from branch 'master'
to eb95805e943d542dc89301a286add12de03d66e2
- Merge "Update placement for os-traits 2.8.0 release"
- Update placement for os-traits 2.8.0 release
This change re enables checking the standard
trait count and updates placement to require
os-traits 2.8.0
Depends-on: https://review.opendev.org/c/openstack/requirements/+/851423
Change-Id: If5c07703d7c236c9fe0eb70e31ef1afb1d3c7a3d
* Update placement from branch 'master'
to e4e11388a5b234bde091a36f6eff11febf257dd9
- Merge "disable traits count check to allow os-traits 2.8.0"
- disable traits count check to allow os-traits 2.8.0
This is a workaound to unblock the requirements repo.
Longer term, we probably need to work out a way for this test to pass
with multiple versions of os-traits.
This change follows the same format as:
I5aed5674975529b32390d3e216423cba8d501bc5 ; and
I3685c3caac3be4754d1f9e8479d8a047eaf8f3e8
Change-Id: I406afae77def90d6f8b20dc3a72310a81fee7910
* Update placement from branch 'master'
to 929ec22a2c16fa394c6e8a2c3c9de6ea16e82707
- Merge "doc: Comment out language option"
- 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
* Update placement from branch 'master'
to d723f225c194659961ce5adaeaaf0515497a48a8
- Merge "Change minversion of tox to 3.18.0"
- Change minversion of tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace whitelist_externals with allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Change-Id: I35c8c1591c8da83eb2c681ef176eb3e3f3c2798f
* Update placement from branch 'master'
to f052a3539a29e25652aa7e1d7c009f492d6089b2
- Merge "Add WA about resource_providers.can_host removal"
- Add WA about resource_providers.can_host removal
We made a mistake and not added resource_providers.can_host to the new
DB schema of Placement when Placement was split out of Nova. This patch
documents that as can_host is not in the DB model it is safe to drop it
from the DB to remove the schema inconsistency.
Related-Bug: #1978549
Change-Id: Icfe83313e86969b0b9d34c19b6b82a47d685d4d7
* Update placement from branch 'master'
to d013b37066f8f554acb389779c476fea146a214e
- 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
* Update placement from branch 'master'
to 03d567928e31d3dc85d4dd3f5617785e7380b6b1
- Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.
[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal
Change-Id: Ieba7daf39fa3323e8c9a7396747449f24189fcd5
* Update placement from branch 'master'
to 5acaa2eec7897815b5ef1848c46cc76c1f325314
- Merge "Make perfload jobs fail if write allocation fails"
- Make perfload jobs fail if write allocation fails
This uses curl -f when writing an allocation in order to detect when
the server has responded with a HTTP error code and then fails the job
if so. The idea behind this is to catch when PUT
/allocations/{consumer_uuid} required parameters change and the
perfload jobs need to be updated.
The curl -S option is also added to show the error if curl fails.
Change-Id: Ic06e64b1031ff37d7ada55449ae71cd39b1298a2
* Update placement from branch 'master'
to 20fdc44bfdd0e72fa7777042fd4a94ff6c07638d
- tox: Enable SQLAlchemy 2.0 warnings
As described in [1]. Unfortunately it doesn't seem to be possible to
silence these for other modules (cough...oslo.db...cough), presumably
due to how SQLAlchemy has configured warnings. We'll have to ignore
these for now.
[1] https://docs.sqlalchemy.org/en/14/changelog/migration_20.html
Change-Id: I28bc91d515440553828976dd1d3a3aef36a6d6a9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Update placement from branch 'master'
to 13bbdba06da19f85c05a2a9e1fbdb9d1813c3b47
- db: Use Row, not LegacyRow
We added this check in change I8b845a29fa21f4ca8340d91bf5c6394094c6ab97
("db: Remove use of non-integer/slice indices") because we were using
the same code to handle two different types of object in the same
method. However, while the functions being called to generate this
function return a LegacyRow in recent versions of SQLAlchemy, it seems
older versions return a Row. The former is a subclass of the latter so
we can use the latter for both. This is also a better idea long-term,
since SQLAlchemy 2.0 removes LegacyRow.
Change-Id: Ia30c03b3878d80550cefd39271e315065f1a199d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>