Commit Graph

8136 Commits

Author SHA1 Message Date
Takashi Kajinami 399352dfdc Fix update of OS::Heat::UpdateWaitConditionHandle
The update method has incomplete arguments and causes error during
actual stack update operation.

Story: 2011068
Task: 49751
Change-Id: I7b141f8846005da8379b1c646b298088d27a66bc
2024-03-21 09:47:54 +09:00
Zuul 42a0e28288 Merge "Allow more options to limit number of resources" 2024-03-08 05:33:48 +00:00
Zuul 9da45ab44b Merge "Deprecate resources for inactive services" 2024-03-07 03:53:51 +00:00
Zuul c2f8834656 Merge "Use zoneinfo instead of pytz if available" 2024-02-20 09:01:22 +00:00
Zuul 451d351cce Merge "Drop unused default password in create_stack_user" 2024-02-20 08:50:06 +00:00
Zuul 1cfe32d7ec Merge "Stop using deprecated implicit_prefix option" 2024-02-20 08:50:03 +00:00
Takashi Kajinami 564507a72a Stop using deprecated implicit_prefix option
This argument was deprecated in netaddr 0.10.0[1], and was removed in
netaddr 1.0.0[2].

[1] aca2f56344
[2] cc42742247

Change-Id: I24f26ee44af8fdfca89312351e67e5edbf7c81de
2024-02-17 13:13:34 +09:00
Takashi Kajinami 1d3b0073e0 Drop unused default password in create_stack_user
All calls of create_stack_user has the password argument set.

Change-Id: I267536b4b2b121c2bb921d024cc3e04400cbf211
2024-01-28 23:48:48 +09:00
Takashi Kajinami 84ca8a18e0 Use zoneinfo instead of pytz if available
The zoneinfo module was introduced in Python 3.9. We can use that
built-in module instead of the 3rd party library (pytz).

This is based on change I1f88bdadc68bfa726eac1da1c5824c1ed352ad98 in
oslo.utils.

Change-Id: I539120a6bfb850b0c4e384e51caa021761a4f6b8
2024-01-27 19:23:00 +09:00
lujiefsi 7d86fc6d84 Allow more options to limit number of resources
This commit adds the configuration options related to resource limits
in the Heat project. The `max_software_configs_per_tenant`,
`max_software_deployments_per_tenant`, and `max_snapshots_per_stack`
options have been added to control the maximum limits for software
configs, software deployments, stack snapshots.

Story: 2011006
Task: 49401
Change-Id: If33a1c6f3eb9e93f586931bc5c05104439c92bf9
2024-01-26 22:22:11 +00:00
Takashi Kajinami 13ec108b0d Fix inconsistent naming in db api
Snapshot.get_all does not return all snapshots of the project but
returns all snapshots associated with a single stack, so its name
should contain _by_stack for consistency.

Change-Id: Ic6b93b7cfc84793077672b3f1052f03519e4c5a1
2024-01-27 07:21:46 +09:00
Zuul 313a5afa6a Merge "Adding oslo.config entry points for yaql and cache opts" 2024-01-26 13:18:51 +00:00
Zuul 0676041be8 Merge "Bump hacking" 2024-01-26 12:59:35 +00:00
Takashi Kajinami 895d8645ad Deprecate resources for inactive services
Monasca, Sahara and Senlin were marked inactive during this cycle and
will not be part of the 2024.1 release. Because these projects are not
maintained in a consistent way, we deprecate resources for these
services.

We aim to remove these in the 2024.2 release.

Change-Id: Iab377ebc2569a4a5a81f736a1dfe9f406135f5d3
2024-01-22 21:03:39 +09:00
Takashi Kajinami 813f229a08 Bump hacking
hacking 3.0.x is too old.

Also fix failures detected by the new hacking version.

Change-Id: Ifccbbf2ff7b0824d2079937526d3eee1c536349b
2024-01-18 19:04:37 +09:00
Zuul 2df46d4c59 Merge "Clear implementations for neutron LBaaS v2" 2024-01-09 04:50:09 +00:00
David Vallee Delisle 0f7ce2cfa6 Adding oslo.config entry points for yaql and cache opts
To assist with automated configuration validation, we need entry points
for oslo.config.opts for yaql and cache options.

