Commit Graph

41 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov d1d727c752 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: I78c71cb33f456cfd8d255446d708a1a957e32440
2023-10-20 14:00:32 +02:00
Dmitriy Rabotyagov 1899934345 Add variables for rabbitmq ssl configuration
Change-Id: I53f50f5c7e56bdadd0456bfdeee1900a5fc91a89
2023-04-18 17:25:26 +02:00
Dmitriy Rabotyagov 3ddd45d335 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: I7b01de89b459b4992ed9531e6c81259af21ba997
2022-06-15 19:37:00 +02:00
Damian Dabrowski ebc07a44e7 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: Ie9591c96d1e5c8f4dcf04524c04056934ceb00db
2021-12-02 19:21:50 +01:00
Dmitriy Rabotyagov c92b99d3f4 Update trove configuration
We haven't payed attention to the trove for a while and we need to
align configuration with current state of the service.
trove-conductor and trove-taskmanager configs are not
loaded by trove services anymore (at least by default), so we merge all
options into trove.conf

Also defaults and deprecated options are dropped from the config.

We implement bunch of new variables to cover missed logic and
some usecases.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/784565
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/784113
Change-Id: I2ba758de38ed3fee10fe1485aa25621eddbf9046
2021-04-14 10:18:29 +00:00
Dmitriy Rabotyagov 0de33a0243 Use uWSGI for trove-api
This migrate trove-api to usage of the uwsgi from native service to
align with other service way of deployment and since that's how service
is tested in devstack.

Change-Id: I83ad3af282942ff9714757e863f393894ac35f45
2021-04-14 13:17:44 +03:00
Dmitriy Rabotyagov eccf80bb7f [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

Change-Id: I866fea573429ddcedf1547d9fa8a7caae448eca2
2021-03-30 16:54:44 +00:00
Guilherme Steinmüller 71c23779ee 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: I571a0ac9417767af413937e871ea6cdf156f2d75
2020-03-16 15:11:30 +00:00
Dmitriy Rabotyagov 00ab880a0d Drop mod_wsgi support
As we don't provide wsgi file for mod_wsgi deployment (despite
having task to do that) and trove package don't contain wsgi application
we should drop apache mod_wsgi part of the setup as it's not functional.

Change-Id: I0a12fad27d3f994d79ead52ac90873a1e1362144
2019-09-04 14:47:05 +03:00
Dmitriy Rabotyagov ed8d692fa9 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: Ib16362a8becb6666f36e5abdb93c548de2a269da
2019-07-17 19:52:24 +03:00
Jonathan Rosser 951924ab51 Use keystone catalog and fix looking up and storing admin tenant id
Trove is now able to properly use the service catalog [1].

We have another[2] patch that this patch depends-on, which
causes us to have a circular dependency. As the change is minimal,
should be ok to squash them together to be able to fix that role.

The paragraph bellow contains the commit message of the patch that is
being squashed.

The 'Get admin tenant id' task was passing invalid arguments to the
os_project_facts module, and the 'Store admin tenant id' task was not
using the correct variable to retrieve the project id.

[1] https://review.opendev.org/#/c/574254/
[2] https://review.opendev.org/#/c/665458/

Change-Id: I779ba715d20d83b1efe4f07226a5eadd7e0a1870
2019-06-25 19:00:52 +00:00
Kevin Carter b58811d7da 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: Iefcec440db0e61adf8c6ce3a8b8ae9a4125a802d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2019-02-07 22:39:33 +00:00
ZhijunWei 3bbc52b399 Update messaging notification configuration
This patch add the conditional inclusion of the notification
section of the service configuration. This ensures that oslo.messaging
notifications use the correct transport for deployments that have
separate rpc and notify messaging backends. For example, if the
transport_url is not provided in the notification section of the
service configuration, the transport_url specified in the default
section will be used instead.

This patch conditionally selects the notifier driver. The noop
driver will be selected when notification publishing is disabled.
The messagingv2 driver is selected when notification publishing is
enabled.

