Commit Graph

107 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 835d2add96 Deprecate and remove heat_deferred_auth_method variable
According to documentation this variable have the only option of using
trusts [1]. Moreover, defenition of variable is deprecated and cause a
deprecation warning in service startup logs.

[1] https://docs.openstack.org/heat/latest/configuration/config-options.html#DEFAULT.deferred_auth_method

Change-Id: I0cc68bd8e5961559391be8c2f5a17330ef4ede2f
2024-01-09 13:10:29 +01:00
Dmitriy Rabotyagov a78b40a491 Add quorum queues support for service
This change implements and enables by default quorum support
for rabbitmq as well as providing default variables to globally tune
it's behaviour.

In order to ensure upgrade path and ability to switch back to HA queues
we change vhost names with removing leading `/`, as enabling quorum
requires to remove exchange which is tricky thing to do with running
services.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I7e4e8b3be33536545b5b4bcfb4855e8c160bb152
2023-10-25 10:32:46 +00:00
Dmitriy Rabotyagov e33cd3a68d Use proper galera port in configuration
While <service>_galera_port is defined and used for db_setup
role, it's not in fact used in a connection string for oslo.db.

Change-Id: If10b9591f4a97eaf54cf5bd09865d29ae461d639
2023-07-31 15:09:46 +02:00
Dmitriy Rabotyagov 1d39c7ab44 Support service tokens
Implement support for service_tokens. For that we convert
role_name to be a list along with renaming corresponding variable.

Additionally service_type is defined now for keystone_authtoken which
enables to validate tokens with restricted access rules

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/845690
Change-Id: Ib5d15aaf56112a776e2b9abb2396f9ea4f4fe319
2022-06-15 18:23:20 +02:00
Damian Dabrowski 6606eed9bf Database connection pooling improvements
- Implemented new variable ``connection_recycle_time`` responsible for SQLAlchemy's connection recycling
- Set new default values for db pooling variables which are inherited from the global ones.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819424
Change-Id: I78301a9d98854ba9f80cf6613e62a363f8327dfc
2021-12-03 11:40:56 +01:00
Dmitriy Rabotyagov e84f7e496a Refactor galera_use_ssl behaviour
With PKI role in place in most cases you don't need to explicitly
provide path to the CA file because PKI role ensures that CA is trusted
by the system overall. In the meanwhile in PyMySQL [1] you must either
provide CA file or cert/key or enable verify.

Since current behaviour is to provide path to the custom CA we expect
certificate being trusted overall. Thus we enable cert verification when
galera_use_ssl is True.

[1] 78f0cf99e5/pymysql/connections.py (L267)

Change-Id: I8e689330b76e72df780be3b2f8af066a5fe96a2a
2021-09-21 14:41:59 +03:00
Jonathan Rosser a71bc07e67 Add variables for rabbitmq ssl configuration
Change-Id: I42fefe84c912c6043bd80665a267d819347a5229
2021-05-17 10:48:49 +00:00
Guilherme Steinmüller e89dc3e5d9 Refactor memcached_servers
This patch aims to add a prefix for memcached_server
on each role to give the ability for deployers to
override the location of memcached cluster. I.e users
wants to create a single memcached cluster with k8s
for each service.

We also add pymemcache based on [1]

[1] https://review.opendev.org/711429

Change-Id: Id853b46de4323b605ff6544b1e48bae30a0bf0a7
2020-03-16 13:42:37 +00:00
Dmitriy Rabotyagov 83d643947f Start using uWSGI role
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.

Change-Id: If539762d5de0730ce97d8f8aaefb4c096d850902
2019-09-04 19:41:09 +03:00
Jonathan Rosser 288634ce0b Fix keystone endpoint for heat servers
This patch changes the heat config so that communication between
the heat service and the other internal parts of openstack occurs over
the internal API endpoint, but a new heat configuration option [1] is set
which ensures that the keystone endpoint written into server configs
points to the external API endpoint.

This should address several long running SSL related failures when self
signed certificates are used, and allows heat to work correctly when the
internal and external endpoints are on different networks.

