16115 Commits

Author SHA1 Message Date
Takashi Kajinami
46a6d5fa4b Remove references to Neutron LBaaS tests
... because these tests are already removed.

Depends-on: https://review.opendev.org/c/openstack/heat-tempest-plugin/+/896184
Change-Id: I34f75971fec826032377c47bf7b4e7a380522b8f
2023-12-17 00:37:49 +00:00
Zuul
93700aa365 Merge "Clear implementations for neutron LBaaS v1" 2023-12-13 04:10:35 +00:00
Zuul
b207d54612 Merge "Enable new defaults and scope checks by default" 2023-12-04 09:13:22 +00:00
Takashi Kajinami
d131a1ada2 Remove deprecated [DEFAULT] onready
This option was deprecated a long ago[1] and has had no effect for
multiple releases.

[1] 46d6b9306c26f36bc2d490afd9fcab30aa4725f5

Change-Id: I0971f67b43292f8794aa3329b2e7dccc67ec3f6f
2023-11-21 12:27:25 +09:00
Zuul
1aade657ad Merge "Add OS::Aodh::PrometheusAlarm resource" 2023-11-10 00:24:21 +00:00
Zuul
22f1dec801 Merge "Add devstack plugin option to enforce new defaults and scope" 2023-10-25 16:15:55 +00:00
Zuul
551a85c84b Merge "Add job to test with SQLAlchemy master (2.x)" 2023-10-25 16:15:53 +00:00
Zuul
d265cd574d Merge "db: Use raw connection to enable foreign keys" 2023-10-25 14:57:57 +00:00
Takashi Kajinami
6d13e93a37 Enable new defaults and scope checks by default
Based on the agreed steps to implement the SRBAC community goal, this
enables the new policy defaults and scope checks by default.

Change-Id: I315893150549d1174c3270c37c031e6a519f9a28
2023-10-24 13:18:40 +09:00
Takashi Kajinami
4421498cd3 Add devstack plugin option to enforce new defaults and scope
This is a prep work to enforce new default policy rules and scope
checking, and allows users to enable/disable the enforcement by setting
the single knob.

Change-Id: I8248f825a90b50fe874224c7ee06a1de299f1feb
2023-10-24 13:17:57 +09:00
Zuul
921b5b7590 Merge "db: Don't rely on branched connections" 2023-10-19 05:37:52 +00:00
Zuul
829f6c82be Merge "db: Migrate to enginefacade pattern" 2023-10-19 03:05:54 +00:00
Zuul
b36f4fbfca Merge "db: Remove use of 'transaction' helper" 2023-10-17 04:59:34 +00:00
Zuul
22d87fb39e Merge "db: Replace use of update_and_save" 2023-10-17 04:56:49 +00:00
Zuul
d574808b07 Merge "db: Only call private methods from public methods" 2023-10-16 07:23:34 +00:00
Zuul
7668b97777 Merge "cmd: Deprecate heat-manage migrate_properties_data command" 2023-10-16 07:23:31 +00:00
Zuul
09eb9a8095 Merge "db: Group related DB APIs" 2023-10-16 07:23:29 +00:00
Zuul
7fda63b45c Merge "db: Make utility methods private" 2023-10-16 07:23:27 +00:00
Zuul
4d10aa8a84 Merge "db: Remove unnecessary helper functions" 2023-10-16 07:23:24 +00:00
Zuul
0ad2bec3a9 Merge "db: Remove use of subtransactions" 2023-10-16 07:23:22 +00:00
Stephen Finucane
abed7c08ec Add job to test with SQLAlchemy master (2.x)
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I44f35fe94bdc48e0db5f414437b1ab018dbb49f2
2023-10-12 15:46:45 +00:00
Stephen Finucane
4d882edc30 db: Use raw connection to enable foreign keys
SQLAlchemy 2.0 wraps mostly everything in transactions, which limits our
ability to do this easily on a non-global basis. Use the raw connection
[1] instead.

