[SRU] Munin core plugin "if_" doesn't work

Bug #1673357 reported by vvhk
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
munin (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Lucas Kanashiro
Yakkety
Won't Fix
Undecided
Unassigned

Bug Description

[Impact]

The network interface traffic metric plugin reports invalid values for network speed interface (negative values).

This is the upstream fix for this issue:

https://github.com/munin-monitoring/munin/commit/78c3c3aa

[Test Case]

Install munin and call the plugin checking for the network interface config:

$ multipass launch -n munin-test daily:16.04
$ multipass shell munin-test
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install munin -y
$ sudo munin-run if_ens4 config | tail -n 3
up.max -1000000
up.info Traffic of the ens4 interface. Maximum speed is -1 Mb/s.
down.max -1000000

[Regression Potential]

The risk of a regression is quite small, it is one-line change and it now checks if the value is greater than 0 instead of checking for the size of the returned string. However, if a regression is going to happen it will be in the network interface traffic metric plugin, more specifically regarding the interface speed metric.

[Original description]

The munin core plugin for network interface traffic metric, "if_", registers invalid values on the master side because the configuration phase does not report valid network speed interface. Reports negative range (up.max is negative, while up.min is 0), and thus registers as NaN by the master, even though the node itself sends valid numbers:

# munin-run if_ens3 config
.
.
.
up.min 0
up.max -1000000
up.info Traffic of the ens3 interface. Maximum speed is -1 Mb/s.
down.max -1000000

# munin-run if_ens3

down.value 107758093
up.value 77710387

See also: https://github.com/mail-in-a-box/mailinabox/issues/896

The bug has been fixed upstream:

https://github.com/munin-monitoring/munin/commit/290d5ac2be02ced4d09fda68dc561fcf082c9cbf

Related branches

Revision history for this message
vvhk (vvhk-deactivatedaccount-deactivatedaccount) wrote :

Ubuntu 16.04, server.

# apt-cache policy munin-plugins-core
munin-plugins-core:
  Installed: 2.0.25-2ubuntu0.16.04.3
  Candidate: 2.0.25-2ubuntu0.16.04.3
  Version table:
 *** 2.0.25-2ubuntu0.16.04.3 500
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.0.25-2 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
thank you for your report and your help to make Ubuntu better.
The eventual fix needed is:

https://github.com/munin-monitoring/munin/commit/78c3c3aa

Because the other two just revert each other:
https://github.com/munin-monitoring/munin/commit/f982751a
https://github.com/munin-monitoring/munin/commit/290d5ac2

On the older versions that are in Xenial/Yakkety the patch has to be applied vs ./plugins/node.d.linux/if_.in instead of plugins/node.d.linux/if_

2.0.33 as in Zesty has the fix already.

Changed in munin (Ubuntu):
status: New → Fix Released
tags: added: bitesize server-next
Changed in munin (Ubuntu):
importance: Undecided → Medium
Revision history for this message
vvhk (vvhk-deactivatedaccount-deactivatedaccount) wrote :

Thanks for responding so fast.

The commit I linked as fix is the last commit for that line, looking at the blame history for the plugin file, from the last valid tag point in time. So indeed, 78c3c3aa was first fix, broken by f982751a, then fixed again by reverting in 290d5ac2.

Just a minor technicality for correctness of this issue history :)

At any rate, I can confirm that the patch from either 78c3c3aa (older) or 290d5ac2 (newer) has fixed the issue.

Bryce Harrington (bryce)
Changed in munin (Ubuntu Yakkety):
status: New → Won't Fix
Changed in munin (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Looks like this bug fell through the cracks.

It's still valid, and easy to reproduce in a VM:

$ multipass launch daily:xenial -n x1
$ multipass exec x1 cat /sys/class/net/ens3/speed
-1

And if you have munin-node installed:
$ multipass exec x1 sudo munin-run if_ens3 config|tail -n 3
up.max -1000000
up.info Traffic of the ens3 interface. Maximum speed is -1 Mb/s.
down.max -1000000

With the fix, it asks you to install ethtool or another such tool:
up.info Traffic of the ens3 interface. Unable to determine interface speed. Please install ethtool, wireless-tools, mii-tool or whatever is appropriate for the interface.

But that also reports unknown speed, probably because it's a vm virtio device. But the speed can be set manually:

sudo ethtool -s ens3 speed 1000 duplex full

In any case, I guess unknown speed is better then a negative one, right?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Passing by ack'ing that this bug is still valid and in our queue.

Changed in munin (Ubuntu Xenial):
assignee: nobody → Lucas Kanashiro (lucaskanashiro)
status: Triaged → In Progress
description: updated
summary: - Munin core plugin "if_" doesn't work
+ [SRU] Munin core plugin "if_" doesn't work
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

I prepared a PPA with a package containing the upstream fix linked in comment #2 by Christian:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/xenial-munin/

Revision history for this message
Robie Basak (racb) wrote :

Thank you Lucas and Andreas for working on this, and sorry vvhk that a fix to 16.04 got delayed.

Before I review this fix, can I confirm that there is still at least one user who would benefit from this fix in 16.04 if it lands there now? Could any such user please speak up please?

If there is nobody, then there is no point in proceeding further with this in 16.04.

Revision history for this message
Brian Murray (brian-murray) wrote :

I'm accepting this because its a fine SRU and I don't think a Launchpad bug report (that doesn't show up in default searches) is a good way to find out if anybody would benefit from this fix.

Changed in munin (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello vvhk, or anyone else affected,

Accepted munin into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/munin/2.0.25-2ubuntu0.16.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Brian Murray (brian-murray) wrote : [munin/xenial] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for xenial for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Sorry for the delay. I verified the package in proposed and it works as expected:

$ multipass launch -n munin-test daily:16.04
$ multipass shell munin-test
# Add xenial-proposed to the sources list
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install munin -y
$ sudo munin-run if_ens4 config | tail -n 3
up.cdef up,8,*
up.min 0
up.info Traffic of the ens4 interface. Unable to determine interface speed. Please install ethtool, wireless-tools, mii-tool or whatever is appropriate for the interface.

As you can see no negative number is reported.

tags: added: verification-done verification-done-xenial
removed: removal-candidate verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package munin - 2.0.25-2ubuntu0.16.04.4

---------------
munin (2.0.25-2ubuntu0.16.04.4) xenial; urgency=medium

  * Add patch to avoid reporting speed below 0 for network devices
    (LP: #1673357).

 -- Lucas Kanashiro <email address hidden> Mon, 20 Jul 2020 10:04:10 -0300

Changed in munin (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for munin has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.