Commit Graph

195 Commits

Author SHA1 Message Date
Takashi Kajinami 17b3724ec8 Remove deprecated api class parameters
These parameters were deprecated during the previous cycle and have
had no effect.

Change-Id: I3c1ef0de244d6a40ed2af89615748abdbaf3fdfe
2024-04-19 02:07:31 +00:00
Takashi Kajinami b47116d7aa Refactor resource dependencies
This refactors resource dependencies to improve the following points.

 - Avoid unnecessary dependencies across services. For example aodh
   service does not require cinder db.

 - Restart only api service when config files like paste.ini, which
   are used only be api service is changed.

Change-Id: Id4916244bdf4cd4ff2b45a45ec3e25fb0d115249
2024-03-05 10:35:17 +09:00
Takashi Kajinami b6e70a57b1 Remove deprecated use_forwarded_for parameter
... because the option was removed from nova[1].

[1] a5f68d355c97baddf2baf46d9630175d65c36968

Change-Id: I60bcb4b949cecdee75de825bdb7131ac3c4761b9
2024-01-12 20:22:45 +09:00
Zuul 9fa957a67e Merge "api: Deprecate support for removed parameters" 2023-11-17 19:23:51 +00:00
Zuul b96dbabffe Merge "Debian: Ensure metadata-api is stopped before starting apache" 2023-11-17 19:23:50 +00:00
Takashi Kajinami 82c0332dbf api: Deprecate support for removed parameters
This removes leftover of a few options already removed from nova.

1. [DEFAULT] enable_network_quota
This option was for nova-network and has been removed[1].

2. [api] allow_instance_snapshots
This was removed by [2]

3. [api] hide_server_address_states
This was removed by [3]

[1] 6fe31d97542467656cdecd90c2e0a9057a4f7480
[2] 1b112acb344bce835c98759fea2e89ffdfdd967b
[3] 9b69afd4573bf6e44d696e2bdacac44f172e8f3c

Change-Id: I937176f33f7391cac8a7da38fe6828b0b0d49759
2023-11-17 11:23:30 +09:00
Takashi Kajinami b963ddfee0 Debian: Ensure metadata-api is stopped before starting apache
We have to ensure the eventlet services are stopped before starting
apache, to avoid duplicate port bindings. We already had the order
for nova-api but the one for nova-metadata-api has been missing.

Change-Id: I7379041105308829796d346e5c7ca7e309090715
2023-11-16 02:13:19 +09:00
Takashi Kajinami f5aac53305 api: Purge osapi_compute_* options when httpd is used
... because these options are used only when eventlet server is used.

Change-Id: I486bd74027e85b3c8dbe8ce6c96b2237fbd3ab2a
2023-11-13 01:48:00 +00:00
Takashi Kajinami 3c81436a3a api: Prepare to remove nova_metadata_wsgi_enabled
The nova::api::nova_metadata_wsgi_enabled parameter has been deprecated
but in fact users have had to set the options to deploy nova API by
httpd and mod_wsgi.

This removes the logic to deploy api run by httpd and mod_wsgi along
with metadata api run by eventlet, so that we can remove the option
in the next cycle.

Change-Id: Ic28c6783d7e7ccebc0a18878155d02521f504091
2023-11-13 10:47:47 +09:00
Takashi Kajinami f0cb20a86a replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Change-Id: I7a66cba32f00851e0c93b8ef6e5a620fb474f111
2023-06-21 17:37:34 +09:00
Benedikt Trefzer 0e6e17b171 fix usage of api::api_metadata_service_name parameter
since we have this parameter we should use it and not rely on
nova::params::api_metadata_service_name for decision.

Change-Id: I002419e4af20da489a3cd2bedb2acb011c8ef7ed
2023-06-02 20:24:12 +02:00
Takashi Kajinami d1bd167ddd Stop hard-coding default of allow_resize_to_same_host
The value currently defined in the class matches the service default
value so we can safely remove that hard-coding.

