[Bug 1138214] New: mailgraph broken since maintenance update
http://bugzilla.opensuse.org/show_bug.cgi?id=1138214 Bug ID: 1138214 Summary: mailgraph broken since maintenance update Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.1 Hardware: Other OS: Other Status: NEW Severity: Major Priority: P5 - None Component: Maintenance Assignee: chris@computersalat.de Reporter: suse-beta@cboltz.de QA Contact: qa-bugs@suse.de CC: maintenance@opensuse.org Found By: --- Blocker: --- Jun 14 00:12:49 server systemd[1]: Started RRDtool frontend for Mail statistic (mailgraph). Jun 14 00:12:49 server mailgraph.pl[24409]: Error opening : No such file or directory at /usr/bin/mailgraph.pl line 578. Jun 14 00:12:49 server systemd[1]: mailgraph.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Jun 14 00:12:49 server systemd[1]: mailgraph.service: Unit entered failed state. Jun 14 00:12:49 server systemd[1]: mailgraph.service: Failed with result 'exit-code'. Especially note the "Error opening : No such file or directory" line which "shows" an empty filename before the colon. My guess is that this change in the default sysconfig file (which does _not_ get applied to /etc/sysconfig/mailgraph automagically) causes this: -MAILGRAPH_LOG_FILE="" +MAILGRAPH_LOG_FILE="/var/log/mail" If I change MAILGRAPH_LOG_FILE manually, I get at least another error message: Jun 14 00:20:02 server systemd[1]: Started RRDtool frontend for Mail statistic (mailgraph). Jun 14 00:20:02 server mailgraph.pl[29218]: Internal error: unknown type: at /usr/bin/mailgraph.pl line 452. Jun 14 00:20:02 server mailgraph.pl[29218]: Parse::Syslog::next(Parse::Syslog=HASH(0x55a9f31fb348)) called at /usr/bin/mailgraph.pl line 584 Jun 14 00:20:02 server mailgraph.pl[29218]: Parse::Syslog::main() called at /usr/bin/mailgraph.pl line 1054 Jun 14 00:20:02 server systemd[1]: mailgraph.service: Main process exited, code=exited, status=25/n/a Jun 14 00:20:02 server systemd[1]: mailgraph.service: Unit entered failed state. Jun 14 00:20:02 server systemd[1]: mailgraph.service: Failed with result 'exit-code'. Ah, that's caused by another change in the sysconfig file which doesn't get applied to /etc/sysconfig/mailgraph automatically: -MAILGRAPH_LOG_TYPE="" +MAILGRAPH_LOG_TYPE="syslog" After fixing this one, mailgraph finally starts again. Please fix this breakage (either by aotomatically adjusting existing sysconfig files that have empty values, or by pathing a default into mailgraph) and release another maintenance update. Note: I'm reporting this for 15.1, but it also affects 42.3 (and most likely also 15.0, but I don't have a 15.0 server to test that). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1138214 http://bugzilla.opensuse.org/show_bug.cgi?id=1138214#c1 Christian Wittmer <chris@computersalat.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS CC| |suse-beta@cboltz.de Flags| |needinfo?(suse-beta@cboltz. | |de) --- Comment #1 from Christian Wittmer <chris@computersalat.de> --- is the following fix ok or do you have a better idea ? Index: mailgraph.spec =================================================================== --- mailgraph.spec (revision 67f8d40003ffe3d4b5f5886bfc5e3a6c) +++ mailgraph.spec (working copy) @@ -113,6 +113,10 @@ %endif %pre +if [[ -f %{_sysconfdir}/sysconfig/%{name} ]] && + [[ -z $(awk -F'"' '/MAILGRAPH_PID/ {print $2}' %{_sysconfdir}/sysconfig/%{name}) ]]; then + mv %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/sysconfig/%{name}.rpmsic +fi %if 0%{?has_systemd} %service_add_pre %{name}.service %endif -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1138214 http://bugzilla.opensuse.org/show_bug.cgi?id=1138214#c2 Christian Boltz <suse-beta@cboltz.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(suse-beta@cboltz. | |de) | --- Comment #2 from Christian Boltz <suse-beta@cboltz.de> --- (In reply to Christian Wittmer from comment #1)
is the following fix ok or do you have a better idea ?
Your solution would move away the existing sysconfig file (including loosing existing changes to other config options). What about the following, that only fixes the broken options? (the following command should be one line) sed -i 's#^MAILGRAPH_LOG_TYPE=""$#MAILGRAPH_LOG_TYPE="syslog"# ; s#^MAILGRAPH_LOG_FILE=""#MAILGRAPH_LOG_FILE="/var/log/mail"#' /etc/sysconfig/mailgraph -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1138214 http://bugzilla.opensuse.org/show_bug.cgi?id=1138214#c3 Christian Wittmer <chris@computersalat.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(suse-beta@cboltz. | |de) --- Comment #3 from Christian Wittmer <chris@computersalat.de> --- I did prepare a fix with: +if [[ -f %{_sysconfdir}/sysconfig/%{name} ]]; then + sed -i -e 's#^MAILGRAPH_OPTS=" -d -v"$#MAILGRAPH_OPTS=" -v"#'\ + -e 's#^MAILGRAPH_LOG_TYPE=""$#MAILGRAPH_LOG_TYPE="syslog"#'\ + -e 's#^MAILGRAPH_LOG_FILE=""#MAILGRAPH_LOG_FILE="/var/log/mail"#'\ + %{_sysconfdir}/sysconfig/%{name} +fi tested and working. Please check ... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1138214 http://bugzilla.opensuse.org/show_bug.cgi?id=1138214#c5 Christian Wittmer <chris@computersalat.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED --- Comment #5 from Christian Wittmer <chris@computersalat.de> --- fixed ... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1138214 http://bugzilla.opensuse.org/show_bug.cgi?id=1138214#c6 Christian Boltz <suse-beta@cboltz.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(suse-beta@cboltz. | |de) | --- Comment #6 from Christian Boltz <suse-beta@cboltz.de> --- I don't have a machine with broken mailgraph left and therefore can't test - but your sed command looks correct. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com