Bug 1028075 - munin-node doesn't get added to chkconfig
munin-node doesn't get added to chkconfig
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: munin (Show other bugs)
el6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: d. johnson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 10:49 EST by Jeff Sheltren
Modified: 2014-04-15 19:30 EDT (History)
4 users (show)

See Also:
Fixed In Version: munin-2.0.20-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-06 23:26:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Sheltren 2013-11-07 10:49:43 EST
Description of problem:
After installing munin-node, it is not included in chkconfig.

# chkconfig --list munin-node
service munin-node supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add munin-node')


Version-Release number of selected component (if applicable):
munin-node-2.0.17-6.el6


Additional info:

Here's the scripts included in the package -- I see a call to remove munin-node from chkconfig on uninstall.  Note the comment about sysvinit, but there's no command directly after it.

preinstall scriptlet (using /bin/sh):
/usr/bin/getent group munin >/dev/null || \
  /usr/sbin/groupadd -r munin
/usr/bin/getent passwd munin >/dev/null || \
  /usr/sbin/useradd -r -g munin -d /var/lib/munin -s /sbin/nologin \
    -c "Munin user" munin
exit 0

#why this? search for BUG above
postinstall scriptlet (using /bin/sh):
# sysvinit only in f15 and older and epel
# Only run configure on a new install, not an upgrade.
if [ "$1" = "1" ]; then
     /usr/sbin/munin-node-configure --shell 2> /dev/null | sh >& /dev/null || :
fi
preuninstall scriptlet (using /bin/sh):
# Older installs use sysvinit / upstart
if [ "$1" = 0 ]; then
  service munin-node stop &>/dev/null || :
  /sbin/chkconfig --del munin-node
fi
postuninstall scriptlet (using /bin/sh):
if [ "$1" = "0" ]; then
  [ -d /etc/munin/plugins ] && \
    find /etc/munin/plugins/ -maxdepth 1 -type l -print0 | \
      xargs -0 rm || :
fi
Comment 1 d. johnson 2013-11-07 19:37:55 EST
Not sure I follow.  The only services that should be added automatically are listed here:

https://fedoraproject.org/wiki/Starting_services_by_default

Munin is not one of those.

Did you mean something different?
Comment 2 Jeff Sheltren 2013-11-08 11:06:46 EST
Right, it should not be enabled by default (chkconfig munin-node on), but it should get added to chkconfig when installed (chkconfig --add munin-node), and it's not currently.

I see the chkconfig --add call in the spec file, so it seems the conditional before it may be incorrect.
Comment 3 boss-chifra 2014-03-26 18:07:17 EDT
Agree with "Jeff Sheltren" it should get added to chkconfig when installed (chkconfig --add munin-node and chkconfig --add munin-asyncd), and it's not currently.

Seems the conditional may be incorrect. (in the spec file)

- %if ! 0%{?fedora} > 15 || 0%{?rhel} > 6
+ %if ! 0%{?fedora} > 15 || 0%{?rhel} > 4
Comment 4 d. johnson 2014-03-26 19:27:40 EDT
Ref:

http://pkgs.fedoraproject.org/cgit/munin.git/tree/munin.spec#n542

This says if NOT (fedora > 15) OR (RHEL > 6) run chkconfig.

That is correct.

If you are on a system newer than F15 or EL6, you do not use chkconfig at all. Instead you use systemctl.  The macro for this is:

%systemd_post munin-node.service
Comment 5 boss-chifra 2014-03-26 19:48:33 EDT
But it does not work. I don't see "/sbin/chkconfig --add munin-node" anywhere

-------------------------------------------------------------------------
rpm -qp --scripts munin-node-2.0.19-1.el6.noarch.rpm

preinstall scriptlet (using /bin/sh):
/usr/bin/getent group munin >/dev/null || \
  /usr/sbin/groupadd -r munin
/usr/bin/getent passwd munin >/dev/null || \
  /usr/sbin/useradd -r -g munin -d /var/lib/munin -s /sbin/nologin \
    -c "Munin user" munin
exit 0

#why this? search for BUG above
postinstall scriptlet (using /bin/sh):
# sysvinit only in f15 and older and epel
# Only run configure on a new install, not an upgrade.
if [ "$1" = "1" ]; then
     /usr/sbin/munin-node-configure --shell 2> /dev/null | sh >& /dev/null || :
fi
preuninstall scriptlet (using /bin/sh):
# Older installs use sysvinit / upstart
if [ "$1" = 0 ]; then
  service munin-node stop &>/dev/null || :
  /sbin/chkconfig --del munin-node
fi
postuninstall scriptlet (using /bin/sh):
if [ "$1" = "0" ]; then
  [ -d /etc/munin/plugins ] && \
    find /etc/munin/plugins/ -maxdepth 1 -type l -print0 | \
      xargs -0 rm || :
fi
Comment 6 Fedora Update System 2014-03-26 22:14:31 EDT
munin-2.0.19-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/munin-2.0.19-2.fc20
Comment 7 Fedora Update System 2014-03-26 22:17:03 EDT
munin-2.0.19-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/munin-2.0.19-2.fc19
Comment 8 Fedora Update System 2014-03-26 22:18:25 EDT
munin-2.0.19-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/munin-2.0.19-2.el6
Comment 9 Fedora Update System 2014-03-26 22:19:21 EDT
munin-2.0.19-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/munin-2.0.19-2.el5
Comment 10 boss-chifra 2014-03-27 02:39:44 EDT
And if it possible fix chkconfig --add for munin-asyncd, because i think 
this does not work correct
----------------------------------------
%post async
%if ! 0%{?fedora} > 15 || 0%{?rhel} > 6
  /sbin/chkconfig --add munin-asyncd
%endif
%if 0%{?rhel} > 6 || 0%{?fedora} > 15
  %if 0%{?systemd_post:1}
    %systemd_post munin-asyncd.service
  %else
    if [ $1 -eq 1 ] ; then
      # Initial installation
      /bin/systemctl daemon-reload >/dev/null 2>&1 || :
    fi
  %endif
%endif
--------------------------------------------
rpm -qp --scripts munin-async-2.0.19-1.el6.noarch.rpm
postinstall program: /bin/sh
Comment 11 Fedora Update System 2014-03-27 16:43:24 EDT
Package munin-2.0.19-2.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing munin-2.0.19-2.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-0971/munin-2.0.19-2.el5
then log in and leave karma (feedback).
Comment 12 Fedora Update System 2014-03-29 09:33:10 EDT
munin-2.0.20-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/munin-2.0.20-1.fc20
Comment 13 Fedora Update System 2014-03-29 09:34:47 EDT
munin-2.0.20-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/munin-2.0.20-1.fc19
Comment 14 Fedora Update System 2014-03-29 09:36:04 EDT
munin-2.0.20-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/munin-2.0.20-1.el6
Comment 15 Fedora Update System 2014-03-29 09:38:08 EDT
munin-2.0.20-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/munin-2.0.20-1.el5
Comment 16 Fedora Update System 2014-04-06 23:26:10 EDT
munin-2.0.20-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2014-04-06 23:26:40 EDT
munin-2.0.20-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2014-04-15 19:29:46 EDT
munin-2.0.20-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 19 Fedora Update System 2014-04-15 19:30:14 EDT
munin-2.0.20-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.