Commit Graph

57 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov e3c74d18e3 Adjust condition for availability_zone definition
We're checking if octavia_amp_availability_zone is defined, while the
variable is defined in defaults, so there is no clean way to undefine
the availability_zone except to use config overrides and define to
none.
So whe change condition in a way to allow empty value to be treated as
False which would result in availability_zone being undefined in the
config.

Change-Id: I86ffd71d6791dec700c381b695ab5a4bca8051a3
2023-11-07 19:11:02 +00:00
Dmitriy Rabotyagov c0783fcdf5 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.

Change-Id: I4781a0c23274b145970b3269e517c2a62497acc4
2023-10-20 12:34:55 +00:00
Dmitriy Rabotyagov 1ae94217ec 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: I94cc61d88b0ec54bde01477e8fba35e341afffa2
2023-08-17 14:57:08 +00:00
Dmitriy Rabotyagov 8499e1713e Switch default provider to amphorav2
Amphorav1 has been deprecated and is removed early at the
beginning of the 2023.2 cycle. With that Antelope is perfect time for
switching the default.

[1] 6c0515c988

Change-Id: I133f20a6d971832138708101e6a8380d23e75cf2
2023-04-24 16:16:20 +02:00
Zuul 21e174c25b Merge "Add coordination to octavia" 2022-12-12 15:34:04 +00:00
Dmitriy Rabotyagov aeb1dbf1dd Add coordination to octavia
This also enables usage of amphorav2 when coordination is
available.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-zookeeper/+/867049
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/867052
Change-Id: I1234d36c58da3f6754cda1951ee4cc49f979ae0c
2022-12-08 20:47:00 +00:00
Dmitriy Rabotyagov b08e95a972 Enable /healthcheck for Octavia API
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/864553
Change-Id: Ie7a6dd78d5af82a546e4d6a19ec5b256df8f64e6
2022-11-25 16:32:43 +00:00
Dmitriy Rabotyagov 87e78ee34c 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: I8cd6c47c64601089173671652a463ecc291d8ca1
2022-06-17 13:40:17 +00:00
Dmitriy Rabotyagov 757aecd58b Use PKI role for certificate generation
This patch replaces usage of role-specific tasks for managing
certificates to PKI role.

This will allow to unify certificates management with other services
along with simplify management of code.

However, this patch does not contain migration path, which should
be handled separately.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-pki/+/838713
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/843711
Change-Id: I96c6030722661eb7ffdb31ac75e09785871179d5
2022-06-02 08:31:07 +00:00
siavash sardari 3e10d40b10 Add flexability for octavia cinder variable.
Introduces 3 new variables cinder_default_availability_zone, octavia_cinder_volume_size and octavia_cinder_volume_type. using these variables, enables Octavia to use different Cinder configurations.

Change-Id: I8162e83d39075cd99c516b84c39ed868306283c3
2022-05-23 12:52:04 +04:30
Damian Dabrowski 6353f2f747 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: I7804ec93d6ec82249f4d81ccec3ab02c4bc8a233
2021-12-04 09:33:28 +02:00
Dmitriy Rabotyagov 3c77e661a3 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: I1a45575423b0c7664f9f6586028c6c2b50a2ada1
2021-09-21 17:08:05 +03:00
Zuul e64e815dd3 Merge "Add variables for rabbitmq ssl configuration" 2021-06-01 13:52:20 +00:00
Jonathan Rosser aa4655b8e2 Add variables for rabbitmq ssl configuration
Change-Id: Ifa8acd4f8edfa3816c3f63084aa6ff74d2c1e1c5
2021-05-17 11:41:10 +00:00
Dmitriy Rabotyagov e7b394dd58 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to replace policy.json to
policy.yaml and remove deprecated policy.json.

config_template has been choosen instead of the copy, since it can
properly handle content that has been lookuped.

We make a separate task not to restart service when it's not needed.

