ceilometer compute metrics don't work on metal AIO

Bug #2018619 reported by krzys_h
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Unassigned

Bug Description

I installed OpenStack AIO with ceilometer and gnocchi using the following commands:

git clone -b 26.1.1 https://opendev.org/openstack/openstack-ansible /opt/openstack-ansible
cd /opt/openstack-ansible
scripts/bootstrap-ansible.sh
export SCENARIO="aio_metal_horizon_aodh_gnocchi_ceilometer"
scripts/bootstrap-aio.sh
cd playbooks
openstack-ansible setup-hosts.yml
openstack-ansible setup-infrastructure.yml
openstack-ansible setup-openstack.yml

After completing the install and starting a test instance, some metrics appeared in "openstack metric list", but the cpu and memory.usage metrics I was most interested in did not. After wasting a lot of time debugging this I finally figured out that openstack-ansible misconfigured ceilometer due to the following lines in the ceilometer.conf.j2 template in the os_ceilometer role:

{% if 'ceilometer_agent_central' in group_names %}
polling_namespaces = central
{% elif 'ceilometer_agent_compute' in group_names %}
polling_namespaces = compute
{% endif %}

In a metal AIO build, group_names contains both ceilometer_agent_central and ceilometer_agent_compute, and the correct config should be:

polling_namespaces = central,compute

but instead I got:

polling_namespaces = central

After fixing the config manually and restarting ceilometer services, metrics started working fine. Or you can add the following to user_variables.yml as a workaround:

ceilometer_ceilometer_conf_overrides:
  DEFAULT:
    polling_namespaces: central,compute

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_ceilometer (master)
Changed in openstack-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_ceilometer (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_ceilometer/+/882466
Committed: https://opendev.org/openstack/openstack-ansible-os_ceilometer/commit/bfca55e20dcbf78cb6089fed5859fc4d2e735941
Submitter: "Zuul (22348)"
Branch: master

commit bfca55e20dcbf78cb6089fed5859fc4d2e735941
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri May 5 20:23:47 2023 +0200

    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

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_ceilometer (stable/zed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_ceilometer (stable/yoga)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_ceilometer (stable/xena)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_ceilometer (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_ceilometer/+/883548
Committed: https://opendev.org/openstack/openstack-ansible-os_ceilometer/commit/9367ff14e3590105526bd13bc99a6516e7e02fa5
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 9367ff14e3590105526bd13bc99a6516e7e02fa5
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri May 5 20:23:47 2023 +0200

    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
    (cherry picked from commit bfca55e20dcbf78cb6089fed5859fc4d2e735941)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_ceilometer (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_ceilometer/+/883549
Committed: https://opendev.org/openstack/openstack-ansible-os_ceilometer/commit/db7fb19664cc8a763d7b6128fffd320445e81728
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit db7fb19664cc8a763d7b6128fffd320445e81728
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri May 5 20:23:47 2023 +0200

    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
    (cherry picked from commit bfca55e20dcbf78cb6089fed5859fc4d2e735941)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_ceilometer (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_ceilometer/+/883570
Committed: https://opendev.org/openstack/openstack-ansible-os_ceilometer/commit/8809b044693c477e03339a6e37d1e770756d0846
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 8809b044693c477e03339a6e37d1e770756d0846
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri May 5 20:23:47 2023 +0200

    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
    (cherry picked from commit bfca55e20dcbf78cb6089fed5859fc4d2e735941)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_ceilometer yoga-eom

This issue was fixed in the openstack/openstack-ansible-os_ceilometer yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_ceilometer xena-eom

This issue was fixed in the openstack/openstack-ansible-os_ceilometer xena-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.