41 Commits

Author SHA1 Message Date
Andy Botting
64b2ca9a5e Separate out api/taskmanager config settings
This commit removes config settings for the API that were set
from within the taskmanager class, and moves them into the API.

This fixes the issue where some neutron settings didn't get
set in the api config file when the api and taskmanager were run on
separate hosts. Specifically, API requests will now return the IP
address of the DB instance when Neutron is used.

Change-Id: I370f137ce12fedb527f1ae7adc013e1dac4dbffe
2017-04-12 03:08:18 +00:00
ZhongShengping
97f9ee66ca Fix ci
The review[0] is merged, we should update other releated
puppet modules in order to fix ci.

[0]https://review.openstack.org/#/c/444248/

Change-Id: Icbf1cdd0eaa7944dc2331d64a70e18cd1030ee15
Closes-Bug: #1672362
2017-03-13 21:54:40 +08:00
Andy Botting
7fdbe6e50c Add support for single tenant mode
Single tenant mode creates all DBaaS resources in a given tenant,
rather than the default, which is to use the users own tenant.
It relies on the nova_proxy_admin_* vars for this.

This commit adds a new trove::single_tenant_mode variable, when set
to true, sets up the remote_(nova|cinder|neutron)_client config
vars in the each of the config files for this mode to be enabled.

Change-Id: Ic59bd227fff893c705931ced3add636844533d35
2017-03-09 12:51:15 +11:00
Alex Schultz
3df5ea37db Remove rpc_backend check for amqp
I7ccd995ef01c2d54427684718adba054260fdd52 removed the rpc_backend
declaration for amqp so we need to stop checking for it in the unit
tests.

Change-Id: I05e3252940889831b11245fc8c4df1a94b0505bc
2017-02-28 08:20:46 -07:00
ZhongShengping
370c0bf8fa Add rpc_response_timeout option
Add rpc_response_timeout to configure seconds time for waiting
for a response from a call.

Change-Id: Ib107713d8b2cc137e11c3d478f14f8a4f4d034a3
2017-02-08 11:35:26 +08:00
Jenkins
29c19ff637 Merge "Update tests to use rspec-puppet-facts" 2016-11-12 01:32:21 +00:00
Iury Gregory Melo Ferreira
287ef4dfe2 Remove old authtoken options
Since we are in ocata lets remove all old parameters in api
to configure the keystone_authtoken section

Change-Id: I2ad9c559768324cb494bcbe719195817b3ca4864
2016-11-08 01:11:16 -03:00
Alex Schultz
e8be948eb7 Update tests to use rspec-puppet-facts
This change updates the tests to properly use rspec-puppet-facts and
on_supported_os.

Change-Id: Ia96c837440b1df3785d9abfd3a3ac8bfdf21c9ab
2016-10-26 08:19:13 -06:00
Maksym Yatsenko
86221d0df0 Change worker defaults to ::os_workers
This patch changes the default worker count from ::processorcount to the
new ::os_workers fact. ::os_workers is based on the number of processors
(currently cpu/4) but is capped at a maximum of 8 worker processors.
This is a much more reasonable default in general and prevents excessive
resource consumption on systems with a large number of CPUs.

Change-Id: Idfd8e3f4fe91df7d70e8c35a491c076b0b8f2348
2016-10-08 02:07:19 +03:00
Alexey Deryugin
b51e789701 Configure keystone authtoken options
In trove::api, use keystone::resource::authtoken to configure
keystone_authtoken section in trove.conf, with all parameters required
to configure keystonemiddleware.
This patch will allow to deploy Trove to use Keystone v3
authentification.

Some deprecations:
- trove::api::keystone_tenant is deprecated in favor of trove::keystone::authtoken::project_name.
- trove::api::keystone_user is deprecated in favor of trove::keystone::authtoken::username.
- trove::api::keystone_password is deprecated in favor of trove::keystone::authtoken::password.
- trove::api::identity_uri is deprecated in favor of trove::keystone::authtoken::auth_url.
- trove::api::auth_uri is deprecated in favor of trove::keystone::authtoken::auth_uri.

Change-Id: I808ebda1c4ec3a5b2ed294eb8af4eecafa861051
Closes-Bug: #1604463
2016-08-23 22:08:04 -03:00
Andrew Smith
7cb103c17f Add transport_url parameters for oslo.messaging
This commit adds the transport_url parameters for oslo.messaging. The
url is of the form:

  transport://user:pass@host1:port[,hostN:portN]/virtual_host

Where the transport scheme specifies the rpc or notification backend
as one of rabbit, amqp, zmq, etc. Oslo.messaging is deprecating the
host, port, and auth configuration options [1]. All drivers will get
these options via the transport_url.

This patch:
* use oslo::messaging::default resource
* use oslo::messaging::notifications resource
* add parameters for transport_url(s)
* correct config file for amqp backend
* update spec tests
* add feature release note

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

Change-Id: I8d0132f23aa05ed267ff2d88bce61ce9f20160f5
2016-06-28 13:17:26 +00:00
Jenkins
2c4809cd76 Merge "Cover control_exchange with tests" 2016-05-21 16:01:23 +00:00
Andrew Smith
52371ee818 Introduce support for oslo.messaging amqp driver configuration
This commit adds support for the oslo.messaging amqp rpc_backend
which enables the AMQP 1.0 driver. A proposed feature for the
Newton oslo.messaging release is an update to the AMQP 1.0 driver
to support a stateless messaging interconnect for RPC traffic [1].

This patch:
* use oslo::messaging::amqp resource
* add new parameters for the oslo_messaging_amqp driver
* update spec tests for amqp as alternate rpc_backend
* add feature release note

[1] https://blueprints.launchpad.net/oslo.messaging/+spec/amqp-dispatch-router

Change-Id: I8306c56e86f2f8a8d6da1ecbf5eab674e6b1e8bf
2016-05-12 16:13:30 -04:00
Alex Schultz
c48df46352 Cover control_exchange with tests
This change adds the control_exchange setting for
trove_guestagent_config and trove_config that are included in the api
and guestagent classes.

Change-Id: If0bda0f937330e2fa4304517d06cdd1c02ec9f98
Related-Bug: #1580005
2016-05-10 11:15:50 -06:00
Alexey Deryugin
24839ec63f Use oslo module for messaging (rabbit) configuration
Additonal changes:

  * switch messaging related parameters to $::os_service_default
    as they are used in oslo::messaging_rabbit define
  * update unit tests

Change-Id: I3f7800f78132fa4c6c639753327ff63cf337c285
2016-04-22 15:45:13 +00:00
Emilien Macchi
80cf1085e2 api: move SSL parameters under [ssl] section
Move SSL parameters under [ssl] section, like it should be done when
using Oslo Service.

Change-Id: I5ae991970f949dd9cfe2948b829ba5bb9834423c
2016-03-31 16:12:46 -04:00
Matt Fischer
59f75e6085 Trove external dependency management
Move all dependency tracking to an external class which simplifies the
relationships and allows managing Trove without necessarily using
packages.

This change also cleans up how the client is handled to make
it more configurable and match other modules.

Finally the reference to the deprecated and non-functional
keystone::python class is dropped.

Change-Id: I943685fbeb114dead80b7465b8f5c564a0bc9fe0
2016-03-21 19:42:26 -06:00
Alex Schultz
679c384e64 Add kombu_reconnect_delay option
The kombu_reconnect_delay is used when configuring rabbitmq but we are
missing the parameter from the base trove class. This change adds it in
and adds test coverage for the rabbit user, password, host, ssl and
reconnect delay.

Change-Id: I8a5e7f0241a0f41e4f10b40d791f39e37ce82087
Closes-Bug: #1545168
2016-02-23 09:20:44 -07:00
Jenkins
f057c9b474 Merge "Add notification system options in trove" 2016-01-26 16:02:17 +00:00
Ethan Gafford
4ccae65825 Deprecate auth_* old parameters
This patch does multiple things regarding auth_* parameters.

1/ We deprecate auth_host, auth_url, auth_port and auth_protocol
If they are set, a nice warning will show up and mention the parameters
will be dropped in a future release. The parameters are still having
effect but will configure old parameters. No worries, they still work.
Just lot of warnings so people will have to use new parameters.

2/ Add new parameters
auth_uri and identity_uri are the way to go!
False by default for now, because we still have old parameters, but in a
later release, they'll be set to a default endpoint, like in other
modules.

3/ Update beaker
We want to test with the new parameters, so let's update beaker
manifests and use auth_uri & identity_uri

This is a first step to use auth_uri & identity_uri that is compliant
with other modules. The next step will be to drop old parameters and set
the right default values for the 2 new params.

Change-Id: I66d5233c8981763a0a341740911fb24dd0e8d479
Closes-bug: #1504653
2016-01-20 15:38:40 -05:00
Xingchao Yu
d91b9599b4 Introduce amqp_durable_queues option
amqp_durable_queues option is already defined in trove class,
but is not be used in other trove class.

Close-Bug: #1486319
Change-Id: Ifd4411ce90db26d6f12e714fdc5c54ea507975fd
2016-01-07 04:04:40 +00:00
Xingchao Yu
2443294da2 Add rabbit_ha_queues option
There are two methods for setting up RabbitMQ HA:

 1. Configure rabbit_hosts to multi rabbit hosts.
 2. Setting up a loadbalancer in front of RabbitMQ cluster,
    provide a unique address in rabbit_host

In current, rabbit_ha_queues option is controled by rabbit_hosts IF
conditional statement. But when users want to use the second method:
changing rabbit_ha_queues to true, but they don't use rabbit_hosts
option, this logic will not work.

This patch adds an rabbit_ha_queues option, set it to undef by
default for forward compatbility.

Close-Bug: #1485287
Change-Id: Ib8fe16182188729100ef4704466c4d42d31ff510
2016-01-07 03:49:36 +00:00
Gael Chamoulaud
0ddd0067a1 Put all the logging related parameters to the logging class
Currently logging configuration is splitted in two distinct classes,
the api.pp and the logging.pp classes. This review aims to centralize
all logging related parameters in a single class, the logging.pp one.

The impacted parameters are :

* use_syslog
* use_stderr
* log_facility
* verbose
* debug
* log_dir
* log_file

This change remains backward compatible with what is currently in place.

Related-bug: #1515273
Change-Id: I76f51876e78015db722ff0fc37f6bcd76fd651f2
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-12-15 14:38:42 +01:00
Denis Egorenko
05cbdefa6b Remove qpid messaging support
Qpid messaging driver is removed from Oslo.messaging [1]
Therefore, we cannot support it anymore.

[1] I4a9cba314c4a2f24307504fa7b5427424268b114

Change-Id: I4d4c200e733568d33116728e19377575b92331ca
2015-12-07 20:44:35 +03:00
Xingchao Yu
ffee17b883 Add notification system options in trove
This patch is aim to manage notification system options:
  - notification_driver
  - notification_topics

Change-Id: I76d66fa1a8640f08c8d948e5f8ede51a383216cb
Closes-Bug: #1473645
2015-11-09 00:16:22 +08:00
Gael Chamoulaud
7b790cc663 Introduce trove::db class
Change-Id: Id2af304b7924e9a95a2e2ecf63c32f8dfa10f3f8
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-11-06 09:21:41 +01:00
Javier Pena
03f5a793a6 Simplify rpc_backend parameter
It is no longer necessary to specify the whole python namespace
for the backends, and
http://docs.openstack.org/developer/oslo.messaging/opts.html lists
the short versions.

This patch maintains backwards compatibility with the previous
default value in case it is explicitly used.

Change-Id: Ic16d12e9e84083c09f3d725e5a15f4c3d7279792
2015-10-13 10:32:09 +02:00
Xingchao Yu
b2a76998df Add api ratelimit options
This patch is aim to add trove api rate limits related options.

