nagios-check falsely claims "Nagios not installed, or no nagios checks found"

Bug #1868195 reported by Paul Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mojo: Continuous Delivery for Juju
Fix Released
Undecided
Unassigned

Bug Description

On one of my CI jobs, nagios-check failed as follows:

2020-03-20 02:22:49 [ERROR] Nagios not installed, or no nagios checks found on ubuntu-mirror/1
2020-03-20 02:22:49 [ERROR] Nagios not installed, or no nagios checks found on ubuntu-mirror/0

I worked through the Nagios checks and they all exist and work, although not all of the succeed.

I checked the Mojo code, and the above is triggered by this:

        if 'No such file or directory' in output or 'sudo: unknown user: nagios' in output:
            error_output = "Nagios not installed, or no nagios checks found on {}".format(unit)

and having reviewed my checks' output, it was triggered by this:

ubuntu@juju-270af5-archive-servers-9-0:~$ /srv/ubuntu-mirror/bin/check-updates.sh archive.ubuntu.com /srv/ftp.root/ubuntu/.trace/ubuntu-juju-270af5-archive-servers-9-0
stat: cannot stat '/srv/ftp.root/ubuntu/.trace/ubuntu-juju-270af5-archive-servers-9-0': No such file or directory

I suggest the following:

 * include "output" when reporting a problem
 * separate the conditions above, and report them separately
 * tighten up or change the "No such file or directory" check to problem it's intended to disagnose

Related branches

Paul Collins (pjdc)
description: updated
Paul Collins (pjdc)
Changed in mojo:
assignee: nobody → Paul Collins (pjdc)
Revision history for this message
Paul Collins (pjdc) wrote :

Briefly assigned and unassigned, but the problem I just ran into is a different one with the same symptom.

Changed in mojo:
assignee: Paul Collins (pjdc) → nobody
Revision history for this message
Paul Collins (pjdc) wrote :

Well, I ended up working on this anyway. Linked branch should improve matters.

Changed in mojo:
status: New → Confirmed
status: Confirmed → Fix Committed
Tom Haddon (mthaddon)
Changed in mojo:
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.