Commit Graph

96 Commits

Author SHA1 Message Date
Zuul 2f0f0ff4b1 Merge "Add quorum support for service" 2023-11-14 20:30:42 +00:00
Dmitriy Rabotyagov 435a69ed31 Add quorum 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.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_keystone/+/900631
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_swift/+/900632

Change-Id: I3292a388766654b1a10434ee8ba060e28607e707
2023-11-13 12:14:57 +00:00
Danila Balagansky f9de8b2b78 Enable Ceilometer resource cache
This change should significantly reduce load on Gnocchi due to caching
`resource` objects in Memcached.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I72a0b1728e6f6e761bf75e7d57675434230475d4
2023-10-25 10:34:14 +00:00
Dmitriy Rabotyagov bfca55e20d Fix logic of defining polling_namespaces
Previous logic did excluded possibility for ceilometer-polling agent
to poll multiple namespaces at the same time. This resulted
in a wrong config for AIO metal scenario.

Change-Id: I2ad3f748d18bf571dc7b82422fbcd8269cbe168e
Closes-Bug: #2018619
2023-05-05 21:22:41 +00:00
Julien Francioli 65f22a2951 Fix wrong variable name in ceilometer.conf.j2 template.
ceilometer_rpc_ssl_ca_file was used instead of ceilometer_oslomsg_rpc_ssl_ca_file
in the RPC transport_url.

Change-Id: Iab9729ee65571a45b5e50bb6a593386b1e238944
2021-07-16 15:02:55 +00:00
Zuul 86dbc5e300 Merge "Add variables for rabbitmq ssl configuration" 2021-05-31 10:12:16 +00:00
Jonathan Rosser a79b6b3968 Add variables for rabbitmq ssl configuration
Change-Id: I1de3f5225dfb580ac8e9616bc55436151cdabe76
2021-05-18 12:56:43 +00:00
Dmitriy Rabotyagov a08e470393 Remove deprecated options from config
Gnocchi dispatcher [1] along with api section have been removed
for a while from ceilometer. We should clean up template as well

[1] 83ffaffcb2

Change-Id: Ibbe290ebfd91297080ce2f0b861deece82af42cc
Related-Bug: #1879192
2021-05-13 17:59:26 +03:00
Dmitriy Rabotyagov 6df1fb0fc5 Add octavia support to ceilometer
Allow ceilometer to read octavia notifications once variable
octavia_ceilometer_enabled is set to true.

Change-Id: I08289736fe1b3b23873d131664a00a1b44c7d6d3
2020-12-02 18:20:49 +02:00
Dmitriy Rabotyagov be84a509c4 Unify deployment of ceilometer files
This aims to make possible to define ceilometer_pipeline_user_content
filepath instead of making huge overrides. In the meanwhile default
behaviour should be kept with minimal influence on the existing
deployments.

Change-Id: I0a0ac1b9bbdb8b6a68f870f0ae03edbee8c63d68
2020-11-20 08:05:17 +00:00
Dmitriy Rabotjagov e68b1336a7 Cleanup config from keystone_authtoken section
keystone_authtoken is not used by ceilometer, so there is no need to
deploy and maintain it. In addition, improved logic of
ceilometer_service_setup include, as ceilometer need
keystone credentials only for pollsters,
so credentials are created only when ceilometer-polling group is defined

Change-Id: I8bfc4ca1e87edf70e61a03db0854d0ae32ab2bc7
2019-03-27 17:47:04 +02:00
Gaudenz Steinlin 15da928766 Fix polling namespace on compute nodes
Previously only ceilometer-polling services running in the central
container had a polling_namespace configured. Those running on compute
nodes used the default which is to run all pollsters from the central
and compute namespace. But there is no need to gather the data for the
central namespace on every compute node.

With this fix the central container only runs the central pollsters and
those on the compute nodes only the compute pollsters. This can be
adjusted by config_template overrides in group_vars if needed.

