Bug 1754769
| Summary: | [RFE] Automate collectd plugin configuration via TripleO for integration with SAF | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Brendan Shephard <bshephar> |
| Component: | puppet-collectd | Assignee: | Matthias Runge <mrunge> |
| Status: | CLOSED WONTFIX | QA Contact: | Leonid Natapov <lnatapov> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 13.0 (Queens) | CC: | asimonel, jbadiapa, jjoyce, jschluet, lmadsen, mmagr, mrunge, pmannidi, rmccabe, slinaber, sputhenp, tvignaud |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-10-16 05:51:12 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
We won't be adding parameters for collectd plugins. For plugin configuration you should use <Role>ExtraConfig. Could you describe here what are you trying to achieve? Maybe we can help you to implement your use case with current capabilities. I thought that might be the case.
They wanted to add all of the Overcloud nodes to the ping module. In the end, we just added the director node during the deployment:
collectd::plugin::ping::hosts: ['director_ip']
Then after the deployment we manually run a Ansible playbook that iterated over the entries in /etc/hosts and populated the 10-ping.conf file with a jinja2 template:
10-ping.j2.conf:
# Generated by Ansible
<LoadPlugin ping>
Globals false
</LoadPlugin>
<Plugin ping>
{%- for ip in host_list.stdout_lines|unique %}
Host "{{ip}}"
{%- endfor %}
</Plugin>
But I advised that this will generate a significant amount of traffic if it's deployed to every node (Controllers and Computes). Ideally, if it is indeed necessary to have the ping plugin, it should be limited to just the Controllers.
Since we seem to configure the ping plugin on every single node when it's installed, we would need at least one IP on all of the compute nodes as well for it to work. So we can leave the director IP in there.
I've opened another bz for adding the necessary plugins to openstack containers: https://bugzilla.redhat.com/show_bug.cgi?id=1762167 With that, this bz can be closed, since the requests raised here have now separate bzs with described tasks to be worked on and to be verified separately. |
Description of problem: When trying to configure plugins such as the collectd ping plugin, you need to specify a hosts variable (collectd::plugin::ping::hosts). This can be done manually like collectd::plugin::ping::hosts: ['hostA','hostB','hostC'] But, ideally we would have a mechanism to specify all overcloud nodes. The best we have at the moment is to use a yaql query similar to this: yaql: expression: $.data.selectMany($.split(" ")[0].distinct() data: str_split: - "\n" - {get_param: HostsEntry} Ideally, we would have a template that allows us to add all or some (maybe on a per role basis) of the Overcloud nodes to collectd plugins without having to create a bunch of custom heat templates with obscure queries. Version-Release number of selected component (if applicable): Red Hat OpenStack Platform 13, 14, 15 How reproducible: Easily Steps to Reproduce: 1. Enable collectd 2. Add the ping plugin 3. openstack overcloud deploy Actual results: If you just enable the ping plugin, you end up with this error during deployment: "Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Class[Collectd::Plugin::Ping]: parameter 'hosts' expects an Array value, got Undef at /etc/puppet/modules/tripleo/manifests/profile/base/metrics/collectd/collectd_plugin.pp:5:3 at /etc/puppet/modules/tripleo/manifests/profile/base/metrics/collectd/collectd_service.pp:8 on node hostname.domain.name", "+ rc=1", "+ set -e", "+ '[' 1 -ne 2 -a 1 -ne 0 ']'", "+ exit 1", Because we need to have hosts defined as an array: https://github.com/voxpupuli/puppet-collectd/blob/v8.0.1/manifests/plugin/ping.pp#L2-L12 Expected results: Have a parameter that allows us to specify which roles will be added to collectd plugins, then populate the array with each IP address assigned to those nodes. Additional info: