Commit Graph

163 Commits

Author SHA1 Message Date
Zuul 24648387cc Merge "Add quorum queues support for service" 2023-09-04 12:43:30 +00:00
Zuul 5f6e86a7da Merge "Fix linters and metadata" 2023-08-14 10:48:17 +00:00
Dmitriy Rabotyagov 8413941eaa Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: I671cc35a055b35fb249ad3054c45ec65f2b54ab4
2023-07-14 12:58:19 +00:00
Simon Hensel 3c014fb2b6 Reduce memory consumption in Cinder services
This patch reduces memory usage for Cinder Volume and Backup services by
tuning glibc.

The specific tuning consist on disabling the per thread arenas and
disabling dynamic thresholds.

This is the equivalent of the devstack proposed patch from Change-Id
Ic9030d01468b3189350f83b04a8d1d346c489d3c

Related-bug: #1908805
Change-Id: I066ee76fe0cef9443f9e9f1ed3c8062d6c6f8566
2023-07-10 11:35:06 +02:00
Dmitriy Rabotyagov af229369fb 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/+/875399
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/873618
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_glance/+/873632
Change-Id: I9e1f87fd2c396eb4b48459c3055b43678fae296a
2023-07-06 12:56:08 +00:00
Dmitriy Rabotyagov f16036e1f1 Add way to periodically trim Cinder DB
We're adding a service that is responsible for executing db purge.
Service will be deployed by default, but left
stopped/disabled. This way we allow deployers to enable/disable
feature by changing value of cinder_purge_deleted.

Otherwise, when variables set to true once, setting them back to false
won't lead to stopping of DB trimming , so timer would need to be
stopped manually.