Change-Id: I533ab16557cb83e2791dbb7267a97fb0d44e9ba6
Fixes-Bug: 1811086
Fixes-Bug: 1820591
Related-Bug: 1824646
Related-Bug: 1814909
Depends-On: https://review.opendev.org/678062
2019-08-22 16:47:39 +00:00
Dmitriy Rabotyagov 88c29bb665 Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files
to journald. We also disable uwsgi logging, since it dublicates
requests that are logged by service itself.

Change-Id: I9f8a7f92d644775bd673dbade73fbaa1268712d5
2019-07-17 00:23:33 +03:00
Jimmy McCrory 8a91e7d479 Fix distro installs on Ubuntu
Beginning in the Stein release, Ubuntu distro packages are now using
Python3. This requires additionally installing and using the uwsgi
python3 plugin.

Install the 'python3-heat' package instead of individual service
packages since they provide service config files that conflict
with the ones OSA provides.

Change-Id: I8283fbacd4d014fb6652146f6b7750df750e6e76
2019-06-06 11:47:07 -07:00
Kevin Carter 53c3079bde Correct notification driver
The notification driver setup was resulting in the driver and connection string
on the same line. This is caused by the case statement and how jinja formats
the template when a case statement is present. This change modifies how the
driver string is created using a ternary, which will eliminate the case
statement and render the value of the diver correctly.

Change-Id: I8bb44ec141a19793b0c8d84bccf799c0e8f4cc4d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2019-02-07 22:37:47 +00:00
Kevin Carter 36a5e628e0
Cleanup files and templates using smart sources
The files and templates we carry are almost always in a state of
maintenance. The upstream services are maintaining these files and
there's really no reason we need to carry duplicate copies of them. This
change removes all of the files we expect to get from the upstream
service. while the focus of this change is to remove configuration file
maintenance burdens it also allows the role to execute faster.

  * Source installs have the configuration files within the venv at
    "<<VENV_PATH>>/etc/<<SERVICE_NAME>>". The role will now link the
    default configuration path to this directory. When the service is
    upgraded the link will move to the new venv path.
  * Distro installs package all of the required configuration files.

To maintain our current capabilities to override configuration the
role will fetch files from the disk whenever an override is provided and
then push the fetched file back to the target using `config_template`.

Change-Id: Ib26b25c1df483c2e31bccc91874a83292be6a3aa
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2019-01-09 21:15:48 -06:00
Jesse Pretorius a839cc1713 Only implement policy.json if an override is configured
With I610115dc1974b2182ce673bb086a1da15b022de3 merged there
is no longer a default policy.json file in the venv, so we
need to change how we implement the file, and should only do
so if there is a config override configured for it.

Change-Id: Ifd0e57e14d5691daf4d715a46bdea2f1d90050d5
2019-01-08 13:54:26 +00:00
Mohammed Naser 785fcfd33d Switch to using public endpoint for URIs
The URI options in Heat all need to be public facing or otherwise
any instances spawned by Heat could have problems working with
things like SoftwareDeployment's such as Heat.

This patch makes the appropriate changes.

Change-Id: I210cedbdc527d981c49ff52264ee6028242202d2
2018-11-06 16:53:38 +01:00
Andy Smith c6bfb4ee99 Update messaging notification configuration
Change-Id: Iaaba621a511430148f7347593af809e1c81f07c7
2018-09-22 10:15:19 -04:00
Zuul fa5df920b0 Merge "Deprecate auth_uri option" 2018-06-14 02:59:34 +00:00
Andrew Smith 408055c486 Update rabbit driver ssl config option
Update the ssl setting to default to the new oslomsg rpc variable.

Change-Id: I857d9630bb2db4933f6a650f622ebfdf21777e86
2018-06-04 12:30:53 -04:00
Andrew Smith 34ddb73f03 Update to use oslo.messaging service for RPC and Notify
This introduces oslo.messaging variables that define the RPC and
Notify transports for the OpenStack services. These parameters
replace the rabbitmq values and are used to generate the messaging
transport_url for the service. The association of the messaging
backend server to the oslo.messaging services will then be
transparent to the heat service.