Change-Id: I998879531dd4b5792ca9674f91b555f349ca3ca7
2023-05-26 03:32:50 +00:00
Takashi Kajinami d6a8f219c8 Remove deprecated nova::api::instance_name_template
This parameter was deprecated during the previous cycle in favor of
the same parameter in the base nova class.

Change-Id: I8982d2e856fce3b5769f0380cd481c298cae7917
2023-04-07 13:55:14 +09:00
Takashi Kajinami 7688084aed Add strict validation about boolean parameters
This ensures the parameters used by if-else logic accept only boolean
values because non-boolean can result in unexpected behavior.

Change-Id: I3a27d94e453f9cfbea701337308a7086693c89bb
2023-03-18 16:14:03 +09:00
Takashi Kajinami 51829b985f Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ibe75e48eeb387c213c42511797c59b9df39a7762
2023-03-02 12:25:22 +09:00
Takashi Kajinami cd6df2a8af api: Skip service resource declaration if manage_service=false
All service resources should be skipped when manage_service is false.
This fixes the leaked resources to avoid error when resolving resource
dependencies.

Closes-Bug: #1998931
Change-Id: Ifebba6f17727c6a70ed851b84433d3536d089510
2022-12-06 22:57:05 +09:00
Zuul a50a1a95be Merge "Clean up parameters for service validation" 2022-11-30 08:58:47 +00:00
Takashi Kajinami dfb0351f88 Clean up parameters for service validation
... service validation was deprecated during Yoga cycle by [1].
The parameters were left for interface compatibility but have had no
effect since then.

[1] 2476bd9af5

Change-Id: I4acfc7e903e0666e48c49c1911e67af8ab48d425
2022-11-28 18:50:08 +09:00
Takashi Kajinami 73eb553202 Migrate instance_name_template to the base class
The [DEFAULT] instance_name_template parameter is used not only by
nova-api but by other services like nova-conductor or nova-compute.
This change migrate the parameter from the api class to the base class
so that users can configure the parameter for all services.

Change-Id: I0f590f12017e743a17d989d3a1008faa9b840e87
2022-11-21 09:47:58 +09:00
Zuul 35066808de Merge "Remove deprecated parameters for RateLimitingMiddleware" 2022-08-01 09:04:24 +00:00
Takashi Kajinami 3487ffc699 Remove handling of false value for instance_name_template
That usage was deprecated during Wallaby cycle[1].

[1] 771b0bbe4e

Change-Id: Ie75f916223deb42c03803b84f442fe53f590949a
2022-07-27 16:37:33 +09:00
Takashi Kajinami 19034f8e9b Remove deprecated parameters for RateLimitingMiddleware
These parameters were deprecated during Yoga cycle[1] and has no effect
now.

[1] 25651f25e2

Related-Bug: #1941855
Change-Id: Ic1479131983b790a38c9ae6002b5e83bfcded59d
2022-07-27 16:33:14 +09:00
Rajesh Tailor 72109eaf9a Fix some typos
This change fixes some of the typos in parameter descriptions,
conditions and tests.

Change-Id: I81aa8f0b0338662f0dcf9bec866dc5610a9141e8
2022-06-15 13:38:20 +05:30
Zuul 8d5556db3e Merge "Deprecate support for [api] use_forwarded_for" 2022-05-06 22:46:09 +00:00
Zuul a86362c1d2 Merge "Remove redundant default of [api] use_forwarded_for" 2022-05-06 22:46:03 +00:00
Zuul c4eb936337 Merge "Do not hard-code default of listen/port parameters" 2022-05-06 22:46:00 +00:00
Takashi Kajinami a57b4eb2c9 Deprecate support for [api] use_forwarded_for
... because the parameter was already deprecated.

Change-Id: I95b7730c507bf290b084acd229f72d348b83da38
Related-Bug: #1967686
Depends-on: https://review.opendev.org/836253
2022-05-03 16:54:24 +09:00
Takashi Kajinami 8761795c43 Remove redundant default of [api] use_forwarded_for
This parameter defaults to false, thus the hard-coded default can be
replaced by $::os_service_default.