Change-Id: Ic5ae8c778bff2858fcb31c85d4b910805e452c3f
2023-05-18 08:10:21 +00:00
Damian Dabrowski 2de5a8a1a0 Add TLS support to cinder backends
By overriding the variable `cinder_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the cinder backend api.

The ansible-role-pki is used to generate the required TLS
certificates if this functionality is enabled.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/879085
Change-Id: Ib682499e900071db38cc2fd7c30822d0c33dba38
2023-04-29 18:36:09 +02:00
Dmitriy Rabotyagov 789d14de9d Add coordination support
This patch adds configuration for coordination service when cinder
active/active setup is used and coordination hosts exist

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/864750
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/865805
Change-Id: I2dda4c74aa69aea3ecea92954922dbfe1bd56687
2022-11-28 09:05:04 +00:00
Zuul 5fadeff98b Merge "Support service tokens" 2022-06-16 12:28:01 +00:00
Dmitriy Rabotyagov f755eadadf 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: I1d0156a2ad829aa730419e1d9dfa1cd49026a6be
Related-Bug: #1948456
2022-06-14 11:30:31 +02:00
Dmitriy Rabotyagov 9a8ea212c0 Forcefully remove Cinder v2 endpoints
Nowadays Cinder does not support v2 api so it makes sense to ensure
that these endpoints or service is not present in catalog.

Change-Id: I62a4ba182cc752a5bc4f6e8c4d2430f7e7aafe54
2022-06-14 11:16:07 +02:00
siavash sardari 66eb424de5 Add the ability to disable send_actions option in cinder-volume-usage-audit service.
Change-Id: I351279dab0d90e60573df7db4c80b63320dff787
Closes-Bug: #1968734
2022-04-13 16:06:34 +04:30
Andrew Bonney 6efa45e2bd Add configuration option for heartbeat_in_pthread
This configuration option has been observed to result in file
descriptor leaks in certain circumstances. A variable is added
here so that it can be easily overridden.

Related-Bug: #1961603
Change-Id: I8155264b181d6f21728804ef8260979931597427
2022-03-15 10:52:22 +00:00
Damian Dabrowski 210cfc5f8f 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: Ib445e0ddd01d52314e50ca6edd2fa20e5f6ef3eb
2021-12-03 11:40:36 +01:00
Dmitriy Rabotyagov 3370ad8e03 Refactor definition of lock path
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819300
Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/819298
Change-Id: I674aa11ecfec2a2bc7bbc84865f9ec5f4a872ebe
2021-11-25 12:13:31 +00:00
Zuul 206bd0003f Merge "Refactor galera_use_ssl behaviour" 2021-10-06 11:20:52 +00:00
Dmitriy Rabotyagov 9e37558593 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: Ieab4ab2e36e4953961841be334ff16162f7daeb8
2021-09-20 12:55:31 +03:00
Dmitriy Rabotyagov 2cf00fc134 Use management_address by default
management_address is defined in group vars and by default set to
container_address which is valid default

Change-Id: Ib9373ba7d09845ad0fc5c8578db18ffd87e48b20
Related-Bug: #1941068
2021-08-25 16:02:40 +03:00
Dmitriy Rabotyagov 71eb6c4c10 Disable Cinder v2 API
Cinder v2 API has been deprecated in Pike and it make sense to
disable it's creation by default. Doing this we also will drop catalog
records and service during upgrade

Change-Id: I11986bfe6d2af5e671b7008a71a58538d0576336
2021-05-28 11:22:02 +03:00
Jonathan Rosser a0d9137b53 Add variables for rabbitmq ssl configuration
Change-Id: I3cafb6197d944337299152273bba7494ff0edcfe
2021-05-13 14:39:17 +00:00
Zuul cca138b46c Merge "Convert remaining ansible_ fact variables to ansible_facts[]" 2021-03-16 15:46:21 +00:00
Jonathan Rosser 4dc4a0a266 Convert remaining ansible_ fact variables to ansible_facts[]
Change-Id: Ib6ff10d45f679ab318e8398ebc110187d4570b3e
2021-03-16 08:01:14 +00:00
Zuul b77da2eed1 Merge "Remove references to unsupported operating systems" 2021-03-10 17:23:06 +00:00
Jonathan Rosser 13ac3d38ee Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: I796d9de164a8b79eff8a615442dd46e7de2353e7
2021-03-10 12:16:37 +00:00
Jonathan Rosser eae837413f Switch default virtualenv to python3
Change-Id: Ifb3b2f46d94cac6bc1a37933fd29593b560fe8e8
2021-03-10 08:40:26 +00:00
Jonathan Rosser a4653722ed Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I299e71fac6efdb89655bd36de72b95400d7000aa
2021-02-23 18:04:29 +00:00
Jonathan Rosser 6958079640 Move cinder pip package from a constraint to a requirement
This is necessary to support the new pip resolver.

Depends-On: I9be6bbf4a29a4da2ddf96dc0336bc2a7d8ec9281
Depends-On: I49c75dd11d6c4e8d37fe013b7ffdfd56ff193fcd
Change-Id: I2c4009fbdf524f2d54adf1d4a730604c123f72fd
2021-01-18 16:40:01 +00:00
Dmitriy Rabotyagov d9bfa963e8 Use global service variables
Instead of overriding each service separatelly it might make
sense for deployers to define some higher level variable that
will be used first or fallback to default variable.

Change-Id: If14b89d4c795ba7e129af6a2f4b4bcbc10208986
2021-01-05 19:09:06 +02:00
Dmitriy Rabotyagov 17b907078e Reduce number of processes on small systems
Even the most modest 4C/8T system would run with the maximum 16 processes
due to the calculation being VCPU*2.

We devide amount of CPUs to number of threads for hyperthreaded CPUs

Change-Id: I8a8f2ce0b1af980b2c300ffb82894608102aad2e
2020-10-27 19:50:11 +02:00
Zuul dbb1aaf434 Merge "Use cinder_service_setup_host for qos and types creation" 2020-09-21 08:55:51 +00:00
Dmitriy Rabotyagov e89b864065 Use cinder_service_setup_host for qos and types creation
Cinder api container may not have required binaries and clients in order
to add qos types and volume types. In the meanwhile
cinder_service_setup_host is supposed to have all necessary things for
the successful creation of the resources.

Change-Id: I97b50cfe3140d0a0f77f6e562cb144cb3d36bd12
2020-09-10 08:58:40 +00:00
Dmitriy Rabotyagov 6c68a55a9b Use the utility host for db setup tasks
Move it to the service setup host (defaults to utility[0]) instead
of the galera[0] host, and use galera_address (defaults to internal VIP)
as the endpoint instead of a local connection on the db host.

Change-Id: I37db6f6f474f2119bb5c29a21b1f6f78a016da83
2020-08-20 17:23:43 +03:00
Dmitriy Rabotyagov c6b9f011b7 Explicitly enable/disable active/active
As deployers may have usecases with several different backends being
served with the same cinder volume,
we should provide an option to easily override default behaviour

Change-Id: Idc9a71d722b7443cf1437c2d95f75c615b6035a4
2020-06-17 18:49:39 +03:00
Dmitriy Rabotyagov 31a892134d Cleanup after repo_build and pip_install retirement
Change-Id: I7649813882f5f00c8ba50989183d4e66340a0e06
2020-05-12 21:24:39 +03:00
Guilherme Steinmüller beb3d002dd 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: Ic83f6371c5d2bbed6a7d6d2f92a69fd3a2afd0d3
2020-03-13 22:16:10 +00:00
Dmitriy Rabotyagov 1d45ccefce Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.
Also we change upper constraints url due to [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Depends-On: https://review.opendev.org/693841/
Change-Id: Iafcaac9c1f67daf06dfca5a3a49e96b3bc72a11d
2019-11-14 16:22:15 +00:00
Jonathan Rosser 4988d5e83f Add global override for service bind address
Change-Id: Id6b8f289296ddfc5e09c18b21bee1f350d680fa8
2019-09-19 10:28:07 +01:00
Zuul 5681e2d2b5 Merge "Allow venv python interpreter to be overridden" 2019-09-10 05:18:45 +00:00
Jonathan Rosser b4c97cce66 Allow venv python interpreter to be overridden
Change-Id: Ifae8209a6e9354dcee551209958ce89687b01709
2019-09-05 13:15:00 +01:00
Dmitriy Rabotyagov ee018d9083 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.

Depends-On: https://review.opendev.org/678025/
Change-Id: Ieac6d03a436f6b706d7f12e292ffc98171a43246
2019-09-04 15:34:37 +03:00
Jan Marquardt ce7a0bdb61 Fixed typo in cinder_glance_api_servers endpoint
Change-Id: I0575d2adabec8a4bd02d0a7583f51589114832a9
2019-07-08 16:57:30 +00:00
Zuul a12d7a5541 Merge "Replace usage of netloc filters to urlsplit" 2019-04-12 10:11:13 +00:00
Georgina Shippey 784494a459 Replace usage of netloc filters to urlsplit
Removed the reference to netorigin as it will be taken out from openstack-ansible-plugins
Now using ansible 2.4's urlsplit filter as a replacement.

Change-Id: I36ecd276ff1e4c16a7728658e8821bae1615916c
Related-Bug: #1820830
2019-04-08 16:55:44 +01:00
Jean-Philippe Evrard e16a5f1146 Clarify the worker counts
This is far more complex than what it should be.

Change-Id: Ida97d3ceefa8cd7bb213b1d347d1cce6d0c4af7a
2019-04-05 15:37:14 +02:00
Mohammed Naser 02d49dc578 Update role for new source build process
The variables barbican_developer_mode and barbican_venv_download
no longer carry any meaning. This review changes glance to
do the equivalent of what developer_mode was all the time,
meaning that it always builds the venv and never requires
the repo server, but it will use a repo server when available.

As part of this, we move the source build out of its own file
because it's now a single task to include the venv build role.
This is just to make it easier to follow the code.

Depends-On: https://review.openstack.org/647813
Change-Id: Ia3c69c1f8a9487481e1275875701cf3d77c2d231
2019-03-26 15:43:00 -04:00
Jakub Jursa 826627c937 Make devices filter in lvm.conf overridable
Change-Id: I2700028965bd89abaa342df91014874c94daf06c
2019-03-01 22:37:24 +00:00
Guilherme Steinmüller 5307714a8d Add cinder_user_pip_packages variable
With this variable, users would be able to extend
the list of pip packages in case of needing an
extra pip package.

Currently if we need an extra pip package we need
to override the existing list.

Change-Id: If7637ac750330822e7f5e3cae6a78315bc25031b
2019-02-20 17:33:59 +00:00
Kevin Carter f3f956e904 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: Ib3447cd5b0bcada4cdf82d9e4a9fe5160299f9c3
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
2019-01-19 18:02:51 -06:00
Dmitriy Rabotjagov 5e7e1a7ea9 Adds resource_filters.json distribution
Cinder supposes to see resource_filters.json in
/etc/cinder/resource_filters.json, but role doesn't distribute this file
It implements generalized filters, w/o which non-admins will
experience problems with some operations (i.e in horizon).

Closes-Bug: #1810537
Change-Id: I0f699c9869effc5ccc0d3f79422935975f698134
2019-01-08 16:19:00 +00:00
Jesse Pretorius 6bb1821b1d Enable overriding the service setup host python interpreter
In order to enable the service setup host python interpreter to
be changed easily, we make it a variable. This will be useful
when someone sets the service setup host to be the utility
container, because we'll be able to set this var by default.

Change-Id: I3e0034739c75ca72bad4b33819e774e5c85977ac
2018-11-30 14:46:23 +00:00