TypeError Due to Incorrect String Substitution

Bug #2080883 reported by Bryan Fraschetti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack RabbitMQ Server Charm
Fix Committed
Undecided
Bryan Fraschetti
Focal
Fix Committed
Undecided
Unassigned
Jammy
Fix Committed
Undecided
Unassigned
Noble
Fix Committed
Undecided
Unassigned

Bug Description

Issue forwarded on behalf of customer. Their statement:

NRPE check-rabbitmq-cluster error. Rabbitmq cluster was down without any alert.
When testing the check_rabbitmq_cluster.py check, it returns an error. When Rabbitmq is not down, the check works appropriately

Their traceback:
CRITICAL: %d partitions detected, %d nodes online.
Traceback (most recent call last):
File "/usr/local/lib/nagios/plugins/check_rabbitmq_cluster.py", line 101, in <module>
print(

TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple'

A fix was found by SE team at Canonical and will be PRed

Changed in charm-rabbitmq-server:
assignee: nobody → Bryan Fraschetti (bryanfraschetti)
summary: - Issue forwarded on behalf of customer. Their statement: NRPE check-
- rabbitmq-cluster error. rabbitmq cluster was down without any alert.
- When testing the check-rabbitmq-cluster check, it returns an error.
+ TypeError Due to Incorrect String Substitution
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-rabbitmq-server (master)
Changed in charm-rabbitmq-server:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-rabbitmq-server (master)

Reviewed: https://review.opendev.org/c/openstack/charm-rabbitmq-server/+/929577
Committed: https://opendev.org/openstack/charm-rabbitmq-server/commit/0914109091bcd8850ef39c4f2235d5dfd548cc88
Submitter: "Zuul (22348)"
Branch: master

commit 0914109091bcd8850ef39c4f2235d5dfd548cc88
Author: Bryan Fraschetti <email address hidden>
Date: Mon Sep 16 18:03:12 2024 -0400

    Fix string substitution in check_rabbitmq_cluster

    The string substitution in the check_rabbitmq_cluster script was improperly configured outside of the print statement. As a result, users did not receive alerts when a RabbitMQ cluster went down and encountered TypeError: unsupported operand when executing the script.

    Closes-bug: #2080883

    Change-Id: I049146cbd029e809bfc500a98fd62fff24ebda95

Changed in charm-rabbitmq-server:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-rabbitmq-server (stable/noble)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-rabbitmq-server (stable/jammy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-rabbitmq-server (stable/focal)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-rabbitmq-server (stable/noble)

Reviewed: https://review.opendev.org/c/openstack/charm-rabbitmq-server/+/929835
Committed: https://opendev.org/openstack/charm-rabbitmq-server/commit/7b5fd4774198a133270616f6b32ece774dc36eea
Submitter: "Zuul (22348)"
Branch: stable/noble

commit 7b5fd4774198a133270616f6b32ece774dc36eea
Author: Bryan Fraschetti <email address hidden>
Date: Mon Sep 16 18:03:12 2024 -0400

    Fix string substitution in check_rabbitmq_cluster

    The string substitution in the check_rabbitmq_cluster script was
    improperly configured outside of the print statement. As a result, users
    did not receive alerts when a RabbitMQ cluster went down and encountered
    TypeError: unsupported operand when executing the script.

    Closes-bug: #2080883

    Change-Id: I049146cbd029e809bfc500a98fd62fff24ebda95
    (cherry picked from commit 0914109091bcd8850ef39c4f2235d5dfd548cc88)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-rabbitmq-server (stable/jammy)

Reviewed: https://review.opendev.org/c/openstack/charm-rabbitmq-server/+/929836
Committed: https://opendev.org/openstack/charm-rabbitmq-server/commit/43f8a536c46e3730dbc42597a7fadb6fd36f1cf5
Submitter: "Zuul (22348)"
Branch: stable/jammy

commit 43f8a536c46e3730dbc42597a7fadb6fd36f1cf5
Author: Bryan Fraschetti <email address hidden>
Date: Mon Sep 16 18:03:12 2024 -0400

    Fix string substitution in check_rabbitmq_cluster

    The string substitution in the check_rabbitmq_cluster script was
    improperly configured outside of the print statement. As a result, users
    did not receive alerts when a RabbitMQ cluster went down and encountered
    TypeError: unsupported operand when executing the script.

    Closes-bug: #2080883

    Change-Id: I049146cbd029e809bfc500a98fd62fff24ebda95
    (cherry picked from commit 0914109091bcd8850ef39c4f2235d5dfd548cc88)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-rabbitmq-server (stable/focal)

Reviewed: https://review.opendev.org/c/openstack/charm-rabbitmq-server/+/929837
Committed: https://opendev.org/openstack/charm-rabbitmq-server/commit/12e539c0059d2e79a909b60683b6faa13038184b
Submitter: "Zuul (22348)"
Branch: stable/focal

commit 12e539c0059d2e79a909b60683b6faa13038184b
Author: Bryan Fraschetti <email address hidden>
Date: Mon Sep 16 18:03:12 2024 -0400

    Fix string substitution in check_rabbitmq_cluster

    The string substitution in the check_rabbitmq_cluster script was
    improperly configured outside of the print statement. As a result, users
    did not receive alerts when a RabbitMQ cluster went down and encountered
    TypeError: unsupported operand when executing the script.

    Closes-bug: #2080883

    Change-Id: I049146cbd029e809bfc500a98fd62fff24ebda95
    (cherry picked from commit 0914109091bcd8850ef39c4f2235d5dfd548cc88)

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.