Public bug reported:

when using the mpt-statusd on a server, which has the RAID hardware
installed but currently no disks attached, it will continuously send out
emails stating that:

"This is a RAID status update from mpt-statusd.  The mpt-status
program reports that one of the RAIDs changed state:


Report from /etc/init.d/mpt-statusd on ..."


This message comes up every 5 minutes, even though the status of the RAID can't 
have changed.

Line 51 in the /etc/init/mpt.statusd file is the problem here:

 48         # Check ever $PERIOD seconds, send email on every status
 49         # change and repeat ever $REMIND seconds if the raid is still
 50         # bad.
 51         if (mpt-status -i $ID) |grep -q 'state OPTIMAL' ; then
 52             BADRAID=false
 53         else
 54             BADRAID=true
 55             logger -t mpt-statusd "detected non-optimal RAID status"
 56         fi

The "grep" in line 51 return 1, even if there is no output of mpt-status
at all. This is normal behaviour of grep though. But i think the script
should also check, if there is ANY output at all. Because it it doesn't,
it will continue to send out emails.

I know, i could uninstall it or do some other things to avoid this
situation, but there are some reasons why it make sense to have it
running on those machines.

- if someone temporarily removes the drives or put some drive in the server at 
a later point of time, it is easy to forget about the statusd
- in times of ansible, puppet, and other, more scripts are just checking for 
hardware and installing packages like statusd automatically
- the email is just wrong. there is no changed state. it is a bug
- other people might have more reasons

-----

I would expect that the statusd is not reporting on any changes or
alike, if there is no RAID configured or disks attached.

-----

# lsb_release -rd
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
 
-----

# apt-cache policy mpt-status
mpt-status:
  Installed: 1.2.0-8
  Candidate: 1.2.0-8
  Version table:
 *** 1.2.0-8 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
     1.2.0-4.2.hwraid1 500
        500 http://hwraid.le-vert.net/ubuntu wily/main amd64 Packages

** Affects: mpt-status (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629818

Title:
  mpt-statusd reports RAID changes even when there is no RAID

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mpt-status/+bug/1629818/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to