This patch:
* Add oslo.messaging variables for RPC and Notify to defaults
* Update transport_url generation
* Add oslo.messaging to inventory
* Add release note

Depends-On: If4326a6848d2d32af284fdbb94798eb0b03734d5
Depends-On: I2b09145b60116c029fc85477399c24f94974b61d
Change-Id: I4ee0a94028e7390b319d4e1ceb4ab7f7c28ad9ba
2018-05-30 14:57:57 -04:00
Markos Chandras 3ac7ae6ea7 Add support for using distribution packages for OpenStack services
Distributions provide packages for the OpenStack services so we add
support for using these instead of the pip ones.

Change-Id: I2435793b73e0a30131b4710b6e7d29dacbb7e6fa
Implements: blueprint openstack-distribution-packages
2018-05-25 17:27:25 +01:00
Zuul 3430b62a26 Merge "Update paste, policy and rootwrap configurations 2018-03-31" 2018-04-13 11:56:09 +00:00
Jean-Philippe Evrard e5ec676cbf Update paste, policy and rootwrap configurations 2018-03-31
Change-Id: I6a641b24d6db46bf589ef28718266c22ed6a78b6
2018-04-09 09:53:46 +00:00
ZhongShengping f93f485df2 Deprecate auth_uri option
Option auth_uri from group keystone_authtoken is deprecated[1].
Use option www_authenticate_uri from group keystone_authtoken.

[1]https://review.openstack.org/#/c/508522/

Change-Id: I68e4c9e81b8f17ec076a03376342e7b166efbe44
Implements: blueprint deprecate-auth-uri-option
2018-04-03 14:16:53 +08:00
Kevin Carter 49f0c7e6fe Convert role to use a common systemd service role
This removes the systemd service templates and tasks from this role and
leverages a common systemd service role instead. This change removes a
lot of code duplication across all roles all without sacrificing features
or functionality. The intention of this change is to ensure uniformity and
reduce the maintenance burden on the community when sweeping changes are
needed. The exterior role is built to be OSA compatible and may be pulled
into tree should we deem it necessary.

Change-Id: Ic46d7f9615a492a98abecc970b72413b727290ac
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-30 22:28:49 -05:00
Major Hayden 7500845aa8
Skip logging for haproxy health checks
The health check requests from haproxy cause uwsgi to write a
lot of useless log lines. This can make it more difficult to find
a problem with a particular service.

This patch adds a route to look for the `osa-haproxy-healthcheck`
user agent string, which haproxy uses when performing health checks.
Any requests with that user agent are not logged.

Closes-Bug: 1742718
Change-Id: I8b1bcd58fc0bea95ee0103901eb8f83b480b50ef
2018-02-23 08:42:46 -06:00
Jean-Philippe Evrard 294df3bb56 Remove CloudWatch API
It has been removed upstream, so we follow the trend.

Change-Id: Ic377c5dc8e4941b1a96516c99dcf8166cfe688f0
2018-02-16 10:06:35 +00:00
Jesse Pretorius 9c1eab0d44 Update paste, policy and rootwrap configurations 2017-12-19
Change-Id: I8d09747111a05fa991701d87a308ad41a269528c
2017-12-19 21:10:36 +00:00
Jimmy McCrory d9b4966128 Add MySQL connection SSL support
When 'heat_galera_use_ssl' is True, use an encrypted connection to
the database using either a self-signed or user-provided CA certificate.

A new non-voting test has been added to verify that the role remains
functional when enabling SSL features.

Change-Id: I8d582a5fe18b33592461f3ea23551c97720b8e7d
Partial-Bug: 1667789
2017-12-14 09:37:55 -08:00
Jean-Philippe Evrard 8fcd291977 Update static files
This patch updates the role static files in tree