Change-Id: I228282d2c05f6583fe972470b326e7182f635b39
2024-01-09 10:39:46 +09:00
Takashi Kajinami f5e5aaed8e Remove deprecated wrappertask decorator
The wrappertask decorator was deprecated some cycles ago[1]. This is
internal implementation so could be even removed directly.

[1] 2c58017a14

Change-Id: I0f2e25971201e2a01b3e86bd859e8a4bdb98d371
2023-12-27 09:06:33 +09:00
Zuul 28334a3a2b Merge "Loadbalancer id is required in listener creation API" 2023-12-19 06:19:50 +00:00
Zuul a120c750c8 Merge "Hide OS::Glance::Image" 2023-12-15 05:56:36 +00:00
Takashi Kajinami 87a8cbe4ac Clear implementations for neutron LBaaS v2
LBaaS v2 was retired a while ago and now the related resources are all
hidden. Thus we can remove all implementation to reduce dependency on
python-neutronclient which is deprecated.

Story: 2010678
Task: 47761
Change-Id: I4de6cb353bc3699d124ea55666c87e4efd7e4350
2023-12-13 22:07:02 +09:00
Zuul 93700aa365 Merge "Clear implementations for neutron LBaaS v1" 2023-12-13 04:10:35 +00:00
Takashi Kajinami 01349f3793 Hide OS::Glance::Image
This resource requires Glance v1 API which was already removed[1][2].
It was deprecated some time ago so we can hide it now.

[1] 3dde3204d5c1b5323dba2d7b7607e69bcc58bbb2
[2] 30680961994b36ed12713c0f106b661535ce41c6

Change-Id: Ifbefdbc032c0b1ac538d68b41f13d0547b793ba5
2023-12-01 14:57:04 +09:00
liyi a749ed1e6b Loadbalancer id is required in listener creation API
The loadbalancer property of Octavia::Listener resource has been
optional but this is not aligned with Octavia's API and causes
a strange failure when a user creates a pool without the property.

This makes the property required to enforce the same requirements as
one made by Octavia's API.

Story: 1748389
Task: 17347
Change-Id: Ib8af29c3d45d5ffbbb21c216429ef38d0d273d05
2023-11-27 11:07:15 +09:00
Zuul 1aade657ad Merge "Add OS::Aodh::PrometheusAlarm resource" 2023-11-10 00:24:21 +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
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
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
Takashi Kajinami ac2462a584 Clear implementations for neutron LBaaS v1
These resources were hidden some releases ago so we no longer need to
maintain the implementations.

Story: 2010678
Task: 47760
Change-Id: Id9684396e495f46890a915e7d05d9fd2ddc24b63
2023-04-10 14:16:40 +09:00
Zuul cec8eb12c6 Merge "db: Remove layer of indirection" 2023-04-07 17:46:50 +00:00
Zuul bbd0e94e07 Merge "Hide resource types for Neutron LBaaS v2" 2023-04-06 15:36:38 +00:00
Takashi Kajinami b5ccf5a307 Hide resource types for Neutron LBaaS v2
Neutron LBaaS v2 was retired a long ago and users are no longer able
to use these resource types.

Story: 2010678
Task: 47759
Change-Id: I9c9cdcbe6cb1019714dbb4cfc05c0c68ac2ff934
2023-04-03 09:20:39 +09:00
Stephen Finucane 43a5f3984e db: Remove layer of indirection
We don't have another ORM to content with here. Simplify
'heat.db.sqlalchemy' to 'heat.db'.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Id1db6c0ff126859f436c6c9b1187c250f38ebb62
2023-03-25 12:02:27 +09:00
Bui Doan Dang cd2d8dcf08 fix wrong attribute in heat senlin client
Heat has been using the deprecated interfaces of openstacksdk for some
Senlin APIs but these interfaces were already removed. This fixes that
problem and replace the removed interfaces by the new ones.

story: 2010635
task: 47602

Change-Id: I3b18de721949f3c15c776f90720f3e994f7d6670
2023-03-09 12:55:31 +09:00
Zuul 9063bd7121 Merge "Move CircularDependencyException to common" 2023-03-07 05:01:54 +00:00
Zuul ac53891e85 Merge "fix heat update senlin cluster" 2023-03-06 08:03:28 +00:00
Bui Doan Dang c31eb4f5c7 fix heat update senlin cluster
story: 2010578
task: 47331