Change-Id: I8a2f5a0e34010cd58032df0a3d858aff17647a7a
2022-05-03 16:51:29 +09:00
Zuul 48ecdbb604 Merge "Remove nova::api::install_cinder_client" 2022-04-26 09:26:20 +00:00
Takashi Kajinami 7fd0021867 Remove nova::api::install_cinder_client
... because it was deprecated during Wallaby cycle[1].

[1] 5ca156ee8d

Change-Id: Ib95f1a396aef092c04edbe6beabb81c7b2408bb4
2022-04-24 01:08:09 +09:00
Takashi Kajinami a383e17b97 Do not hard-code default of listen/port parameters
The current default values are same as the service defaults, thus can
be replaced by $::os_service_default.

Change-Id: Iccee55261472221769b549d0617cf1c8bf274e65
2022-04-23 15:54:47 +00:00
Takashi Kajinami 3db9d7694e Make sure unused metadata parameters are cleared
... instead of being left unmanaged.

Change-Id: I3f48f4bf1b7b34a340f9445cfc7f03b40b2262e0
2022-04-24 00:54:12 +09:00
Takashi Kajinami 2476bd9af5 Deprecate service validation for nova-api
Following the past deprecation in puppet-keystone[1], this change
deprecates service validation for nova-api.

[1] 3c95205e0253895e477b9135c10f5175d4166cfc

Change-Id: I6c409232f5b5120b93d1d47ffa416309d3d9d643
2021-12-13 23:22:18 +09:00
Takashi Kajinami c89ed47e96 Support [api] parameters to control queries for cell databases
This change introduces some [api] parameters, which determine how
nova-api queries cell databases to get a list of instances.

Change-Id: Ifeb7ead9c70022371202d5f4d8644c8cd0fa5019
2021-11-30 10:46:33 +09:00
Takashi Kajinami f44d3c4987 Use service anchor to ensure API is up
... instead of the individual service resource which can be named
differently according to service_name.

Closes-Bug: #1949658
Change-Id: I6be21a4653d67c63a3bd1fa8b814ecdb1257f097
2021-11-04 17:20:12 +09:00
Takashi Kajinami 25651f25e2 Deprecate parameters for RateLimitingMiddleware
... because this middleware was already removed from nova a long ago.

Closes-Bug: #1941855
Change-Id: Id2e27e32a53bce21301420e3bf511c91fb984279
2021-08-28 10:30:51 +09:00
Takashi Kajinami 5ca156ee8d Deprecate the install_cinder_client parameter
Nowadays the python-cinderclient package is supposed to be installed
automatically when nova packages are installed because of package
dependencies, thus we don't need to install it explicitly.

Change-Id: Ic3b764ede243923be631a97da95ba9f2f2f6111b
2021-03-13 11:17:26 +09:00
Takashi Kajinami 771b0bbe4e Refactor logic about the instance_name_template parameter
We don't need to implement a speicific logic to ensure the parameter is
absent but can pass $::os_service_default. This change updates default
of the instance_name_template parameter so that we can simplify our
current logic to manage the parameter.

Change-Id: I5fcd8e15c5b3a3386104506fb9f7b54eda2eb867
2021-01-27 11:17:12 +09:00
Zuul b675c0915d Merge "Remove redundant usage of ensure_resource" 2020-11-07 03:23:21 +00:00
Rocky c2c58e5619 Include nova pci in api
Nova [pci]alias should also be configured for nova-api service.

Change-Id: Ie49b59c3981df340409c39050d7c9188eaa180ee
2020-10-29 21:55:36 +11:00
Takashi Kajinami f04e00505f Remove redundant usage of ensure_resource
... and gather all parameter definitions into the single nova_config
resource definition.