Change-Id: Iddd0cbb19b0d6a2f231d56137de6be57ec396aed
2017-12-07 08:12:17 +00:00
ZhongShengping bff87d973c Fix ssl
The value of ssl is {{ heat_rabbitmq_use_ssl }}, so fix it.

Change-Id: I644e6393a9253f9f315c4c8d5ff0fe88006095a0
2017-09-18 11:04:30 +08:00
Major Hayden 2b5fe2ef79 Implement uWSGI for heat api services
As part of the Pike goals we are moving api services to run as WSGI
apps. heat-api, heat-api-cfn, and heat-api-cloudwatch are now set
up as WSGI apps.

Since this is just a drop in replacement for existing eventlet services,
operators and deployers should not notice a difference.

Change-Id: I3dba17c33a7f1a1b9a03020a650e258099b4d20d
Implements: blueprint goal-deploy-api-in-wsgi
2017-08-03 13:45:55 +01:00
Jesse Pretorius f7de00cadd Optimise role execution
In order to optimise the role execution and
to improve consistency, the following is done:

1. The services dict is filtered per host to
   prevent skipped tasks from spamming the
   logs and wasting execution time.
2. The service restart is implemented in a
   specific order to improve consistency. The
   order implemented is a wild guess as there
   is no upstream documentation about the
   'correct' order.
3. The service enable/start is consolidated
   into the handler to be more efficient.
4. A dynamic include is used instead of nesting
   includes for the init prep.

Change-Id: I91d20b980f1b1a63ff2d6ef30bcec7ef58a5571a
2017-07-10 13:08:21 +01:00
ZhongShengping 972e8b515a Deprecate rpc_backend option
Option "rpc_backend" from group "DEFAULT" is deprecated for removal
(Replaced by [DEFAULT]/transport_url). Its value may be silently
ignored in the future.

Change-Id: I77bb1e7f9513593cecf2ca95b9e2fa91e251b483
Implements: blueprint deprecate-rpc-backend
2017-06-09 07:50:17 +00:00
ZhongShengping 7eb889131d Deprecate profiler_enabled option
Option "profiler_enabled" from group "profiler" is deprecated.
Use option "enabled" from group "profiler".

Change-Id: Id309d21966e6aefae3e0a96581547f9551314faa
Closes-Bug: #1694892
2017-06-01 11:56:34 +08:00
Andy McCrae 3a6a6fbf14 Update paste, policy and rootwrap configurations 2017-05-26
Change-Id: I08d2152d7014343b663535938b74247bf591245a
2017-05-26 14:10:58 +01:00
ZhongShengping a3c55be447 Deprecate rabbit_use_ssl option
Option "rabbit_use_ssl" from group "oslo_messaging_rabbit" is deprecated.
Use option "ssl" from group "oslo_messaging_rabbit".

Change-Id: I14394257d5a04329ecd137c0f7e6c0f58d0cfa78
Implements: blueprint deprecate-rabbit-use-ssl
2017-05-23 10:23:15 +08:00
Jesse Pretorius 534942a79e Reduce init restart/kill times
The systemd unit 'TimeoutSec' value which controls the time
between sending a SIGTERM signal and a SIGKILL signal when
stopping or restarting the service has been reduced from 300
seconds to 120 seconds. This provides 2 minutes for long-lived
sessions to drain while preventing new ones from starting
before a restart or a stop.

The 'RestartSec' value which controls the time between the
service stop and start when restarting has been reduced from
150 seconds to 2 seconds to make the restart happen faster.

These values can be adjusted by using the *_init_config_overrides
variables which use the config_template task to change template
defaults.

Change-Id: I00bb78d822cc38792aa361e3d2854dfd3ce3ae05
2017-04-26 13:04:10 +00:00
Kevin Carter 07d59ddb75
Ensure the components are isolated from the system
This creates a specific slice which all OpenStack services will operate
from. By creating an independent slice these components will be governed
away from the system slice allowing us to better optimise resource
consumption.

See the following for more information on slices:

* https://www.freedesktop.org/software/systemd/man/systemd.slice.html

See for following for more information on resource controls:

* https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html

