Commit Graph

17 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
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 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
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
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 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
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
Dmitriy Rabotyagov 5bf27c4653 Add Centos-8 support
Change-Id: I36a0de736e266f53be1be02c4b07e741b46c819e
2020-06-16 13:58:15 +03:00
Ralf Haferkamp a2223ab1ea Fix distro install on openSUSE
With Train openSUSE is switching the openstack packages to use Python 3.
This means that we need to use the python3 variants of python-module
packages.

Depends-On: https://review.opendev.org/683120
Change-Id: I7b30e575720df62a6e2eaf5f865be56c9de09972
2019-09-19 14:13:32 +02:00
Dmitriy Rabotyagov 0195d269b7 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: Ied4b59787e9707bc886c7bcba8f4ac50865edcb9
2019-09-02 16:02:56 +03:00
Dmitriy Rabotyagov ab692dbc56 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: Ib24a5c96359c349781c48a5d82d7c64e793b8e43
2019-07-17 00:16:26 +03:00
Dirk Mueller 259099f208 Fix aio_distro_metal jobs for openSUSE
Package list was missing the placement-api dependency.

Change-Id: Iace7d8c0342e745b54a1a17dbeb349cf3217bc3e
2019-06-27 11:42:55 +02:00
Jimmy McCrory bbae385394 Add Debian placement_service_distro_packages list
Add the list of distro packages to install for distro based installs on
debian/ubuntu systems and ensure that the python3 plugin is used by uwsgi.

Also set the 'placement_uwsgi_bin' var for each OS distribution.

Change-Id: I6cb2093b3577392c1fd7e3769a4b7cb27c18e0a7
2019-06-03 16:41:46 -07:00
Mohammed Naser ac2fd2f824 [redhat] Update variables to be version agnostic
The RedHat-based operating systems such as CentOS have a pretty
stable list of packages, therefore, we don't need to pin it by
version and we can instead move to a much more generic redhat.yml
which will support a bigger range of systems.

Change-Id: Id058d7003fa5d7cb9fb564ddb8e249860179e73a
2019-05-10 01:07:49 -04:00
Jonathan Rosser ceafdb0e69 Ensure libxml2 is present as a library for uwsgi
Change-Id: I1ee165b06fe6c6a840784565a7a661b11bf9ebff
2019-05-04 07:28:58 -06:00
Guilherme Steinmüller d2a566a3aa debian: add support
This patch adds the Debian jobs for this role to make sure
it's always passing as well as updates the meta to reflect
it's support of Debian accordingly.

Change-Id: I4a91a49c5b190344512e8b64da3bccfb7416357c
2019-04-08 22:40:47 +00:00
Guilherme Steinmüller 32c1eb8488 Add initial placement role
This patch adds the support for the placement service with
a simple functional test which hits the API (which in turn
hits the database and keystone for authorization).

Depends-On: I878e8c479d8963b339b5e1f6031f649c0f87082f
Change-Id: Iaa11a8cc4d945712b62c3b9c2cb6ad168def34eb
2019-02-06 15:47:53 -05:00