[1] https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/787199
Change-Id: Idd28e5df99bfcf51bad2b785be41221eb0fe5142
2021-04-20 13:37:42 +00:00
Marcus Klein 50b83c7927 Omit amp_ssh_access_allowed and remove amp_image_id options.
Octavia complains about option amp_ssh_access_allowed to be deprecated. See
https://docs.openstack.org/octavia/ussuri/configuration/configref.html#controller_worker.amp_ssh_access_allowed
The octavia_ssh_enabled OSA variable is instead used to either write the
amp_ssh_key_name configuration option or not.

The configuration option amp_image_id in Octavia is deprected and image tags
should be used instead. Therefore octavia_amp_image_id is removed.

Change-Id: Ibd5f3d2ca25f9bb880b0c535c59ef430bd1043be
2021-04-01 20:16:24 +02:00
Dmitriy Rabotyagov 78d204afb8 Use barbican for certificates storage
Octavia can do SSL termination only in case when barbican is available.
We should be able to add required configuration section only when barbican
is also present in inventory

Change-Id: Ie319fd02cdd60f8a8ac65f0508e9075f40839ae9
2021-03-01 17:51:50 +00:00
Satish Patel 1be636c5ab Removing spare_amphora_pool_size option
Victoria and future releases going to deprecate this option.
https://docs.openstack.org/octavia/latest/configuration/configref.html#house_keeping.spare_amphora_pool_size

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/765544
Change-Id: I99425c9b65c6327636a94c00b32545553a705611
2020-12-05 00:22:47 +00:00
Dmitriy Rabotyagov ac5fdd6b4f Update octavia messaging options
Some of the options we were configuring were dropped from upstream service
back in Stein with api v1. So we dropped removed options, renamed
deprecated ones and moved to the appropriate sections were applicable.
We also enable notifications conditionally now depending on the value of
the variable `octavia_ceilometer_enabled`.

Change-Id: Ia44da67bb7116122633117ae17794aa58236ef83
2020-12-02 17:00:54 +00:00
Dmitriy Rabotyagov 0df9a23a67 Cleanup octavia configuration
This drops unused or fully commented out sections out of octavia.conf.
Also we start using service_token_roles as current behavior has been
deprecated a while ago

Change-Id: I1b2fe1cc2c6330e68d1acfa1b50bf732f77e8255
2020-12-02 16:33:52 +02:00
Dmitriy Rabotyagov e00cb9c563 Drop octavia v1 api options
Octavia v1 options have been dropped from upstream on Train. They have
no effect nowadays so no reason to futher carry it's codebase

Change-Id: I1c8f9723ca2ac2b468725c2954adcdaff54dbdf0
2020-12-02 14:27:43 +00:00
Guilherme Steinmüller 677aff655b 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: Ifedee3b46a845b66d54279b5a35edd16faa80e05
2020-03-16 14:48:48 +00:00
Zuul ae5edf5593 Merge "Add cinder volume support" 2019-09-20 08:37:54 +00:00
Zuul 57a4f77e87 Merge "Octavia use barbican internalURL" 2019-09-19 20:45:31 +00:00
Maksim Malchuk aa45cb8310 Add cinder volume support
Since I8181ed696b9ab556e7741c08839d79167aff8350 were merged we need to add
support for the Cinder Volume here. By default this functionality is
disabled. To enable it change the option 'octavia_cinder_enabled' to True.
To override default settings use 'octavia_octavia_conf_overrides'.

Change-Id: Ib9015383d36fe47272e0a27408db89df83a4b38c
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2019-09-15 10:17:51 +03:00
Kourosh Vivan e22f1ee93f Octavia use barbican internalURL
OpenStack services communicate with each others using their internal
endpoint. Octavia was using barbican public endpoint, it may cause issue
when creating a TLS termination LB when public endpoint have not a
proper certificat.