Change-Id: I3706d662ec56e3548eb991556be7bd0f82f49e05
2023-03-06 04:45:02 +00:00
Pavlo Shchelokovskyy c6094856a3 Fix parsing of live data from OS::Nova::Server
depending on compute API version, flavor in the instance representation
may not have "id" field, but "original_name" instead.

Story: 2009753
Task: 44211
Change-Id: Ieeae2f36f5e59e01f57a2f8e66a983ec3d99ec63
2023-03-06 04:44:52 +00:00
Tobias Urdin c253b38e21 Move CircularDependencyException to common
Moves the exception from inside the engine code
to the common code so that we can use it in the
API fault middleware.

Change-Id: I017b95153c358829501f6a5740918cdb005fb32f
2023-02-27 12:22:38 +00:00
Zuul a49526c278 Merge "Honor 'hidden' parameter in 'stack environment show' command" 2023-01-27 17:30:30 +00:00
Zuul 8b14ff2f34 Merge "Explicitly pass error kwarg in nested StackValidationFailed" 2023-01-25 19:43:16 +00:00
Zane Bitter a0ff4b98b7 Decode UTF-8 body data in SwiftSignal
Change-Id: Ie12c2df93f846629a7c8b7c6415cebc31eaba1bc
Story: #2010485
Task: 47053
2023-01-19 13:38:59 +13:00
Chengen Du 1305a3152f Honor 'hidden' parameter in 'stack environment show' command
Related-Bug: #1999665
Story: 2010484
Task: 47052
Change-Id: Ifc51ff6a4deab05002ccded59383416f9a586aa0
2023-01-11 17:51:14 +09:00
Tobias Urdin 53fa8c3749 Explicitly pass error kwarg in nested StackValidationFailed
This fixes the issue when a nested stack is serialized in
oslo.messaging and deserialization fails because we pass
a kwarg as an arg when we generate the exception remotely.

Story: #2010115
Task: #45695
Change-Id: Id75398d2ed2d4fab467df51057c4167cd77bb32f
2022-12-19 06:42:52 +00:00
ramishra ceef7869e0 Don't load all resources for policy check
We only need the resource types for the check. Let's
avoid loading all resources.

Change-Id: Iaf5650b2ae972064292cfe0d17f98b5635c51bad
2022-11-15 09:35:38 +05:30
Zuul f87d3efe70 Merge "Retry to detach volume if nova returned error 409" 2022-11-11 06:36:34 +00:00
Brendan Shephard 56d99bf658 Improve map_merge logging
Templates can be complex and contain multiple instances of
map_merges. Debugging this can be complex, so this change
aims to improve the mapping and help users determine where
the problem has occured.

With this change, instead of just saying an error occured,
we will now return the object that the error occurred with
and a note about it's type. This will allow for quick
identification of what the problem was.

Change-Id: I1c4da88029bbf1a3cfb58f5e21da28ec2912f924
2022-11-03 15:47:01 +10:00
Mitya_Eremeev 0ea1ee087a Retry to detach volume if nova returned error 409
During volume detachment an instance can be in error state or locked.
Nova returns error 409.
Instance can be unlocked or fixed a bit later, but heat doesn't retry to detach volume.
The patch makes heat to retry detachments untill stack update timeout.

story: 2010355
Change-Id: I9a08b938401cd71eddd0eb80782d10392f92bf45
2022-10-12 15:46:13 +03:00
Zuul f71308319a Merge "Allow deleting user_creds when can't be decrypted" 2022-10-04 06:18:46 +00:00
Takashi Kajinami 87bdbfdcab Drop implementation for OS::Magnum::Bay/BayModel
Magnum has deprecated it's Bay API and BayModel API a long ago and
these resource types were deprecated and are hidden in Heat now.

Magnum has removed the old API during Zed cycle and the resources are
no longer supported, so we should remove the implementation now.

Change-Id: If4c6a83a83f9eb29407eb632f47c7229b5492ffd
2022-09-21 16:40:03 +09:00