Merge ~lvoytek/ubuntu/+source/munin:munin-node-configure-lp1680975-doc-fix-jammy into ubuntu/+source/munin:ubuntu/devel

Proposed by Lena Voytek
Status: Merged
Merged at revision: b31dd8d0a2b1b6bc5207f47416b18d8ac112ad81
Proposed branch: ~lvoytek/ubuntu/+source/munin:munin-node-configure-lp1680975-doc-fix-jammy
Merge into: ubuntu/+source/munin:ubuntu/devel
Diff against target: 83 lines (+63/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/munin-node-configure-doc-fix.patch (+54/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior (community) Approve
Canonical Server MOTU reviewers Pending
Canonical Server Pending
Review via email: mp+411872@code.launchpad.net

Description of the change

Created new fix for documentation which displays the correct commands that can be used in munin-node-configure. This patch includes the change found upstream at 5ee7fbda4a92efdcb0278aefa20befc4847c02d8 - https://github.com/munin-monitoring/munin/commit/5ee7fbda4a92efdcb0278aefa20befc4847c02d8

  * d/p/munin-node-configure-doc-fix.patch: Remove deprecated argument
    exitnoerror and update some snmp arguments to match their correct naming.
    (LP: 1680975)

PPA: ppa:lvoytek/munin-fix-munin-node-configure-docs-jammy

Steps to test:

# lxc launch images:ubuntu/jammy builder
# lxc exec builder bash

# apt update
# apt dist-upgrade
# apt install -y munin
# munin-node-configure --help

* This will print all options including the following:

Usage:
      munin-node-configure [options]

Options:

    ...

    --exitnoterror
        Do not consider plugins that exit non-zero exit-value as error.

    ...

  Snmp Options:

    ...

    --snmpauthpassword <password>
        Authentication password. Optional when encryption is also enabled,
        in which case defaults to the privacy password
        ("--snmpprivpassword").

    --snmpauthprotocol <protocol>
        Authentication protocol. One of 'md5' or 'sha' (HMAC-MD5-96, RFC1321
        and SHA-1/HMAC-SHA-96, NIST FIPS PIB 180, RFC2264). ['md5']

    --snmpprivpassword <password>
        Privacy password to enable encryption. There is no default. An empty
        ('') password is considered as no password and will not enable
        encryption.

        Privacy requires a privprotocol as well as an authprotocol and a
        authpassword, but all of these are defaulted (to 'des', 'md5', and
        the privpassword value, respectively) and may therefore be left
        unspecified.

    --snmpprivprotocol <protocol>
        If the privpassword is set this setting controls what kind of
        encryption is used to achieve privacy in the session. Only the very
        weak 'des' encryption method is supported officially. ['des']

        munin-node-configure also supports '3des' (CBC-3DES-EDE, aka
        Triple-DES, NIST FIPS 46-3) as specified in IETF
        draft-reeder-snmpv3-usm-3desede. Whether or not this works with any
        particular device, we do not know.

* The options shown above are all incorrect, running munin-node-configure with any of these arguments results in the following

# munin-node-configure --snmpauthpassword

Unknown option: snmpauthpassword
Usage:
      munin-node-configure [options]

* This is followed by the incorrect help information

# apt install -y software-properties-common
# add-apt-repository ppa:lvoytek/munin-fix-munin-node-configure-docs-jammy
# apt update
# apt upgrade
# munin-node-configure --help

* This will now print the help page with incorrect commands replaced with the following

Usage:
      munin-node-configure [options]

Options:
    ...

  Snmp Options:

    ...

    --snmpauthpass <password>
        Authentication password. Optional when encryption is also enabled,
        in which case defaults to the privacy password ("--snmpprivpass").

    --snmpauthproto <protocol>
        Authentication protocol. One of 'md5' or 'sha' (HMAC-MD5-96, RFC1321
        and SHA-1/HMAC-SHA-96, NIST FIPS PIB 180, RFC2264). ['md5']

    --snmpprivpass <password>
        Privacy password to enable encryption. There is no default. An empty
        ('') password is considered as no password and will not enable
        encryption.

        Privacy requires a privprotocol as well as an authprotocol and a
        authpassword, but all of these are defaulted (to 'des', 'md5', and
        the privpassword value, respectively) and may therefore be left
        unspecified.

    --snmpprivproto <protocol>
        If the privpassword is set this setting controls what kind of
        encryption is used to achieve privacy in the session. Only the very
        weak 'des' encryption method is supported officially. ['des']

        munin-node-configure also supports '3des' (CBC-3DES-EDE, aka
        Triple-DES, NIST FIPS 46-3) as specified in IETF
        draft-reeder-snmpv3-usm-3desede. Whether or not this works with any
        particular device, we do not know.

* exitnoerror has been removed with no replacement as it is just a depricated argument
* Running any of these replacement commands will result in the following

# munin-node-configure --snmpauthpass

Option snmpauthpass requires an argument
Usage:
      munin-node-configure [options]

* The correct help menu is then printed out afterward

Package Test Results for munin-node-configure:

t/munin-node-configure.t .................. ok
t/munin-run.t ............................. ok
t/munin_node_config.t ..................... ok
t/munin_node_configure_debug.t ............ ok
t/munin_node_configure_history.t .......... ok
# Hostname localhost resolves to 2 IPs. Using 127.0.0.1
t/munin_node_configure_hostenumeration.t .. ok
t/munin_node_configure_plugin.t ........... ok
t/munin_node_configure_pluginlist.t ....... ok

* Note that 1 autopkgtest is failing but is unrelated to this fix:

# Failed test 'Death signal is captured'
# at t/munin_node_os.t line 75.
# got: '0'
# expected: '13'
# Looks like you failed 1 test of 28.
t/munin_node_os.t .........................
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/28 subtests

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the MP, Lena.

I'm leaving a few inline comments, but overall it LGTM. A question: have you considered forwarding this patch to the Debian munin package? I don't have a problem with carrying this as a delta temporarily, but ultimately Debian could also benefit from this and we'd get rid of the maintenance burden.

I haven't built/tested the package yet, FWIW.

Thanks.

review: Needs Fixing
Revision history for this message
Lena Voytek (lvoytek) wrote (last edit ):

> Thanks for the MP, Lena.
>
> I'm leaving a few inline comments, but overall it LGTM. A question: have you
> considered forwarding this patch to the Debian munin package? I don't have a
> problem with carrying this as a delta temporarily, but ultimately Debian could
> also benefit from this and we'd get rid of the maintenance burden.
>
> I haven't built/tested the package yet, FWIW.
>
> Thanks.

Alright, I updated the code with your comments in mind. Hopefully the added comment on the patch file describes what is happening well enough. I can update it or the author/origin fields if needed though.

I'll get started on proposing this merge in Debian too.
Thanks!

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Lena. This is looking great now. I'm leaving two small comments below; I will wait for your reply before I proceed with the sponsorship.

Cheers.

Revision history for this message
Lena Voytek (lvoytek) wrote (last edit ):

Added the comma, good catch. I think it'd be good to get this patched upstream. I'll make sure the commands match up with their newest version then get a merge proposal up on their GitHub.

Thanks!

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Tuesday, November 16 2021, Lena Voytek wrote:

> Added the comma, good catch. I think it'd be good to get this patched
> upstream. I'll make sure the commands match up with their newest
> version then git a merge proposal up on their GitHub.

Awesome! In this case, it may be preferreable to just send this to
upstream and not to Debian, then.

This LGTM now, so I'm going to sponsor it.

 +1

Uploaded:

$ dput munin_2.0.57-1ubuntu2_source.changes
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/work/munin/munin_2.0.57-1ubuntu2_source.changes: Valid signature from 106DA1C8C3CBBF14
Checking signature on .dsc
gpg: /home/sergio/work/munin/munin_2.0.57-1ubuntu2.dsc: Valid signature from 106DA1C8C3CBBF14
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading munin_2.0.57-1ubuntu2.dsc: done.
  Uploading munin_2.0.57-1ubuntu2.debian.tar.xz: done.
  Uploading munin_2.0.57-1ubuntu2_source.buildinfo: done.
  Uploading munin_2.0.57-1ubuntu2_source.changes: done.
Successfully uploaded packages.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Revision history for this message
Sergio Durigan Junior (sergiodj) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 1c3ecea..1d05653 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+munin (2.0.57-1ubuntu2) jammy; urgency=medium
7+
8+ * d/p/munin-node-configure-doc-fix.patch: Remove deprecated argument
9+ exitnoerror and update some snmp arguments to match their correct naming.
10+ (LP: #1680975)
11+
12+ -- Lena Voytek <lena.voytek@canonical.com> Fri, 12 Nov 2021 15:27:50 -0700
13+
14 munin (2.0.57-1ubuntu1) groovy; urgency=medium
15
16 * Merge from Debian unstable
17diff --git a/debian/patches/munin-node-configure-doc-fix.patch b/debian/patches/munin-node-configure-doc-fix.patch
18new file mode 100644
19index 0000000..770571a
20--- /dev/null
21+++ b/debian/patches/munin-node-configure-doc-fix.patch
22@@ -0,0 +1,54 @@
23+Description: Edit munin-node-configure documentation to match correct arguments
24+Author: Lena Voytek <lena.voytek@canonical.com>
25+Origin: upstream, https://github.com/munin-monitoring/munin/commit/5ee7fbda4a92efdcb0278aefa20befc4847c02d8
26+Bug: https://github.com/munin-monitoring/munin/issues/1341
27+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/munin/+bug/1680975
28+Last-Update: 2021-11-16
29+---
30+This patch combines the upstream patch referenced above, which removes the exitnoerror info, with
31+a custom patch that modifies the snmp argument names.
32+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
33+--- a/node/sbin/munin-node-configure
34++++ b/node/sbin/munin-node-configure
35+@@ -501,10 +501,6 @@
36+
37+ Override plugin library [@@LIBDIR@@/plugins/]
38+
39+-=item B<< --exitnoterror >>
40+-
41+-Do not consider plugins that exit non-zero exit-value as error.
42+-
43+ =item B<< --suggest >>
44+
45+ Suggest plugins that might be added or removed, instead of those that are
46+@@ -616,17 +612,17 @@
47+
48+ Username. There is no default.
49+
50+-=item B<< --snmpauthpassword <password> >>
51++=item B<< --snmpauthpass <password> >>
52+
53+ Authentication password. Optional when encryption is also enabled, in which
54+-case defaults to the privacy password (C<--snmpprivpassword>).
55++case defaults to the privacy password (C<--snmpprivpass>).
56+
57+-=item B<< --snmpauthprotocol <protocol> >>
58++=item B<< --snmpauthproto <protocol> >>
59+
60+ Authentication protocol. One of 'md5' or 'sha' (HMAC-MD5-96, RFC1321 and
61+ SHA-1/HMAC-SHA-96, NIST FIPS PIB 180, RFC2264). ['md5']
62+
63+-=item B<< --snmpprivpassword <password> >>
64++=item B<< --snmpprivpass <password> >>
65+
66+ Privacy password to enable encryption. There is no default. An empty ('')
67+ password is considered as no password and will not enable encryption.
68+@@ -635,7 +631,7 @@
69+ but all of these are defaulted (to 'des', 'md5', and the privpassword value,
70+ respectively) and may therefore be left unspecified.
71+
72+-=item B<< --snmpprivprotocol <protocol> >>
73++=item B<< --snmpprivproto <protocol> >>
74+
75+ If the privpassword is set this setting controls what kind of encryption is
76+ used to achieve privacy in the session. Only the very weak 'des' encryption
77diff --git a/debian/patches/series b/debian/patches/series
78new file mode 100644
79index 0000000..9116287
80--- /dev/null
81+++ b/debian/patches/series
82@@ -0,0 +1 @@
83+munin-node-configure-doc-fix.patch

Subscribers

People subscribed via source and target branches