Bugs about PM interface

Bug #1990828 reported by Yi Feng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Undecided
Unassigned

Bug Description

1. The Prometheus Rule created with Create PM Job fails when used in Prometheus.

2. When Tacker receives the alert sent by Alertmanager and checks its parameters, it fails.
error log:
Sep 26 15:54:49 devstack-sandbox tacker-server[2904876]: 2022-09-26 15:54:49.822 INFO tacker.sol_refactored.api.prometheus_plugin_wsgi [-] POST http://172.16.30.39:9890/pm_event
Sep 26 15:54:49 devstack-sandbox tacker-server[2904876]: 2022-09-26 15:54:49.825 ERROR tacker.sol_refactored.common.prometheus_plugin [req-f8b788f2-5c82-4430-aebc-4330d8120607 None None] PrometheusPluginValidationError: Invalid input for field/attribute value. Value: 0. '0' is not of type 'number': tacker.sol_refactored.common.exceptions.PrometheusPluginValidationError: Invalid input for field/attribute value. Value: 0. '0' is not of type 'number'

3. In the input check of the objectType in CreatePmJobRequest, the expected value is Vnf/Vnfc/VnfIntCP/VnfExtCP.
https://opendev.org/openstack/tacker/src/branch/master/tacker/sol_refactored/api/schemas/vnfpm_v2.py#L52-L55
However, when creating a Prometheus monitoring rule, the set objectType is Vnf/Vnfc/VnfIntCp/VnfExtCp, which is inconsistent with the input check.
https://opendev.org/openstack/tacker/src/branch/master/tacker/sol_refactored/common/prometheus_plugin.py#L525-L531
A PrometheusPluginError will occur.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/859377

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

Reviewed: https://review.opendev.org/c/openstack/tacker/+/859377
Committed: https://opendev.org/openstack/tacker/commit/4737a70aa2dd1a0e4db6bc54bcceb691b26b7bc0
Submitter: "Zuul (22348)"
Branch: master

commit 4737a70aa2dd1a0e4db6bc54bcceb691b26b7bc0
Author: Koji Shimizu <email address hidden>
Date: Tue Sep 27 13:58:54 2022 +0900

    Fix Prometheus Plugin syntax error

    Creating PM job was failed because there are mismatch
    about spelling, regular expression and prometheus
    rule expression. This patch fixes this problem.

    Closes-Bug: #1990828
    Change-Id: Iae0e85361b8c3759621849a72e9b82fd2fe278ed

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

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/tacker/+/859742

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/859742
Committed: https://opendev.org/openstack/tacker/commit/aa51977eca9ae18b3842435f3669a108eafaa4d0
Submitter: "Zuul (22348)"
Branch: stable/zed

commit aa51977eca9ae18b3842435f3669a108eafaa4d0
Author: Koji Shimizu <email address hidden>
Date: Tue Sep 27 13:58:54 2022 +0900

    Fix Prometheus Plugin syntax error

    Creating PM job was failed because there are mismatch
    about spelling, regular expression and prometheus
    rule expression. This patch fixes this problem.

    Closes-Bug: #1990828
    Change-Id: Iae0e85361b8c3759621849a72e9b82fd2fe278ed

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 8.0.0.0rc2

This issue was fixed in the openstack/tacker 8.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 9.0.0.0rc1

This issue was fixed in the openstack/tacker 9.0.0.0rc1 release candidate.

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.