Closes-Bug: 1843769
Change-Id: I8d30368d3e4c94161988f8db5861c12030f0120f
2019-09-12 17:13:41 +02:00
Dmitriy Rabotyagov 333e6f1fc7 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: Iaeb10f2e3018f8b19d47d5a557e6fc7beb0fb9cf
2019-09-05 15:26:52 +03:00
Dmitriy Rabotyagov 048a43bd81 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.

Depends-On: https://review.opendev.org/670824/
Change-Id: I8cfdd46a57a91ef3b1879bf85b03cced74234451
2019-07-17 00:18:58 +03:00
Vadim Kuznetsov 6aa925e792 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: I7eb1cbe2c80ee889d2ae08dcfed6a19cc1bd3415
Depends-On: Ide70b5d8f67d8c8a87e3f16671f0f7fb72338b89
Depends-On: I8de48eb1fb4c8d321098ca54b9e21270edc7ac87
Depends-On: Ia5fda5d417b79189d048c8891b84d57331df1404
Implements: blueprint openstack-distribution-packages
2019-06-28 07:11:21 +00:00
Mohammed Naser 376ddeb48f 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 changet  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.

In addition, it re-orders some tasks for consistency with other roles.

Change-Id: I124873a6ab96aa95f886ce146d28e7340c90d40d
2018-10-25 09:03:55 +00:00
German Eichberger bc1f010b2f Increase Amp Active timeout for tests
We have seen gate tests recently fail on the amp going active in
nova. This doubles the timeout.

Change-Id: Ibd805890645d8c3ba1afeab47104a393a9ab1da2
2018-08-19 19:33:53 +00:00
Zuul b5f369f91c Merge "Adds the issuer to the CAs" 2018-06-26 00:44:14 +00:00
German Eichberger fbda283da8 Adds the issuer to the CAs
Octavia is using certificate authorities to manage
the amp communication but the built-in ansible
certificate commands can't generate proper CA
certificates (they omit the necessary X509 extensions)
nor properly sign CSRs and reference the CA.

The changes here replace the parts where ansible's
certificate commands fall short with running the
openssl command directly. To do so it sets up
the necessary files, directories, and templates
an openssl config file.

Once ansible's certificate capabilities improve we
can retire those commands.

Also improve tests so we gate when this fails.

Change-Id: Iaae462844d783bd6086ce6a2816ea01cafc14e6d
2018-06-22 08:46:14 -07:00
Andrew Smith 1ee708ffb6 Update to use oslo.messaging services 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 octavia service.

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

Change-Id: Ibfd9b5325bf89414439a1a516d1bbde0896904b5
2018-06-12 13:21:33 -04:00
melissaml 8db8f6c899 Update auth_uri option to www_authenticate_uri
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: I4c99449f591dc67f0f5aa906426ea34e944ab2c7
2018-04-17 05:05:06 +08:00
ZhongShengping 303318a1cb 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: Ifcc589a006e79d9256993377ec8ab2af9b1326df
Implements: blueprint deprecate-auth-uri-option
2018-04-03 14:16:53 +08:00
Michael Johnson b1d02c6ba9 Update systemd service for longer TimeoutStopSec
This patch updates the default systemd service definition for the Octavia
processes. It increases the TimeoutStopSec to 300 seconds to allow more time
for the in-flight flows (failover, etc.) to finish and gracefully shutdown.
If the cloud has performance issues, flows may run beyond their normal
sub-minute runtime.

Change-Id: I5708c05db2c9f13491f5af0cd0b8c5632c537608
2018-03-20 16:54:17 -07:00
Major Hayden e4d5cd0da7
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: I9b0239a9a24861734badbe874dc3e1139d7100c6
2018-02-23 08:44:38 -06:00
Jimmy McCrory 8cc05a3d00 Add MySQL connection SSL support
When 'octavia_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: I7a43d313474e17d7e968a5a9510368e3abdf6682
Partial-Bug: 1667789
2017-12-15 08:11:34 -08:00
German Eichberger 03767ae49c Create Octavia policy roles and legacy admin-owner rules
Octavia has introduced new roles for more granular access policies.
This will create those keystone roles and if the legacy parameter
is set create admin or user rules which are similar what Neutron
allowed before.