Change-Id: If65a77dda5a779840ff316aa898f98b73c3aa313
2020-10-26 21:41:20 +09:00
Takashi Kajinami 1f1428e01b Fix wrong notification between api service and httpd
nova-api service should be stopped before httpd service is started,
thus nova-api should notify httpd.

Change-Id: Ibffb65269daaeca62554cfbecb536361ab70611a
2020-10-19 07:55:08 +09:00
Rajesh Tailor 6aebc66eaf Update parameter description
Change Id58b4dad29a6ea0f2998d8e41aa09ba0037ea94c deprecate
the `allow_resize_to_same_host` parameter from nova::compute
in favor of same parameter defined in nova::api.

This change updates the description of `allow_resize_to_same_host`
parameter in nova::api.

Change-Id: I10ad60b29b48430d439691533666b8e72b8d0b65
2020-09-15 17:27:10 +05:30
Kieran Spear 5c38281e1b Use a 'params' hash for authtoken parameters
Currently adding a new authtoken parameter requires changes
in nearly 30 different puppet projects. For options without defaults,
defining these individually in each puppet-* project doesn't
appear to add any value since validation is already happening
in the keystone::resource::authtoken class.

This change adds a params parameter which is a hash of options to
pass through to the authtoken resource. The individual params are
still used as defaults, but any keys set in the params hash override
them. I propose deprecating these individual parameters in a future
commit.

Depends-On: https://review.opendev.org/#/c/743858/
Change-Id: I695834ac03a52d8569e50db600676a89e165491d
2020-07-30 11:35:06 +10:00
Takashi Kajinami b5c5d7acc3 Rename nova_paste_api_ini to nova_api_paste_ini
... so that the name is consistent with the other puppet modules.

Change-Id: I8237b7760f3f7a7bf2806524b2582ef85d3bc6d5
2020-05-03 00:34:19 +09:00
Takashi Kajinami e3078760d7 Remove implementation to cleanup old configurations
The cleanup of keystone parametes in api-paste.ini was implemented
really long ago[1], and it's almost useless now.

[1] ee46988692

Change-Id: Ifbeebc8af29a1fb04f3dab145e272227156386dc
2020-05-03 00:29:14 +09:00
ZhongShengping a34732bd52 Remove fping_path option
The fping_path parameter has been deprecated for one year.
We can remove it.

Change-Id: Ib554f9ae7662377f8cf0057db655dcdfb21f85e8
2020-01-03 10:41:34 +08:00
Tobias Urdin 7deecfbdf2 Convert all class usage to relative names
Change-Id: Ibe5a433cb67c38c0c9b05a50bffa2eda7391f241
2019-12-08 23:13:08 +01:00
Oliver Walsh d7eb253e4d Include nova::availability_zone in nova::api and nova::conductor
For some reason this was included in nova::compute and nova::scheduler
but never included in nova::api eventhough bug #1529065 specifically
calls out the fact that it is missing.

Looking at the code - nova-api definitely requires it.
E.g the server create request handler sets the target AZ to
CONF.default_schedule_zone if none
https://github.com/openstack/nova/blob/stable/queens/nova/api/openstack/compute/servers.py#L486

and the az request handler skips the internal_service_availabily_zone
when listing AZs
https://github.com/openstack/nova/blob/stable/queens/nova/api/openstack/compute/availability_zone.py#L38

nova-conductor also requires it as it calls
availability_zones.get_host_availability_zone which defaults to
CONF.default_availability_zone

Change-Id: If4d6a4a8f4cc1e7066cacb00da67d5433acd6ac5
Closes-bug: #1529065
2019-10-21 16:31:44 +01:00
Thomas Goirand 2801673c70 Debian: use the new nova-api-metadata service
In Debian, starting with Stein (and in fact, the latest version of
the Nova package for Stein), both nova-api and nova-api-metadata are
now running under UWSGI. This patch makes it possible to use that by
default, instead of Apache, which is a way more convenient than
running over Apache.

Change-Id: Iad05e5dcdd095993c36b1ae8797cc2b9b7c5318b
2019-10-01 08:50:59 +02:00