upgrade from Stein to Train does not remove NRPE check for nova-consoleauth

Bug #1904650 reported by Xav Paice
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Fix Released
Medium
Felipe Reyes

Bug Description

When upgrading a cloud from bionic-stein to bionic-train, charm cs:nova-cloud-controller-348, the NRPE check for the nova-consoleauth.service service status is not removed, resulting in 'Critical' alerts for a service that was actually removed from the system as part of the upgrade.

Revision history for this message
Paul Goins (vultaire) wrote :

Workaround:

unit=<ncc-unit-id>
# Dump current relation data in case something
juju exec -u $unit 'relation-get -r $(relation-ids nrpe-external-master) - '$unit
# Rewrite the monitors field, dropping the nova-consoleauth line
juju exec -u $unit 'echo "monitors: |" >> relation_fix.yaml; rel_id=$(relation-ids nrpe-external-master); relation-get -r $rel_id monitors '$unit' | awk "!/nova-consoleauth/" | sed -e "s/^/ /" >> relation_fix.yaml; relation-set -r $rel_id --file relation_fix.yaml; rm relation_fix.yaml'
# Re-dump relation data to confirm it got rewritten as desired
juju exec -u $unit 'relation-get -r $(relation-ids nrpe-external-master) - '$unit

tags: added: openstack-upgrade
Changed in charm-nova-cloud-controller:
status: New → Incomplete
status: Incomplete → Triaged
tags: added: monitoring
Revision history for this message
Paul Goins (vultaire) wrote :

It looks like there's a remove_deprecated_checks helper method (in charmhelpers I think?), but it never gets called with regard to nova-consoleauth.

Changed in charm-nova-cloud-controller:
importance: Undecided → Medium
Revision history for this message
Gábor Mészáros (gabor.meszaros) wrote :

still hitting this issue during upgrades (from Queens, through R/S/T to Ussuri)

Revision history for this message
Gábor Mészáros (gabor.meszaros) wrote :

same seems to apply to the nova-api-os-compute.service lack of removal. The apache service gets disabled, but the nrpe check is never revoked from the relations (Rocky onwards).

tags: added: aubergine
Felipe Reyes (freyes)
Changed in charm-nova-cloud-controller:
assignee: nobody → Felipe Reyes (freyes)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (master)
Changed in charm-nova-cloud-controller:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.opendev.org/c/openstack/charm-nova-cloud-controller/+/822201
Committed: https://opendev.org/openstack/charm-nova-cloud-controller/commit/bebed44c3bace64838500e6438502eec1f9fef85
Submitter: "Zuul (22348)"
Branch: master

commit bebed44c3bace64838500e6438502eec1f9fef85
Author: Felipe Reyes <email address hidden>
Date: Fri Dec 17 17:46:51 2021 -0300

    Remove nrpe check of nova-consoleauth when not needed.

    nova-consoleauth was removed for OpenStack >= Train, this change will
    remove the nrpe check associated with it when is_consoleauth_enabled()
    returns False.

    Change-Id: I891634fc8001597089312801b29a80336543f5f0
    Closes-Bug: #1904650

Changed in charm-nova-cloud-controller:
status: In Progress → Fix Committed
Felipe Reyes (freyes)
Changed in charm-nova-cloud-controller:
milestone: none → 22.04
Changed in charm-nova-cloud-controller:
status: Fix Committed → Fix Released
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.