Tools like ``systemd-cgtop`` and ``systemd-cgls`` will now give us
insight into specific processes, process groups, and resouce consumption
in ways that we've not had access to before. To enable some of this reporting
the accounting options have been added to the [Service] section of the unit
file.

Change-Id: I059e2027fb872f9cd2cf1f5e2f17cf02c4e536c8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-28 23:32:57 -05:00
Chris Hultin 92e38306e9 Setting SoftwareConfig Defaults
Setting the default SoftwareConfig Tranport method
and the default Signaling method to use Heat.

Closes-Bug: #1667471
Change-Id: Ic035794e00f02409ce081cafc17c3f42c75d57d6
2017-02-23 20:33:46 +00:00
Ravi Gummadi 3d16c31779 Cap the number of worker threads
Users can configure the number of worker threads however when it's
not specified the calculated number of workers can get too large on
hosts with a large number of CPUs.

Change-Id: Ie4fae6e015a58399cb8656e88d6b9aa514ecaa5d
2017-02-23 01:51:36 -05:00
Andy McCrae 01b50d316f Update paste, policy and rootwrap configurations 2017-01-19
Change-Id: Ic8254f944c2f7f8eca04b9c55ce76d2d480f2c22
2017-01-19 14:42:26 +00:00
Kyle L. Henderson 4033a0f854 Enable oslo_middleware proxy header parsing
Heat has moved to using oslo_middleware for the http proxy header
parsing, however the default is to not parse the headers.  When
the external protocol differs from the internal protocol this
parsing is required in order for heat to work properly since it
will return 302 redirects to the client during some operations
(such as delete stack).

An example of this is when using haproxy with https configured
for the external protocol and http for the internal protocol.
If the oslo_middleware does not parse the headers, then any
302 redirects would specify a url with http rather than
correctly specifying https and the heat client would fail to
connect on the redirect url.

Change-Id: I0a331a0e766a77c8c8fed3fd22f0b36f2a5a9e5a
Closes-bug: #1654874
2017-01-09 10:01:12 -06:00
ZhongShengping 7743b54f7a Remove pki support
Change-Id: I3db31b13d659464d2ae8c6ab37ac945301317d09
Implements: blueprint remove-pki
2016-12-29 11:27:24 +08:00
Andy McCrae f49e0a88a5 Update paste, policy and rootwrap configurations 2016-12-23
Change-Id: I9e85b3da953880e2897d6bfaae808857b72292db
2016-12-23 09:34:16 +00:00
Jenkins 3263c1ddce Merge "Add variable to control cinder backups" 2016-12-19 16:37:57 +00:00
Andy McCrae b77c406c69 Remove Trusty support from os_heat role
Change-Id: If665515b30bfbd6b618c70357963df28d3d7de54
Implements: blueprint trusty-removal
2016-12-15 13:17:58 +00:00
Major Hayden 6497309af8 Add variable to control cinder backups
Heat has a `backups_enabled` configuration parameter that controls
whether heat will attempt to use cinder's backup service:

  https://review.openstack.org/#/c/332851/

By default, this feature is enabled in heat, but heat doesn't have
any idea if the feature is enabled in cinder. If the backup service
is disabled in cinder but enabled in heat, deployers may create
undeletable stacks.

This patch adds a new variable, `heat_cinder_backups_enabled` that
controls heat's ability to use cinder's backup service. It is
disabled by default (to match the backup service configuration in
the cinder role, which is also disabled by default).

Closes-Bug: 1650035
Change-Id: I3875cc34ec92ba588d995a6d9c0341977a408ad7
2016-12-14 16:04:19 -06:00
Andy McCrae bcf5e2c4da Update paste, policy and rootwrap configurations 2016-12-10
Change-Id: Ia3e10c4cc53df9925c353393115f0149a6781f6f
2016-12-10 13:10:55 +00:00
Andy McCrae 543a127301 Update paste, policy and rootwrap configurations 2016-11-18
Change-Id: I070605c520fc118557e50b938032b713df7c597d
2016-11-18 09:16:25 +00:00