Bug 2089354

Summary: [RHOSP 17.0] OSP 17 VMs are not including the "name" portion when collectd virt hostname_format parameter is specified
Product: Red Hat OpenStack Reporter: Leonid Natapov <lnatapov>
Component: collectdAssignee: Matthias Runge <mrunge>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: high    
Version: 17.0 (Wallaby)CC: jbadiapa, jjoyce, jschluet, lars, lmadsen, mmagr, mrunge, slinaber, tvignaud
Target Milestone: betaKeywords: Regression, Triaged
Target Release: 17.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: collectd-5.12.0-9.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-21 12:21:38 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:

Description Leonid Natapov 2022-05-23 13:42:17 UTC
Description of problem:

Deployed OSP17 with STF. Deploy Yaml files included Collectd ExtraConfig configuration for virt plugin which suppose to provide instances names when showing them in promethues and grafana.


collectd::plugin::virt::hostname_format: metadata uuid hostname
collectd::plugin::virt::plugin_instance_format: metadata

but name portion of created instances in OSP17 not included.


For example:

OSP16.2 instances show:

 plugin_instance="workload_instance_0"

OSP17 instances show:
 
 plugin_instance="base"

Comment 2 Matthias Runge 2022-05-25 14:52:27 UTC
Please provide more info. What is in the template and what is in the config? Are you saying this is a regression in puppet-collectd (i.e. the config is different)?

Comment 5 Matthias Runge 2022-05-25 15:32:56 UTC
please use quotes around the parameters. 
collectd::plugin::virt::hostname_format: "metadata uuid hostname"

Comment 6 Matthias Runge 2022-05-25 16:26:04 UTC
changing component from puppet-collectd to collectd, there was no change in puppet-collectd in the virt plugin for the last 2 years.

Comment 7 Leonid Natapov 2022-05-25 18:50:58 UTC
(In reply to Matthias Runge from comment #2)
> Please provide more info. What is in the template and what is in the config?
> Are you saying this is a regression in puppet-collectd (i.e. the config is
> different)?

So I am using identical templates for osp16.2 and osp17 (except clouds names)

Both templates have the same lines:

collectd::plugin::virt::hostname_format: metadata uuid hostname
collectd::plugin::virt::plugin_instance_format: metadata


plugin_instance_format: metadata will enable representation of created instances by their actual name in Prometheus e.g. you will see in prometheus VMs name like: plugin_instance="leonid"


In OSP17 this doesn't work and I see generic plugin_instance="base" for all instances created in OSP17.

Comment 8 Leif Madsen 2022-05-26 15:57:51 UTC
I was thinking this might be related to https://bugzilla.redhat.com/show_bug.cgi?id=1954103 but that covered the PluginInstance configuration, not the Hostname configuration.

Please provide the packaged versions in 16.2 vs 17.0 for the puppet-collectd and collectd versions to determine if there is a version regression / non-bump.

Will require additional investigation likely so we'll need to get this assigned to a developer to review code unless QE will perform the code walk and investigation.

Comment 9 Leonid Natapov 2022-05-27 07:11:15 UTC
(In reply to Leif Madsen from comment #8)
> I was thinking this might be related to
> https://bugzilla.redhat.com/show_bug.cgi?id=1954103 but that covered the
> PluginInstance configuration, not the Hostname configuration.
> 
> Please provide the packaged versions in 16.2 vs 17.0 for the puppet-collectd
> and collectd versions to determine if there is a version regression /
> non-bump.
> 
> Will require additional investigation likely so we'll need to get this
> assigned to a developer to review code unless QE will perform the code walk
> and investigation.

OSP 16.2:

puppet-collectd-12.0.1-2.20220104100218.4686e16.el8ost.noarch
collectd-5.11.0-10.el8ost.1.x86_64

OSP17:

puppet-collectd-13.0.1-0.20220511160845.ad138a7.el9ost.noarch
collectd-5.12.0-7.el9ost.x86_64

Comment 12 Matthias Runge 2022-06-03 09:31:10 UTC
Tried to reproduce here, I see in the collectd log:

libvirt: Domain Config error : metadata not found: Requested metadata element is not present

Leonid, can you confirm?

Comment 13 Matthias Runge 2022-06-03 09:51:55 UTC
Workaround?

Set
HostnameMetadataNS "http://openstack.org/xmlns/libvirt/nova/1.1"
in the collectd virt plugin config. Unfortunately, that setting is not exposed in puppet-collectd

Comment 14 Matthias Runge 2022-06-03 13:05:21 UTC
https://github.com/collectd/collectd/pull/4011

Comment 20 Leonid Natapov 2022-06-19 15:10:55 UTC
Fixed
plugin_instance="workload_instance_1", service="default-osp17-coll-meter"

Comment 26 errata-xmlrpc 2022-09-21 12:21:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543