Change-Id: Ia130bd7f9000882b556aea2190de97ddb290bafc
2019-03-26 10:32:37 +01:00
Dmitriy Rabotjagov ed4d7ed536 Cleanup files and templates using smart sources
The files and templates we carry are almost always in a state of
maintenance. The upstream services are maintaining these files and
there's really no reason we need to carry duplicate copies of them. This
change removes all of the files we expect to get from the upstream
service. while the focus of this change is to remove configuration file
maintenance burdens it also allows the role to execute faster.

  * Source installs have the configuration files within the venv at
    "<<VENV_PATH>>/etc/<<SERVICE_NAME>>". The role will now link the
    default configuration path to this directory. When the service is
    upgraded the link will move to the new venv path.
  * Distro installs package all of the required configuration files.

To maintain our current capabilities to override configuration the
role will fetch files from the disk whenever an override is provided and
then push the fetched file back to the target using `config_template`.

Change-Id: Ia467e20c32732152a03579216a0ced0dbb4038c4
2019-02-04 21:25:57 +02:00
Dmitriy Rabotjagov 565f8b6bd1 Added designate and trove services
Ceilometer was missing designate and trove services. In addition,
services were sorted in alphabetical order both in defaults and template

Change-Id: I492a1d8d2bfa567a224e5441c6a15dea3c722741
2018-11-07 13:56:50 +02:00
Dmitriy Rabotjagov 1128c21955 Fix of oslomsg undefined variables for services notifications
A buch of defaults oslomsg related variables were configured.
In case of enabling ceilometer for services, role failed unless
all required vars has been specified manually by deployer.

Also vars ceilometer_oslomsg_rpc_servers
and ceilometer_oslomsg_notify_servers were removed
They were not used anywhere except ceilometer.conf.j2
and might be easily replaced with host_group vars.
Their removal allowed to simplify macros.

Fixed distro_install functional test for ubuntu,
as ceilometer-agent-notification package was missing.

Change-Id: I148ccaff9576b09d33d889b79963e88ca84d2ffe
Closes-Bug: 1794688
2018-10-04 15:54:08 +03:00
Dmitriy Rabotjagov f03f812d26 Changed messaging_urls for notification agent
Regarding ceilometer docs, messaging_urls is expected to be:
rabbit://user:pass@host1:port1[,user:pass@hostN:portN]/virtual_host
But we have a bunch of messaging_urls for every rabbit vhost.
Ref: https://docs.openstack.org/ceilometer/latest/configuration/

As a result macros for generation of transport_url and
messaging_urls was created.

notification section was removed for non-notification agent hosts.

Change-Id: Ieb30c66df41dfe75937b9463527d250e05d868a0
2018-09-07 19:02:27 +03:00
Kevin Carter 195aed6f51 Add systemd journal logging to the service config
The systemd journal would normally be populated with the standard out of
a service however with the use of uwsgi this is not actually happening
resulting in us only capturing the logs from the uwsgi process instead
of the service itself. This change implements journal logging in the
service config, which is part of OSLO logging.

OSLO logging docs found here: <https://docs.openstack.org/oslo.log/3.28.1/journal.html>

Change-Id: I5ae4ee8b0f69a4ed9b6088f043abaa1c4b1291d8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-31 12:58:57 -05:00
Andy Smith 8daaa755dd 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 aure 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 ceilometer service.

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

Change-Id: Ib14a7a5ec0348933eee4fb1a151010841b29ca1f
2018-07-12 09:56:32 -04:00
Jesse Pretorius 1d4b2fd49e Remove database configuration
Ceilometer no longer requires or supports a database. Instead
it now forwards everything it collects to the message queue
for collection by the other Telemetry services.

Change-Id: Ib8cb1ca3e0ef81c16a6483d20705fa3b237bbc48
2018-06-12 20:29:03 +01:00
ZhongShengping 2012624c78 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: I8f051b227247e843ceac35b23ed1bff75dbf8841
Implements: blueprint deprecate-auth-uri-option
2018-04-03 14:17:06 +08:00
Kevin Carter 78b8b8c16a 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.

