Bug#790303: [Pkg-net-snmp-devel] Bug#790303: snmpd: "snmpd" fails to "restart" during "logrotate" if it is too busy

2020-10-25 Thread Graham Inggs
Hi Craig

On Sun, 25 Oct 2020 at 23:03, Craig Small  wrote:
>   In snmpd version 5.7.3+dfsg-2 the init script was changed to follow the 
> standard LSB init setup.  This has retries built into it (or the 
> start-stop-daemon does anyway).  So I suspect this has been fixed, although 
> not in the way mentioned in the bug report.  Before I close this bug off, are 
> you asking to clean up old bugs or are you having the same issue?

I recently heard from a friend experiencing this issue, which led me
to this bug report.

Regards
Graham



Bug#790303: [Pkg-net-snmp-devel] Bug#790303: snmpd: "snmpd" fails to "restart" during "logrotate" if it is too busy

2020-10-25 Thread Craig Small
Hi Graham,
  In snmpd version 5.7.3+dfsg-2 the init script was changed to follow the
standard LSB init setup.  This has retries built into it (or the
start-stop-daemon does anyway).  So I suspect this has been fixed, although
not in the way mentioned in the bug report.  Before I close this bug off,
are you asking to clean up old bugs or are you having the same issue?

- Craig


On Sun, 25 Oct 2020 at 06:18, Graham Inggs  wrote:

> Is this fix really still pending?
>
> ___
> Pkg-net-snmp-devel mailing list
> pkg-net-snmp-de...@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-net-snmp-devel


Bug#790303: snmpd: "snmpd" fails to "restart" during "logrotate" if it is too busy

2020-10-24 Thread Graham Inggs
Is this fix really still pending?



Bug#790303: snmpd: snmpd fails to restart during logrotate if it is too busy

2015-06-27 Thread Paavo Hartikainen
Package: snmpd
Version: 5.4.3~dfsg-2.8+deb7u1
Severity: normal
Tags: patch

If snmpd is too busy to finish for restart within 2 seconds defined 
in /etc/init.d/snmpd, it is accidentally left not running after 
logrotate.  My solution was to check whether it has finished and add 
conditional delay.

This is how I solved it for production server:

---
diff --git a/init.d/snmpd b/init.d/snmpd
index 92e54bb..5b5a9bf 100755
--- a/init.d/snmpd
+++ b/init.d/snmpd
@@ -66,7 +66,9 @@ case $1 in
 start-stop-daemon --quiet --stop --oknodo --exec /usr/sbin/snmpd
 start-stop-daemon --quiet --stop --oknodo --exec /usr/sbin/snmptrapd
 # Allow the daemons time to exit completely.
-sleep 2
+sleep 2 \
+   pgrep --uid snmp --group root snmpd  sleep 4 \
+   pgrep --uid snmp --group root snmpd  sleep 8
 if [ $SNMPDRUN = yes -a -f /etc/snmp/snmpd.conf ]; then
start-stop-daemon --quiet --start --exec /usr/sbin/snmpd -- $SNMPDOPTS
echo -n  snmpd
---


-- System Information:
Debian Release: 7.8
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: mipsel (mips64)

Kernel: Linux 3.16.0-0.bpo.4-loongson-2f
Locale: LANG=POSIX, LC_CTYPE=POSIX (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages snmpd depends on:
ii  adduser3.113+nmu3
ii  debconf [debconf-2.0]  1.5.49
ii  libc6  2.13-38+deb7u8
ii  libsnmp15  5.4.3~dfsg-2.8+deb7u1
ii  libwrap0   7.6.q-24
ii  lsb-base   4.1+Debian8+deb7u1

snmpd recommends no packages.

snmpd suggests no packages.

-- Configuration Files:
/etc/snmp/snmpd.conf [Errno 13] Permission denied: u'/etc/snmp/snmpd.conf'
/etc/snmp/snmptrapd.conf [Errno 13] Permission denied: 
u'/etc/snmp/snmptrapd.conf'

-- debconf information:
  snmpd/upgradefrom521:


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org