Comment 3 for bug 2008046

Revision history for this message
DUFOUR Olivier (odufourc) wrote :

Hello,

I've tested the fix and can confirm with latest/edge both work for :
* new units using from the beginning the latest/edge channel ;
* old units by upgrading NRPE charm from latest/stable to latest/edge.
(and confirming it was failing previously on latest/stable in the same model)

#
# Before the upgrade
#
$ juju status
Model Controller Cloud/Region Version SLA Timestamp
nrpe lab-default lab/default 2.9.38 unsupported 03:20:36Z

App Version Status Scale Charm Channel Rev Exposed Message
nagios active 1 nagios latest/stable 58 no ready
nrpe active 1 nrpe latest/edge 99 no Ready
nrpe-old active 1 nrpe latest/stable 97 no Ready
ubuntu 22.04 active 1 ubuntu latest/stable 21 no
ubuntu-focal 20.04 active 1 ubuntu stable 21 no

Unit Workload Agent Machine Public address Ports Message
nagios/0* active idle 0/lxd/0 192.168.28.48 80/tcp ready
ubuntu-focal/0* active idle 0/lxd/1 192.168.28.81
  nrpe-old/0* active idle 192.168.28.81 icmp,5666/tcp Ready
ubuntu/0* active idle 0 192.168.24.237
  nrpe/0* active idle 192.168.24.237 icmp,5666/tcp Ready

Machine State Address Inst id Series AZ Message
0 started 192.168.24.237 R330 jammy default Deployed
0/lxd/0 started 192.168.28.48 juju-4ef8b9-0-lxd-0 bionic default Container started
0/lxd/1 started 192.168.28.81 juju-4ef8b9-0-lxd-1 focal default Container started

ubuntu@maas:~$ juju run-action nrpe-old/0 ack-reboot --wait
unit-nrpe-old-0:
  UnitId: nrpe-old/0
  id: "4"
  message: exit status 1
  results:
    ReturnCode: 1
    Stderr: |
      Traceback (most recent call last):
        File "/var/lib/juju/agents/unit-nrpe-old-0/charm/actions/ack-reboot", line 28, in <module>
          services.manager.reconfigure_services("nrpe-config")
      AttributeError: module 'services' has no attribute 'manager'
  status: failed
  timing:
    completed: 2023-02-28 03:20:55 +0000 UTC
    enqueued: 2023-02-28 03:20:53 +0000 UTC
    started: 2023-02-28 03:20:54 +0000 UTC

#
# After the upgrade of the charm
#
ubuntu@maas:~$ juju upgrade-charm nrpe-old --channel latest/edge
Added charm-hub charm "nrpe", revision 99 in channel latest/edge, to the model
Leaving endpoints in "oamv4-space": general-info, local-monitors, monitors, nrpe, nrpe-external-master

$ juju status
Model Controller Cloud/Region Version SLA Timestamp
nrpe lab-default lab/default 2.9.38 unsupported 03:21:41Z

App Version Status Scale Charm Channel Rev Exposed Message
nagios active 1 nagios latest/stable 58 no ready
nrpe active 1 nrpe latest/edge 99 no Ready
nrpe-old active 1 nrpe latest/edge 99 no Ready
ubuntu 22.04 active 1 ubuntu latest/stable 21 no
ubuntu-focal 20.04 active 1 ubuntu stable 21 no

Unit Workload Agent Machine Public address Ports Message
nagios/0* active idle 0/lxd/0 192.168.28.48 80/tcp ready
ubuntu-focal/0* active idle 0/lxd/1 192.168.28.81
  nrpe-old/0* active idle 192.168.28.81 icmp,5666/tcp Ready
ubuntu/0* active idle 0 192.168.24.237
  nrpe/0* active idle 192.168.24.237 icmp,5666/tcp Ready

Machine State Address Inst id Series AZ Message
0 started 192.168.24.237 R330 jammy default Deployed
0/lxd/0 started 192.168.28.48 juju-4ef8b9-0-lxd-0 bionic default Container started
0/lxd/1 started 192.168.28.81 juju-4ef8b9-0-lxd-1 focal default Container started

ubuntu@maas:~$ juju run-action nrpe-old/0 ack-reboot --wait
unit-nrpe-old-0:
  UnitId: nrpe-old/0
  id: "6"
  results:
    Stdout: |
      lxc
      lxc
      lxc
    message: known reboot time updated to 2023-02-28 03:17:55
  status: completed
  timing:
    completed: 2023-02-28 03:21:47 +0000 UTC
    enqueued: 2023-02-28 03:21:46 +0000 UTC
    started: 2023-02-28 03:21:46 +0000 UTC