Change-Id: I128bc9736c1a460c161314eeaa6759de5ceba977
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-29 10:32:31 +00:00
gokhan.isik e00df43114 Deprecate os_endpoint_type option
Option "os_endpoint_type" from groups "service_credentials" and
"keystone_authtoken" is deprecated[1].
Use option "interface" from groups "service_credentials" and
"keystone_authtoken".

[1] https://docs.openstack.org/ceilometer/latest/configuration/

Change-Id: I44d6f478f5eed7521ab79b29e6a757f0b779d9d6
2018-02-20 08:38:19 +00:00
Mohammed Naser 33f5dfa7e3 Drop MongoDB installation and API file configurations
Ceilometer no longer stores any data so the MongoDB installation
playbook is not used.  In addition, it no longer has an API so
the api-paste file is useless as well.

Closes-Bug: #1747612
Change-Id: I20104cc357f78b01e2b1246a3f51d609bb2f4f24
2018-02-06 15:28:48 -05:00
ZhongShengping 744ed879ab 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: I14f0d5d9f8f75b138504df40d09651d60496fee9
Implements: blueprint deprecate-rabbit-use-ssl
2017-05-23 10:10:43 +08:00
Jesse Pretorius 9e96b65126 Source template files from git or deploy host
Instead of sourcing the paste/policy files from the role,
the deploy host will first be checked, then the git source.

The current mechanism uses a lookup, causing the fetch of
the default templates to happen via curl from the deployment
node. This causes problems if the deployment node does not
have access to the repo server web service, which may be the
case in high security environments.

This patch changes the mechanism to only use the lookup
module for the file content that is on the deployment node,
then falls back to using the uri module to fetch the default
content. This ensures that the deployment node does not have
to reach into the environment for the content.

Additionally, the following variables and related tasks are
removed as the files they applied to no longer exist in the
source git repository:
- ceilometer_event_definitions_yaml_overrides
- ceilometer_event_pipeline_yaml_overrides

The pattern applied is the same as that used in the
combination of the following two reference patches:
- https://review.openstack.org/446235
- https://review.openstack.org/463390

The rootwrap.conf template is re-added because it cannot be
used verbatim from the upstream repository. It requires the
addition of the service venv bin in the exec_dirs. A mechanism
to implement this dynamically will be figured out in a later
review along with an implementation which will fetch the
rootwrap files directly from the git source too.

Change-Id: I248910a544f611b590bc93449aea98434802cae3
2017-05-19 16:12:28 +00:00
Jesse Pretorius a10f8ded99 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: I17334c4685fb7a749ef16dee1e1e7f54398781fc
2017-04-26 13:02:17 +00:00
Kevin Carter 178ad8245f 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: I6ad4fbf820938eef633aa48db217350a97786541
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-04-04 18:33:10 +00:00
ZhongShengping 3ec93b9c3d Deprecate auth_plugin option
Option "auth_plugin" is deprecated, use option "auth_type" instead.

Change-Id: I0da3415ada2c17d8faa78ff4ed9e50353b6915ef
Implements: blueprint deprecate-auth-plugin
2017-03-22 11:03:22 +08:00
Miguel Alex Cantu 88b3edc687 Remove ceilometer_api_workers, cap notification
The ceilometer API is deprecated, this commit
removes any reference to the service.

It also caps notification workers to 16.

Change-Id: I86966936f31765ca7fbcdc248edb4daed9feadfb
Partial-Bug: #1666640
2017-03-10 15:01:25 +00:00
Miguel Alex Cantu 5e6ff1ea5f Remove Ceilometer API Service
Ceilometer API is now deprecated in favor of using
Gnocchi, Aodh, and Panko to pull telemetry information.

Change-Id: I4464fc6bd4ad3ef14e2638abcdb86180e82615e1
Closes-Bug: 1666640
2017-03-02 15:42:08 +00:00
Miguel Alex Cantu 8784e73eec Deprecate ceilometer-collector
Per https://review.openstack.org/#/c/413920/, the ceilometer-collector
service is now deprecated.
This commit removes the inventory group mappings to the
ceilometer-collector service/container. It also removes
the service from the bootstrap and testing inventory.
Gnocchi is now explicity used as a publisher in the
pipeline.

