cinder volume usage audit send actions cause cinder to emit duplicated events in ceilometer notifications

Bug #1968734 reported by Siavash Sardari
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Unassigned

Bug Description

The send_actions option in cinder-volume-usage-audit service will cause cinder to emit duplicate volume and snapshot create and delete notifications generated in the specified period on ceilometer event pipeline. While there might be scenarios which rely on this function, there are certain scenarios which duplicate notifications, will cause harm to the system.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_cinder (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_cinder (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_cinder/+/837570
Committed: https://opendev.org/openstack/openstack-ansible-os_cinder/commit/66eb424de5029d92d5bf6cdd3992d9e0c8e2a63a
Submitter: "Zuul (22348)"
Branch: master

commit 66eb424de5029d92d5bf6cdd3992d9e0c8e2a63a
Author: siavash sardari <email address hidden>
Date: Tue Apr 12 18:18:38 2022 +0430

    Add the ability to disable send_actions option in cinder-volume-usage-audit service.

    Change-Id: I351279dab0d90e60573df7db4c80b63320dff787
    Closes-Bug: #1968734

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_cinder (stable/xena)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_cinder (stable/wallaby)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_cinder (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_cinder/+/838210
Committed: https://opendev.org/openstack/openstack-ansible-os_cinder/commit/1a1b9f4238e74cc7d1a03499b96b24c0e6ce9b27
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 1a1b9f4238e74cc7d1a03499b96b24c0e6ce9b27
Author: siavash sardari <email address hidden>
Date: Tue Apr 12 18:18:38 2022 +0430

    Add the ability to disable send_actions option in cinder-volume-usage-audit service.

    Change-Id: I351279dab0d90e60573df7db4c80b63320dff787
    Closes-Bug: #1968734
    (cherry picked from commit 66eb424de5029d92d5bf6cdd3992d9e0c8e2a63a)

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

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_cinder/+/838211
Committed: https://opendev.org/openstack/openstack-ansible-os_cinder/commit/5e8e7720e7516b60a0c552c552ca9e35a89cff45
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 5e8e7720e7516b60a0c552c552ca9e35a89cff45
Author: siavash sardari <email address hidden>
Date: Tue Apr 12 18:18:38 2022 +0430

    Add the ability to disable send_actions option in cinder-volume-usage-audit service.

    Change-Id: I351279dab0d90e60573df7db4c80b63320dff787
    Closes-Bug: #1968734
    (cherry picked from commit 66eb424de5029d92d5bf6cdd3992d9e0c8e2a63a)

Revision history for this message
Christian Rohmann (christian-rohmann) wrote (last edit ):

Siavash I just ran into this bug. Can you maybe clarify the scenarios you are referring to in a little more detail?

I am wondering if cinder will emit create and delete notifications for volumes, snapshots, backups if notifications ([oslo_messaging_notifications] section in the config) are configured? If so then I understand that it makes total sense to disable sending those again through the
cinder-volume-usage-audit tool.

But looking at the code (https://github.com/openstack/cinder/blob/2b0567b0e5b28f62c28cadfe619d8a209c61de3c/cinder/volume/flows/manager/create_volume.py#L1275) notifications seems to be send for create/delete actions.

Revision history for this message
Siavash Sardari (siavash.sardari) wrote :

I believe the cinder-volume-usage-audit tool uses the notification queues ([oslo_messaging_notifications] section in the config) to emit metrics from the cinder resources.

I kinda understand what you are saying here, and honestly, I think emitting those notifications after up to half an hour from the actual event is not a good practice. But there might be some scenarios in which people didn't define creation and delete events in their event definitions and rely on the audit process to emit the notification for billing purposes (it may not be a real-time event, but it works if you just wanna get a billing report .e.x at the end of the month)

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

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

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

This issue was fixed in the openstack/openstack-ansible-os_cinder wallaby-eom release.

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

This issue was fixed in the openstack/openstack-ansible-os_cinder 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.