[1] https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.execute

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ic2bbf59550e965769c6b64f3e5eeec9783c6b290
2023-10-12 15:46:39 +00:00
Stephen Finucane
9b754a019e db: Don't rely on branched connections
We were previously calling 'connect()' on the 'connectable' object in
'run_migrations_online', regardless of whether it was an 'Engine' or
'Connection' object. This worked because, as noted in an inline comment,
"when connectable is already a Connection object, calling 'connect()'
gives us a *branched connection*." This is no longer the case. From the
SQLAlchemy docs [1]:

  The Connection object does not support "branching", which was a
  pattern by which a sub "connection" would be used that refers to this
  connection as a parent.

Update our code to reflect this change, using the newly updated example
from the SQLAlchemy cookbook doc [2] as inspiration.

[1] https://docs.sqlalchemy.org/en/14/core/future.html#sqlalchemy.future.Connection
[2] https://alembic.sqlalchemy.org/en/latest/cookbook.html#connection-sharing

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Id41ae6d3fa3f343efdb727aae9bdef8ad2a098fd
2023-10-12 15:46:28 +00:00
Stephen Finucane
bb6b5ed5c7 db: Migrate to enginefacade pattern
This also gets us away from autocommit, i.e. the last outstanding item
in our preparation for SQLAlchemy 2.x.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I95c5e5d6b33e73a1df2bf036df44aa2e06cc9640
2023-10-12 15:46:21 +00:00
Stephen Finucane
879bc37bb0 db: Remove use of 'transaction' helper
Make sure we avoid nested sessions going forward.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ia171bb823f5302fb3a6b2f6f88f7295f97254759
2023-10-12 15:46:13 +00:00
Stephen Finucane
b2b1c52af7 db: Replace use of update_and_save
There are only a few callers. Do it directly.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ib9cb53c0a9a6b309e625bc8ed4facc18c4fbe0ba
2023-10-12 15:46:03 +00:00
Stephen Finucane
67070d4ed5 db: Only call private methods from public methods
This is the final preparation step for our removal of autocommit. This
makes our life easier since we can insist on only opening transactions
inside the public method.

On a related point, we remove one commit call from a private method and
keep another.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I75cf29a18b2179949ee4713f85ca52256d170c84
2023-10-12 15:45:52 +00:00
Stephen Finucane
9ba72bbc18 cmd: Deprecate heat-manage migrate_properties_data command
Well, we actually remove it but keep the entry point to avoid breaking
scripts. This has been around since 2016 and anyone that hasn't upgraded
now ain't upgrading.

This is one less set of APIs to worry about when removing the use of
autocommit.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I43051b3ca6e292f1164d750b04d7a440012b2ef5
2023-10-13 00:45:07 +09:00
Stephen Finucane
d1124ac268 db: Group related DB APIs
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I10b57246e44d5b6d75a0514508761d8de7adea6e
2023-10-12 15:43:34 +00:00
Stephen Finucane
6b514e29d9 db: Make utility methods private
Another step to make removal of autocommit easier.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I664a927198df1be89dcd9a5304afaf452795dcc6
2023-10-12 15:43:23 +00:00
Stephen Finucane
ea321003eb db: Remove unnecessary helper functions
This will make our life easier as we attempt to remove autocommit by
allowing us to maintain a pattern of only opening transactions inside
public methods.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I74069645babc4200ffd4087503277282b4c12792
2023-10-12 15:43:06 +00:00
Stephen Finucane
a9634d3f45 db: Remove use of subtransactions
This turned out to be easier done that I expected.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ie50b4bd212c758ec41c82be145290024910099a0
2023-10-13 00:41:37 +09:00
Zuul
4b1503bc7e Merge "tests: Add missing oslo.messaging config fixture" 2023-10-11 03:17:37 +00:00
Zuul
7709388059 Merge "Use py3 as the default runtime for tox" 2023-10-06 17:33:16 +00:00
Martin Mágr
f8a44f4904 Add OS::Aodh::PrometheusAlarm resource
This patch adds support for Aodh alarms of type Prometheus.