Partial-Bug: 1666238
Change-Id: I396b154d106c0afba44d57792ae6dad39b33a6f5
2017-02-22 10:42:06 -05:00
Jenkins 7e5d4c84cb Merge "Update event_dispatcher when gnocchi enabled" 2017-01-27 20:34:04 +00:00
Steve Lewis 949df106b0 Update event_dispatcher when gnocchi enabled
Per the current Ceilometer docs[1] event_dispatcher can be
set to gnocchi.

When gnocchi is enabled this should ensure messages are not
accumulated endlessly in RabbitMQ.

[1] http://docs.openstack.org/developer/ceilometer/install/dbreco.html#moving-from-ceilometer-to-gnocchi

Change-Id: I760d135f4abd89cac3ae66f002a24a083addafb7
Partial-Bug: 1624789
2017-01-27 17:41:56 +00:00
Logan V 54e2b6e4ca Limit polling namespaces in API container
Removes the "compute" polling namespace from the ceilometer-polling
agent inside the API container.

By default both the "compute" and "central" polling namespaces are
enabled [1], and the compute namespace requires libvirt to be
installed or else ceilometer-polling will fail to start [2]. Since
we are not hosting instances inside the API container, we can
disable the namespace.

[1]: 4108d6d2cb/ceilometer/cmd/polling.py (L65)
[2]: http://logs.openstack.org/22/391522/2/check/gate-openstack-ansible-openstack-ansible-aio-ubuntu-xenial/6837eba/logs/openstack/aio1_ceilometer_api_container-2218d6eb/ceilometer/ceilometer-polling.log.txt.gz

Change-Id: I2046eb03bf26c62ac822d9a81847417bfcf24fb1
2017-01-26 11:17:27 -06:00
Andy McCrae e58f6e0082 Remove unrequired templates in favour of upstream
This patch updates the templated files we have failed to update, and
will pull these from upstream in future. This will ensure the version of
Ceilometer matches the conf files that are used.

pipeline.yaml is still carried because we override some vars in that
file. This is a TO-DO for later, but this patch will reduce the amount
of files we need to carry in templates.

Change-Id: I64fa7af1ca7a58214b6c302131964b819aad4915
2017-01-25 14:05:26 +00:00
Andy McCrae 1c49e37d11 Update paste, policy and rootwrap configurations 2017-01-19
Change-Id: I4bbd78ebb81befedd6c181caa6ca48eafb45aee6
2017-01-19 14:52:24 +00:00
ZhongShengping 32368c727e Remove pki support
Change-Id: Ic1b874cd91f428510bfc1b8f85f538d0a518b64c
Implements: blueprint remove-pki
2016-12-29 11:06:35 +08:00
Andy McCrae bf0c6c7221 Remove remaining Trusty support from os_ceilometer role
Change-Id: I5ed854d48915226eb930525f268c5ff49f521cee
Implements: blueprint trusty-removal
2016-12-15 12:36:16 +00:00
Andy McCrae 0a272abd68 Update paste, policy and rootwrap configurations 2016-12-13
Change-Id: Ib4cd9139b0c0e0590dacedeb2a37b6a938ebc196
2016-12-13 10:36:11 +00:00
Andy McCrae 601a9957cb Update paste, policy and rootwrap configurations 2016-12-02
This patch also removes the pip install of oslo.db since it is a
requirement of ceilometer it will get installed.

This patch adds oslo.vmware as a dependency. This can be removed once
Iaf51101bbaa5eba49f78e950152095913951430e merges.

Change-Id: I8edcb71f360abf9233c0b2b8d505a5fb8cd4178c
2016-12-08 14:54:30 +00:00
Andy McCrae 25da7788be Update paste, policy and rootwrap configurations 2016-11-18
Change-Id: I1d201ed57f703ffd204ea8b0c23fe45f4a9adb9f
2016-11-18 10:05:52 +00:00
Marc Gariepy da101ae6d0 Fix tmpfiles.d when multiple service are running
This fix tmpfile when multiple services runs in the same host with systemd.

