[Bug 802861] New: %restart_on_update macro generates warning: Stop syslog.service before reloading the daemons!
https://bugzilla.novell.com/show_bug.cgi?id=802861 https://bugzilla.novell.com/show_bug.cgi?id=802861#c0 Summary: %restart_on_update macro generates warning: Stop syslog.service before reloading the daemons! Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: All OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: archie@dellroad.org QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:18.0) Gecko/20100101 Firefox/18.0 Many RPMs use the %restart_on_update macro in their %post scripts. However, this script results in an error, with the following reported in /var/log/warn: Feb 8 10:56:12 test syslog-service-generator[15818]: Stop syslog.service before reloading the daemons! Feb 8 10:56:12 test systemd[1]: /lib/systemd/system-generators/syslog-service-generator exited with exit status 1. The above example is from an update of the apache2 RPM (to version apache2-2.2.22-4.10.1.x86_64). At best, this warning is annoying because it sets off Nagios alerts, etc. on my production systems. At worst, something is actually broken and there is a problem. In either case, this needs to be fixed. Perhaps the %restart_on_update can adjust its behavior to handle syslog.service as directed by the error message. Reproducible: Always Steps to Reproduce: 1. Update an RPM such as apache2 2. Look in /var/log/warn 3. Witness error message Actual Results: Feb 8 10:56:12 test syslog-service-generator[15818]: Stop syslog.service before reloading the daemons! Feb 8 10:56:12 test systemd[1]: /lib/systemd/system-generators/syslog-service-generator exited with exit status 1. Expected Results: (No warnings) $ uname -a Linux test.example.com 3.4.11-2.16-default #1 SMP Wed Sep 26 17:05:00 UTC 2012 (259fc87) x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/SuSE-release openSUSE 12.2 (x86_64) VERSION = 12.2 CODENAME = Mantis -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802861 https://bugzilla.novell.com/show_bug.cgi?id=802861#c Du Weihua <whdu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |whdu@suse.com AssignedTo|bnc-team-screening@forge.pr |mls@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802861 https://bugzilla.novell.com/show_bug.cgi?id=802861#c Michael Schröder <mls@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mls@suse.com AssignedTo|mls@suse.com |fcrozat@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802861 https://bugzilla.novell.com/show_bug.cgi?id=802861#c1 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@suse.com --- Comment #1 from Frederic Crozat <fcrozat@suse.com> 2013-03-01 10:49:12 UTC --- the generator is handled by werner -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802861 https://bugzilla.novell.com/show_bug.cgi?id=802861#c2 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mt@suse.com --- Comment #2 from Dr. Werner Fink <werner@suse.com> 2013-03-01 11:04:19 UTC --- Indeed running the syslog unit generator with syslogd/rsyslog/syslog-ng running may cause trouble as the text in the unit section is changed. Don't know if the systemd could handle this, that is if a daemon-reload will change the syslog service unit even if the old system logger is still running. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802861 https://bugzilla.novell.com/show_bug.cgi?id=802861#c3 --- Comment #3 from Marius Tomaschewski <mt@suse.com> 2013-03-01 12:25:01 UTC --- Well.. IMO this is a general problem and the %restart_on_update macro should be fixed to call "daemon-reload" before "try-restart <service>". Further: I've noticed recently, that /usr/lib/rpm/(suse_)macros are different than the macros added by the build service, where e.g. guards like YAST_IS_RUNNING or DISABLE_RESTART_ON_UPDATE are gone. In /usr/lib/rpm/macros there is: %service_del_postun() %{restart_on_update %{1}} And in /usr/lib/rpm/suse_macros is a: %restart_on_update() \ test -n "$FIRST_ARG" || FIRST_ARG=$1 \ if test "$FIRST_ARG" -ge 1 ; then \ test -f /etc/sysconfig/services && . /etc/sysconfig/services \ if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then \ test -x /bin/systemctl && /bin/systemctl daemon-reload >/dev/null 2>&1 || : \ for service in %{?*} ; do \ /etc/init.d/$service try-restart > /dev/null || : \ done \ fi \ fi \ %nil Current rpm's (from 12.2 and from 12.3) contain: postuninstall scriptlet (using /bin/sh): test -n "$FIRST_ARG" || FIRST_ARG=$1 if [ $FIRST_ARG -ge 1 ]; then # Package upgrade, not uninstall /usr/bin/systemctl try-restart XYZ.service >/dev/null 2>&1 || : else # package uninstall for service in XYZ.service ; do sysv_service=${service%.*} rm -f "/var/lib/systemd/migrated/$sysv_service" 2> /dev/null || : done /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : fi -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802861 https://bugzilla.novell.com/show_bug.cgi?id=802861#c Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|fcrozat@suse.com |systemd-maintainers@suse.de -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com