Depends-On: I72e124cca4398b78f7ed12e1db3f66bdbfcb196e
Change-Id: I5bb7c4d9086715fc22c0f7abc36d9bbfc88a60c9
2023-10-03 11:25:27 +00:00
OpenStack Proposal Bot
49b0a06230 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I6919a8e787116f93c9af1be2d451f49b553f58ae
2023-09-30 04:20:50 +00:00
Zuul
9e43f1494d Merge "Update master for stable/2023.2" 2023-09-29 05:23:02 +00:00
57e9850e47 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: Ie6ed8c8b287cfeedcf1ee35cbb18f5bacf14adfa
2023-09-21 10:38:22 +00:00
Takashi Kajinami
397657f667 Upgrade flavor for Fedora VM
Since we bumped Fedora version used in CI from 36 to 37, we've
seen timeout during boot process more frequently, which results
in job failure. This increases core and ram assigned to Fedora
VMs, to reduce failure rate.

To avoid consuming too much resources, this limits concurrency
of test runner.

Change-Id: I12e8ee0861629fd42a6bd03ec8705751da12ff61
2023-09-21 04:02:06 +00:00
Stephen Finucane
e1184e96db tests: Add missing oslo.messaging config fixture
Some tests were failing if run by themselves.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ic797e8648283605940be9d0889c38641f34e86e7
2023-09-15 20:22:30 +01:00
Zuul
346f1d7611 Merge "Isolate project scope and system scope" 21.0.0.0rc1 21.0.0 2023-09-15 09:35:43 +00:00
Zuul
3f03a27ea9 Merge "Handle FK error when creating/updating software deployments" 2023-09-14 04:05:42 +00:00
jiaqi07
e8bf86a42a Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update
this at each new cycle.

Change-Id: If7ef22daeef075d2a0a98f68272a87f4e95df4fe
2023-09-14 03:03:21 +00:00
Ekaterina Chernova
7860e7acbc Handle FK error when creating/updating software deployments
Software deployments have FK constraints on software configs.
This change ensures the DBReferenceError caused by the constraints is
properly caught. With this change now heat returns 400 Bad Response,
instead of 500 Internal Server Error when a user tries to create
a software deployment with a non-existing software config.

Also, the stack_user_project_id field is defined as 64-chars-long
string in DB model, so we should ensure that the input value is shorter
than 65 chars. Otherwise it also results in DB error.

Story: 2010001
Task: 45098
Change-Id: I03274dc0cffa226140eb720458cce81e8b5ce187
2023-09-13 15:26:11 +09:00
Zuul
6d6d684c02 Merge "Remove some notes no longer valid" 2023-09-12 18:46:52 +00:00
Zuul
019483a0bc Merge "Bump Fedora image used in CI" 2023-09-08 03:09:49 +00:00
Takashi Kajinami
0e51506419 Bump Fedora image used in CI
Fedora 36 is already EOLed so we should use more recent version.

Because guest enters to emergency shell when Fedora 38 (latest at
the time of writing) is used, we select Fedora 37 for now.

Change-Id: Ie0876080c771fb124d4dd36f803fbfd3b108e240
2023-09-07 21:20:31 +09:00
Michal Nasiadka
cacaf3e6d1 Fix bindep.txt for python 3.11 job(Debian Bookworm)
Python 3.11 job run on Debian Bookworm which does
not have the mysql pkg for example, libmysqlclient-dev
instead they have mariadb. Updating bindep.txt file
to adjust the pkgs as per Debian bookworm.

Based on [1]

[1]: https://review.opendev.org/c/openstack/placement/+/893821

Change-Id: I18951908a1bea5f9f266382e8c7bfa91a5e6f38f
2023-09-06 07:41:22 +00:00
Zuul
ccf4793aff Merge "Fix missing oslo.versionedobjects library option" 2023-09-05 09:58:55 +00:00
Zuul
17ed569181 Merge "Skip loading auth plugin in case the property is set" 2023-09-05 06:43:14 +00:00