Change-Id: Ie3d87a688d04fff70f83f4e98909c2c9620ee370
2016-11-04 14:56:12 -04:00
Jimmy McCrory a900930b7b Install ceilometer-polling on compute nodes
With the move to using a service-group mapping for installing services,
the ceilometer-polling agent now only installs on hosts within the
ceilometer_central_agent group when it should also be installed to the
ceilometer_compute_agent group. Adjust the service mapping to allow for
multiple group assignments per service and update relevant tasks to use
subelements to install each service within its assigned groups.

Also fix the 'Reload upstart init scripts' handler so that it can
properly be marked 'changed' in order to notify the 'Restart
ceilometer services' handler.

Closes-Bug: 1639026
Change-Id: Iba8e1f58c996a55389f50c727a4afa55099daa22
2016-11-03 17:45:45 -07:00
Gaudenz Steinlin 6ca135ebbc Make ceilometer sample interval configurable
This could already be configured via the ceilometer_pipeline_yaml_overrides
in theory, but in practice this is very unpractical as one would have to
override the whole sources configuration. Only overriding one key in a
list of dicts is not possible.

Change-Id: Ieb5569982f080446295cecc33fb70c6b5d1cb9d6
2016-10-27 17:38:55 +02:00
Kevin Carter c1671ea0ce Remove deprecated ansible_ssh_host variable
This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
variable has been deprecated as noted here: [0].

[0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

Change-Id: I9afd09d4c76febea5896cf6bf7bc284dabea38c3
Related-Bug: #1636606
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-10-25 19:41:41 +00:00
Jesse Pretorius 92133b98d2 Update paste, policy and rootwrap configurations 2016-10-12
Change-Id: I6c7d3ed938ed839b22378002ce77f239ff721e7b
2016-10-20 17:50:05 +00:00
Steve Lewis 9fd56cba6c Roll-up of multiple fixes for os_ceilometer role
The ceilometer/api/app.wsgi file upstream was modified and broke the
ceilometer role such that the ceilometer api will not start. This
change fixes the role by updating the template derived from that file
to match the new invocation method.

An example of the error being remedied can be seen in patch set 1 of
Related-Change: Ieb5569982f080446295cecc33fb70c6b5d1cb9d6

Additionally, ceilometer-api is served with Apache mod_wsgi so an
init script shouldn't be created.

Also, the ceilometer_db_type now defaults to blank which will omit
the [database] group from the ceilometer.conf which matches the new
upstream default. The db type is overridden as mongodb for testing.

Also fixes an issue in inventory introduced by Change:
Ia74bbcac35c27928f7e96056b9449932253b75de

Change-Id: I48ca99ea58fbb624b8bccf205e40000115c53060
2016-10-20 10:06:04 -07:00
Jesse Pretorius 282de19074 Use dictionary for service group mappings
Change the 'ceilometer_service_names' from a list to a dictionary
mapping of services, groups that install those services. This brings
the method into line with that used in the os_neutron role in order
to implement a more standardised method.

The init tasks have been updated to run once and loop through this
mapping rather than being included multiple times and re-run against
each host. This may potentially reduce role run times.

Currently the reload of upstart/systemd scripts may not happen if
only one script changes as the task uses a loop with only one result
register. This patch implements handlers to reload upstart/systemd
scripts to ensure that this happens when any one of the scripts
change.

The handler to reload the services now only tries to restart the
service if the host is in the group for the service according to the
service group mapping. This allows us to ensure that handler
failures are no longer ignored and that no execution time is wasted
trying to restart services which do not exist on the host.

Finally:
- Common variables shared by each service's template files have
  been updated to use the service namespaced variables.
- Unused handlers have been removed.
- Unused variables have been removed.

Change-Id: I417f366e343a7b764e3bcd9ab75efc3a233b460b
2016-09-29 07:04:32 +01:00
Jenkins 493c058693 Merge "Ansible 2.1.1 role testing" 2016-09-22 21:42:12 +00:00
Travis Truman f257d2e6ca Ansible 2.1.1 role testing
Change-Id: Ieb7ba32b32019c45c50e7795dcb87f0764c965f9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-21 12:11:42 -04:00