Change-Id: I2d6b7278d7d4af2669cba7ac760dae0bc8e6f183
2017-11-28 23:15:51 +00:00
German Eichberger 6f7128bb44 Improve event streaming with a better Octavia verison
In a newer Octavia version we can specify the transport_url for
the event streamer which listens on the neutron rabbit vhost.
This configures that and also enables provisonal status streaming by
default.

Depends-On: I00422b93d3ecfb672e967c2019424b64bc44ba66

Change-Id: I8bee145d5517c66c95bb24ba62cf6f7ed497df2d
2017-10-30 17:31:46 +00:00
Jason Niesz 13fab6ef91 Remove lb_network_name from config (it was bogus)
As a followup to I147abdd8d3d95164168ec606f5b92401cb24d1fe,
remove this bogus config option, it was deprecated since Newton.

Change-Id: I9f3c39b4a16b7f0d45ec1c212c68499aeeb90e27
2017-09-07 09:01:01 +08:00
Jacky Hu 5648b37321 Add blank line to avoid malformed jinja2 template
Without a blank line between jinja2 interpolation and comment, it would
generate wrong config file which results the following warning:

2017-08-28 07:13:30.321 6880 WARNING stevedore.named [-] Could not load
queue_event_streamer# Enable provisioning status sync with neutron db

Change-Id: I0d16b0a23ed6ebf1f90e3a2f8b6ad4730087915a
2017-09-04 13:28:43 +00:00
Jenkins cbee9e6486 Merge "Option to enable provisioning status to be sync with neutron db" 2017-08-15 21:45:21 +00:00
German Eichberger 072bf2c64d Enable V2 Octavia API (Experimental)
For Pike Octavia gains a way to run independent of Neutron with the
new V2 API. This adds an (experiemntal) switch to enable this which
defaults to False.

Change-Id: I009ea4feb7aecda861701af277122001c9bf4500
2017-08-10 21:08:37 +00:00
Santhosh Fernandes 954ba63a31 Option to enable provisioning status to be sync with neutron db
Change-Id: Ie6df85deea079f3303f0d72989f05e14b037ed7f
2017-08-10 23:44:57 +05:30
Andy McCrae b1fe866f42 Implement uWSGI for octavia-api
As part of the Pike goals we are moving api services to run as WSGI
apps. octavia-api service is set up as a wsgi app, and this patch
moves it over to uWSGI.

Since this is just a drop in replacement for the existing eventlet
service, operators an deployers should notice no difference.

Additionally, fix bug whereby git_install_branch was set to
"stable/ocata" for testing.

Change-Id: I0c473977e015015bd252a486c7191a95781b38a4
Implements: blueprint goal-deploy-api-in-wsgi
2017-08-04 13:20:54 +01:00
German Eichberger 8cfa0e02ca Octavia will create the network + upload image upon request itself
This is needed to simplify an intgrated AIO deploy

Change-Id: I7b8a2314a23281a4369d431aba280e0c0dc66f22
2017-07-21 21:53:38 +00:00
Jimmy McCrory 29a4e44b1b Allow deployers to provide haproxy template files
Add new variables, 'octavia_user_haproxy_templates' and
'octavia_haproxy_amphora_template' to allow deployers to provide and use
custom haproxy template files with Octavia.

Change-Id: I9527081d6ba6aac8f5bddc3796f8c2513625bf70
2017-05-27 21:48:56 +00:00
ZhongShengping d9f3aa4522 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: I4e35cfdcb2a13bcb2aa30d601eaf237a81e72473
Implements: blueprint deprecate-rabbit-use-ssl
2017-05-23 10:34:12 +08:00