Change-Id: Ie967b281e15127bbf611aca557e99ac6b3d1cd4b
Closes-Bug: #1794320
2018-09-27 02:16:53 +00:00
Andrew Smith 3c4f4127b4 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 trove service.

This patch:
* Add oslo.messaging variables for RPC and Notify to defaults
* Update transport_url generation (add for notification)
* Add oslo.messaging to tests inventory
* Update tests
* Update docs
* Update extras
* Add release note

Change-Id: Ia01317343ae6fbc790d64b5ba282c8c069750d45
2018-07-03 12:43:55 -04:00
Zuul f7d32b5099 Merge "Convert role to use a common systemd service role" 2018-05-10 16:48:37 +00:00
ZhongShengping 7a283a632e 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: I9b21be85a00bf6c4fdeec139a340fecc946d1f87
Implements: blueprint deprecate-auth-uri-option
2018-04-03 14:16:53 +08:00
Kevin Carter 51fa0eb892
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: Id833d4ecf9d17bb74c1c0702c00ace241ac48873
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-30 23:06:06 -05:00
ZhongShengping aea2785d88 Remove Trove's support for Heat
This patch[1] removed heat related support.

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

Change-Id: I4e715cfe5e3077b2cb3baebfbff93a96b9c90d09
Closes-Bug: #1743717
2018-02-07 19:41:17 +00:00
Samuel Matzek 0157445c7b Fix notification configuration
Remove the exists_notification_ticks conf setting that was removed from
Trove 2 years ago.

Remove the exists_notification_transformer setting which enables an optional
function which has been broken since Ocata per bug 1700586.

Change-Id: If9fd396d14907d4f88065ac34f671b3370a1ffa7
Related-Bug: #1700586
2017-07-26 11:46:56 -05:00
ZhongShengping 4d3ae78c02 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: Ia0c175746a5bdd0f8c722ab214719e77160a0e12
Implements: blueprint deprecate-rpc-backend
2017-06-01 15:46:28 +08:00
ZhongShengping 10ff5cb3c1 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: Ibbd06cb3e65bf9970b0b3de62c9e12ce5fa4f678
Implements: blueprint deprecate-rabbit-use-ssl
2017-05-23 10:39:09 +08:00
Jesse Pretorius 4d82413ff7 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: I7f23a74fd644aa0d631e9b0f7d96083b645bc032
2017-04-26 13:05:26 +00:00
Kyle L. Henderson ad42e4df35 Add redis cluster port
The redis cluster port was missing from the trove sample
config files. A fix to trove is proposed here [1].

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

Change-Id: I15268af320dc1734c51a8c17f19335105cd95e8d
2017-04-23 02:16:26 +00:00
Kyle L. Henderson 9d8a9347c4 Implement trove networking
To operate properly the trove guest agent needs access to
rabbitmq and also the neutron network for trove to use must
be created and defined in the trove.conf file.

This changeset adds documentation, tasks and
configuration defaults to setup the networking for
trove.

Change-Id: Idcf87c2eef0af475c02412f03433d22d7b08643f
2017-04-14 14:46:26 -05:00
Kyle L. Henderson 086bd308de Add taskmanager encryption key to api
Testing revealed that the trove api service needs the task
manager's encryption key.

Change-Id: I4d34b7e68b69ce30ee1fb08e7495cd22fa157495
2017-04-11 10:32:55 -05:00
Kyle L. Henderson b948402c76 Add RPC encryption key support
In the Ocata release, trove added support for encrypting the rpc
communication between the guest instances and the control plane.
These settings allow the user to specify installation specific
keys versus using the default keys.

Change-Id: Ie42d754d58e983a15b553ad8a399813c9a700344
2017-03-31 13:41:06 -05:00
Jenkins 83adc96f1b Merge "Deprecate auth_plugin option" 2017-03-30 21:49:53 +00:00
Kevin Carter b6efe327aa 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: I6dccb6eeabceea30922cbcf3a60e32e841612fd0
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-30 15:08:28 +00:00
ZhongShengping 6a55fccd31 Deprecate auth_plugin option
Option "auth_plugin" is deprecated, use option "auth_type" instead.

