Commit Graph

141 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov e32db7ae75 Add online_data_migrations for placement
According to the placement upgrade process, online_data_migrations
should be triggered right after upgrading database schema
and placement services on all controller nodes [1]

We also replace usage of  `need_service_restart` local fact
with `need_online_data_migrations` as first one is never actually used.

[1] https://docs.openstack.org/placement/latest/cli/placement-manage.html#placement-database

Change-Id: I430ea45fe321440d832a0a90747b80f5d197f073
2023-09-05 08:19:40 +02:00
Zuul 8dc0edec53 Merge "Fix linters and metadata" 2023-08-28 14:59:33 +00:00
Dmitriy Rabotyagov 87ca7b41e3 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/openstack-ansible/+/891474
Change-Id: I315c7fa58ee07786832d21c13f281968ee3d400a
2023-08-22 07:44:31 +00:00
Dmitriy Rabotyagov 88218e77c9 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: I6746406488c372d5e31350ec8092af8cef027657
2023-07-31 15:37:05 +02:00
Damian Dabrowski 30b4098fd2 Add TLS support to placement backends
By overriding the variable `placement_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the placement 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: Id84137b624624482939989098f1b04263d62c0fd
2023-04-29 18:43:16 +02:00
Dmitriy Rabotyagov 5ad5bc1d84 Ensure service is restarted on unit file changes
At the moment we don't restart services if systemd unit file is changed.

We knowingly prevent systemd_service role handlers to execute
by providing `state: started` as otherwise service will be restarted twice.
With that now  we ensure that role handlers will also listen for systemd
unit changes.

Change-Id: Iaa2f286fa25412a1ed8c72c0b62bacd3ac50f125
2023-04-11 12:41:51 +02:00
OpenStack Release Bot 250411c408 Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: Ia8d85d04b427fda33b8dbde917c5b42d1a277a10
2022-12-13 13:19:25 +00:00
Dmitriy Rabotyagov 6084c248fc Install git into placement containers
If venv_wheel_build_enable is defined to False, placement will fail to
clone and install repositories due to missing git binary.

Change-Id: If1e3eec0c558d1472da7bc3a4e87825e36ba4fdc
Related-Bug: #1989506
2022-09-24 02:25:46 +00:00
Erik Berg 39f3c1f016 Remove redundant vars line
This line has been here since the initial commit
Iaa11a8cc4d945712b62c3b9c2cb6ad168def34eb, but should already
be covered by the distribution_major_version line above.

Change-Id: Ia6b77dd8cd70e099e9b287625ab3320b1986f599
2022-09-14 13:04:41 +02:00
Zuul 6239b64f3c Merge "Support service tokens" 2022-06-16 19:58:37 +00:00
Dmitriy Rabotyagov 242e17c230 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: I4e9fff59bbfa9c8a1ae0236d077ac9ee2881c04b
Related-Bug: #1948456
2022-06-16 10:48:52 +00:00
Dmitriy Rabotyagov 240cd95c59 Remove mention of haproxy-endpoints role
Role was never migrated to usage of haproxy-endpoints role
and included task was used instead the whole time.
With that to reduce complexity and to have unified approach, all mention
of the role and handler are removed from the code.

Change-Id: I4614e0249d65fda1762c6d31d93b3b77babb290e
2022-06-14 18:02:21 +00:00
Dmitriy Rabotyagov 025824434b Switch sphinx language to en
With sphinx release of 5.0.0, they changed default for language variable
to 'en' from None. With that current None valuable is not valid and should
not be used.


Change-Id: If134334692ceb392f5a3704415ea4bb6cdeeb85f
2022-05-30 16:01:40 +02:00
Zuul ba338055bb Merge "Use common service setup tasks from a collection rather than in-role" 2022-05-05 17:51:09 +00:00
Marc Gariepy d419e6c003 Use common service setup tasks from a collection rather than in-role
Change-Id: I6d6831e5760c040cc46e4493b79b3aee58fbbb08
2022-05-05 09:53:33 -04:00
Jonathan Rosser 68894c47e1 Fix incorrect ansible tag
Change-Id: I5ed7d7a41e81243d6ad2dd7a4300cf772ed0ac7f
2022-05-05 10:34:34 +01:00
OpenStack Proposal Bot 0cd8b34485 Updated from OpenStack Ansible Tests
Change-Id: Ia706e01ce1372f7e667d816dcf9ce7f0cc949b44
2022-04-04 09:06:44 +00:00
Jonathan Rosser 9d37212db1 Cleanup setup.py config
Change-Id: Iaaeb1aec3c73686ced9e4d3fd7094696d1ca8c87
2022-04-04 10:05:37 +01:00
Zuul ff56a9050f Merge "Move system_crontab_coordination role to collection" 2022-01-17 16:33:35 +00:00
Dmitriy Rabotyagov 70ca4629ef Move system_crontab_coordination role to collection
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/824590
Change-Id: I5d02a3ddabf5a22d8e954e9c5e843a38c078a547
2022-01-13 17:15:14 +02:00
Jonathan Rosser ee909497f2 Refactor use of include_vars
Use a first_found lookup instead of a with_first_found loop so that
the 'paths' parameter can be used.

This ensures that only vars from the role are included, and not vars
from a parent calling role. This can happen when a parent role has
a higher priority vars file available for inclusion than the role
it calls.

Change-Id: If58b7e10f39affe2f34af9e9503bc1f90caa4b0e
2022-01-12 08:14:32 +00:00
Damian Dabrowski ed4f061d50 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: I77b4e8c70a21eada431c824044c0d1563df70dcc
2021-12-03 11:41:34 +01:00
Dmitriy Rabotyagov f8e279cc3d Use config_template as a collection
Since we still use ceph-ansible that has their own implementation of
config_template module it's worth to use mentioned module as a collection
explicitly.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819814



Change-Id: I374d125994239a885007081d0490e4a2c7018235
2021-11-30 15:17:24 +02:00
Dmitriy Rabotyagov ad9f7c87cb 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: Ie6e82e625808c64d44e603843ec985daf18efca4
2021-09-20 09:52:35 +00:00
likui cb9fc915db Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I4765340f01bd4969cf8cd2d3f949219ad93c3f79
2021-07-03 21:22:01 +08:00
likui 5fab204977 These should be indented four spaces to match the other things in this block
Change-Id: Ic5e1af250513b896e7f23a3bdc14dc1dd1aa2e3a
2021-06-03 16:21:10 +08:00
Dmitriy Rabotyagov a8f9bf811e Replace linters test with integarted one
We've created integrated linters check job a while back and it's successfully
working for several releases. At the moment we experience difficulties
with future maintenance of the linters check from the openstack-ansible-tests
repo. So instead of fixing current one, we replace it with modern version of
the test.


Change-Id: I0bfe5fdf3694232108e52b3bccfba950a2ecf15b
2021-05-21 15:53:28 +03:00
Dmitriy Rabotyagov 0dfcbc27ec Allow to override placement policy files
We implement `placement_policy_overrides` variable in order to allow
management of placement policy files when needed.

Change-Id: If219ac80ceed2bf455a7de83b848c9d0a66371a4
2021-03-28 18:15:21 +00:00
Jonathan Rosser 585aa86dbb Convert remaining ansible_ fact variables to ansible_facts[]
Change-Id: I3700a15c42d902f8835301208bd6f51f8ac20231
2021-03-16 08:15:23 +00:00
OpenStack Proposal Bot 66f56de749 Updated from OpenStack Ansible Tests
Change-Id: Ie542c518435ae89855295bc9cbd2bdf03ac808e5
2021-03-12 22:20:49 +00:00
Zuul 33ad9aec7c Merge "Remove references to unsupported operating systems" 2021-03-11 10:03:57 +00:00
Zuul 18c31ef0cc Merge "Switch default virtualenv to python3" 2021-03-10 16:19:44 +00:00
Jonathan Rosser 60938dca24 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: I58b9cec20349c722631e5934c44efb54153daab7
2021-03-10 13:30:09 +00:00
Jonathan Rosser 18b6e16bae Switch default virtualenv to python3
Change-Id: I9f06225c6a17545683e8bf1113ea0b014745610a
2021-03-10 08:43:13 +00:00
Jonathan Rosser 3fcf510959 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I2197cf5a9a19e6af0912f21dcc12cd7551dc2e85
2021-02-23 18:06:48 +00:00
Zuul b58217c787 Merge "Move placement pip package from a constraint to a requirement" 2021-02-05 21:08:14 +00:00
dmitriy fb5101f7ea [reno] Stop publishing release notes
Since we copy all release notes to the integrated repo there is not need
in publishing release notes for each repository. We should only verify their
validity and linting.


Change-Id: I6b2d4f0cb4686e1606b8f6256e0dbd501c688cf3
2021-01-22 18:27:19 +02:00
Jonathan Rosser 044852c1be Move placement 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: I00b42c61d03c83bfbfec69ad3bd47d940bb449d2
2021-01-18 16:39:05 +00:00
Zuul a12e134c1c Merge "Use global service variables" 2021-01-11 10:54:45 +00:00
Dmitriy Rabotyagov ea6a8d38b2 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: I5b8a03d96375d67c8090af182d244495fd0a7f67
2021-01-08 18:12:51 +02:00
Dmitriy Rabotyagov bf42c4a403 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: I1dbbfc82f24732f8534594ff25aefc03e5c4003c
2020-11-30 14:20:14 +02:00
zhoulinhui 2afa08eb9b Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I4d5d459737c0004b857f90df581ff15afda3dc43
2020-11-10 13:12:01 +08:00
OpenStack Proposal Bot 03491ef4dc Updated from OpenStack Ansible Tests
Change-Id: I75756a4b78bc7c906278c3d316aaba1575a05116
2020-10-19 09:20:47 +00:00
Dmitriy Rabotyagov a53fa6743d Trigger service restart
We need to trigger restart of the service once config is changed

Change-Id: I9417f519ba272a8a2ebe08e71311cba27220c4cc
2020-10-08 18:05:17 +03:00
Zuul 3dde9765af Merge "Remove support for lxc2 config keys" 2020-10-06 15:28:48 +00:00
Zuul 7e1867dfe0 Merge "Updated from OpenStack Ansible Tests" 2020-10-06 14:44:30 +00:00
Jonathan Rosser 5c2288bb09 Remove support for lxc2 config keys
Change-Id: I1eedc024a173a5fba605e39fa2065f6d4f41be64
2020-10-06 11:46:00 +01:00
Jonathan Rosser 44b36a2e34 Fix linter errors
Change-Id: I6b377208897e30d7133d60c40626d7078cd4e661
2020-10-01 16:54:28 +01:00
OpenStack Proposal Bot 668a20db62 Updated from OpenStack Ansible Tests
Change-Id: I7853cfedce34a81e711729e95bf91d2b2313af40
2020-10-01 14:31:46 +00:00
Dmitriy Rabotyagov 2bcd1ac750 Define condition for the first play host one time
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.

Change-Id: If086478f8ea9a0ffb763fd05d6a110e1c12f32b3
2020-09-25 17:54:07 +03:00