Change-Id: I34672d2309c4febacb73c6cfe7df7b3b51c59468
Closes-Bug: #1473296
2015-07-31 23:34:32 +08:00
Xingchao Yu
0e3faace3c Add region and resource url related options
This patch is aim to add region and url related options in trove.conf:
  - os_region_name
  - nova_compute_service_type
  - cinder_service_type
  - swift_service_type
  - heat_service_type
  - neutron_service_type
  - neutron_url

Closes-Bug: #1473280
Change-Id: Id9b57351b0fc3c81565310f4ce6ae2b8aa2564f2
2015-07-20 09:59:59 +08:00
Javier Pena
2a020fdf93 Complete qpid support
The puppet-trove module only had partial, non-working qpid support
until now. The qpid_* parameters were documented and included in
some manifests, but not in init.pp, and rpc_backend was never set
in the config files, so Trove would always use RabbitMQ.

The fix also includes moving qpid parameters from the DEFAULT
section to oslo_messaging_qpid in the config files, to avoid
deprecation warnings in Kilo and later releases.

Change-Id: I12853f843f40e2312e7fe3bb81739be743641583
Closes-bug: #1468312
2015-06-30 11:30:10 +02:00
Lukas Bezdicka
86b7d23f29 Sync amqp support with other openstack modules
Kilo oslo-messaging deprecates rabbit/kombu settings in the
DEFAULT section.

Rabbitmq won't talk to us anymore if we try to use SSLv3 as it disabled
support for SSLv3. Openstack components use python's openssl
implementation which does not support TLSv1.1 and TLSv1.2 yet so we
just switch to TLSv1. Support for newer TLS should come with python
2.7.9+

The kombu_ssl_* parameters should not be required when rabbit_use_ssl => true
Rather, rabbit_use_ssl must be set to true if the kombu_ssl_* parameters are
used.

Change-Id: I327dc193d878cb1574b69d5f5b502c25fa203a66
Closes-Bug: #1409667
Closes-Bug: #1356083
2015-06-12 04:40:07 +00:00
Lukas Bezdicka
b032aca232 Change sql_connection to connection.
Sql connection parameter is now in database/connection not
DEFAULT/sql_connection.

Change-Id: I5f7b48a1a6e092b9629145b57795cba0c351a4eb
2015-03-31 09:10:07 +00:00
Sebastien Badia
53d51d8f35 spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the new
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax in
order to be prepared for rspec 3.x move.

In details:

  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0

Change-Id: I6e85576823fc93ac0b7a7dff06032d71682259ad
2015-02-25 05:15:02 +01:00
Solly Ross
9e5b82fcda Configure auth via conf file, not paste file
The paste file now lives in /usr/share, and shouldn't be
modified.  Configure the keystone auth token settings in
trove.conf instead.

Change-Id: Ib2cc2211cc645ad71e9f57c1c52177074472afcb
2014-12-18 11:33:55 -05:00
Sebastien Badia
4fdc9f802a Fix eNovance domain name
A new company « etrovence » :-) (or just a too quick sed)

Change-Id: I95cc85908b79310ced5f19e96516293ca949b651
2014-07-12 02:30:39 +02:00
Sebastien Badia
3063b1903c trove/api: fix spec tests (move to init classe) 2014-07-03 15:21:24 +02:00
Emilien Macchi
5e7fa92465 move nova_proxy_admin_* to init class
Since the parameters are used on other class, it's smarter to have them
on init class to just reuse them.

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-07-03 15:12:38 +02:00
Sylvain Baubeau
b2caa68930 Configure api-paste.ini for trove-api 2014-07-03 14:15:39 +02:00
Emilien Macchi
9549151dcf api: fix tests 2014-07-02 17:20:53 +02:00
Emilien Macchi
0b2ab24cf7 api: fix unit test 2014-07-02 15:52:48 +02:00
Emilien Macchi
dcef06f12d Implement tests for trove::api 2014-07-02 14:49:45 +02:00