Change-Id: I77f5757a4d12c8320702bcf3685c5de7417ceda6
Implements: blueprint deprecate-auth-plugin
2017-03-25 12:26:08 +08:00
Andy McCrae de0a9999fb Update paste, policy and rootwrap configurations 2017-03-03
Change-Id: I5b9b14fe41f49106c8b1833e8b4c59ecae8ec181
2017-03-03 11:34:19 +00:00
Ravi Gummadi fdd59ffe60 Configure trove_conductor_workers in os_trove
Configure trove_conductor_workers by calculating the default value.
Similar to other services worker threads, the default value for
trove_conductor_workers is half the number of vcpus on the machine.

Also added capping of worker threads for trove.

Change-Id: If853b0e1e45b7137572df8a1123273539343c83e
Closes-Bug: #1664639
2017-02-17 05:59:51 -05:00
Chhavi Agarwal 17ce2cd1fe Adding the trove-guestagent.conf
Updating the trove-post-install to generate the
trove-guestagent.conf during the os_trove deployment.
Closes-Bug: #1658694
Change-Id: I4d8ac1b40d36b188718a02b89a1ea70fb89e7111
2017-01-31 02:10:45 -06:00
ZhongShengping 11b18da984 Remove pki support
Change-Id: I75dc369a21fd7fe32bf89baa1b927b755254003e
Implements: blueprint remove-pki
2016-12-29 13:51:31 +08:00
Andy McCrae bfdbbf6065 Remove Trusty support from os_trove role
Change-Id: I5f9d920cc99bcc62859663434b2615c317d8fbdc
Implements: blueprint trusty-removal
2016-12-15 15:10:27 +00:00
Andy McCrae 8b8cfcea78 Update paste, policy and rootwrap configurations 2016-12-10
Change-Id: I2586f36e23d5decec524babf8ef8de2cb6be6468
2016-12-10 13:19:06 +00:00
Andy McCrae 6d14488b9e Update paste, policy and rootwrap configurations 2016-12-02
Change-Id: I119a44520bb5eabd6930f7be6936dd31b982f4d4
2016-12-02 10:02:54 +00:00
Jesse Pretorius fdbb980a18 Update paste, policy and rootwrap configurations 2016-10-06
Change-Id: I06ae08392e66229b9120c41309f1ba5e7301b217
2016-10-06 14:40:33 +01:00
Kyle L. Henderson a90e7afc5c Update role with fixes for AIO testing
While doing some preliminary testing using a prototype AIO, the
following issues where observed and fixed.

The trove CLI is expecting the service name to be 'database' in
keystone.  Update from 'dbaas' to 'database'.

Add the tenant id to the trove service URLs, they are needed.

Ignore failures when restarting services since all trove services
are attempted to be restarted in all trove containers, which
produces invalid combinations.

When calling the trove-manage CLI to create the DB, provide the
trove conductor conf file so the CLI has the DB connection
information.

Add a blank line after the transport_url specification, otherwise
the following line is added to the URL and forms an invalid value.

Add Nova and Keystone configuration values to the trove api conf
file since they are needed by the trove api service.

Add Nova configuration values for the trove task manager service.

Default to using the internal URL to for nova client.

Change-Id: If70077ea5d66151999b8965c218e4cb853e6f81a
2016-09-15 12:41:14 -05:00
Donovan Francesco 3455ec7579 Deploy Openstack-Trove (DBaaS)
This commit allows the deployer to create 3 containers to run
Trove-API, Trove-Conductor and Trove-Taskmanager.

Change-Id: If93330d48f53745d45af351b9de9a4a733af943a
2016-09-01 15:17:08 +02:00
Donovan Francesco (IS) 28f3145e6b Update 2016-08-25 14:56:41 +02:00
Donovan Francesco 4b80fd260d Initial Commit 2016-08-25 14:54:34 +02:00