Fix failures discoved by parselogs and systemd test cases
cover Fix failures discoved by parselogs and systemd test cases
The following changes since commit ddbd7b0cd6580ee26e11aa87e426fb294b372d64:
meta-yocto-bsp: bump to the latest linux stable kernel for edgerouter/beaglebone (2018-06-12 23:34:40 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/parselogs_failures
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/parselogs_failures
Chen Qi (7):
oeqa/runtime/cases/parselogs.py: extend common_errors list
watchdog: remove the useless watchdog-conf.patch
watchdog: disable systemd services by default
watchdog: make init script start after syslog
watchdog: fix init script for sysvinit oeqa/runtime/cases/parselogs.py: ignore a message from watchdog
dnf: default to disable systemd units
meta/lib/oeqa/runtime/cases/parselogs.py | 2 + meta/recipes-devtools/dnf/dnf_2.7.5.bb | 1 + .../watchdog/watchdog/watchdog-conf.patch | 16 --- .../watchdog/watchdog/watchdog-init.patch | 56 ----------- .../watchdog/watchdog/watchdog.init | 110 +++++++++++++++++++++ meta/recipes-extended/watchdog/watchdog_5.15.bb | 14 +-- 6 files changed, 121 insertions(+), 78 deletions(-) delete mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch delete mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-init.patch create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog.init
Signature · 1 line
1.9.1
PATCH 1/7 oeqa/runtime/cases/parselogs.py: extend common_errors list
Add the following line to common_errors list.
Failed to read /var/lib/nfs/statd/state: Success
This message is not harmful, it does not result in rpc.statd starting failure.
--- meta/lib/oeqa/runtime/cases/parselogs.py | 1 + 1 file changed, 1 insertion(+)
meta/lib/oeqa/runtime/cases/parselogs.py +1 -0
@@ -49,6 +49,7 @@ common_errors = [ "error: couldn\'t mount because of unsupported optional features", "GPT: Use GNU Parted to correct GPT errors", "Cannot set xattr user.Librepo.DownloadInProgress", + "Failed to read /var/lib/nfs/statd/state: Success", ] video_related = [
Signature · 1 line
1.9.1
PATCH 2/7 watchdog: remove the useless watchdog-conf.patch
In reply to Chen QiThis patch modifies watchdog.conf file. But this file is deliberately deleted in do_install. The current mechanism in OE is to use another recipe watchdog-conf to handle watchdog configuration. So the patch is really useless.
--- .../watchdog/watchdog/watchdog-conf.patch | 16 ---------------- meta/recipes-extended/watchdog/watchdog_5.15.bb | 1 - 2 files changed, 17 deletions(-) delete mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch deleted +0 -16
@@ -1,16 +0,0 @@ -Signed-off-by: Diego Rondini <[email protected]> -Upstream-Status: Inappropriate - -Index: watchdog-5.15/watchdog.conf -=================================================================== ---- watchdog-5.15.orig/watchdog.conf -+++ watchdog-5.15/watchdog.conf -@@ -28,7 +28,7 @@ - #retry-timeout = 60 - #repair-maximum = 1 - --#watchdog-device = /dev/watchdog -+watchdog-device = /dev/watchdog - - # Defaults compiled into the binary - #temperature-sensor =
meta/recipes-extended/watchdog/watchdog_5.15.bb +0 -1
@@ -12,7 +12,6 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \ file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \ file://watchdog-init.patch \ - file://watchdog-conf.patch \ file://wd_keepalive.init \ "
Signature · 1 line
1.9.1
PATCH 3/7 watchdog: disable systemd services by default
In reply to Chen Qisystemd has internal support for watchdog. See the RuntimeWatchdogSec in /etc/systemd/system.conf.
We'd better just disable this service by default. If users want to use watchdog, consider using the systemd one.
--- meta/recipes-extended/watchdog/watchdog_5.15.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-extended/watchdog/watchdog_5.15.bb +3 -0
@@ -40,6 +40,9 @@ INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" SYSTEMD_SERVICE_${PN} = "watchdog.service" SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service" +# When using systemd, consider making use of internal watchdog support of systemd. +# See RuntimeWatchdogSec in /etc/systemd/system.conf. +SYSTEMD_AUTO_ENABLE = "disable" do_install_append() { install -d ${D}${systemd_system_unitdir}
Signature · 1 line
1.9.1
PATCH 4/7 watchdog: make init script start after syslog
In reply to Chen QiWe need to make sure logs are not lost. As long as there's no strong and vaild reason, we should make daemons start after syslog.
As a side effect, we could check the logs to see if there are some potential problem. In OE, the 'parselogs' test case could do it automatically.
--- meta/recipes-extended/watchdog/watchdog_5.15.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-extended/watchdog/watchdog_5.15.bb +2 -2
@@ -32,10 +32,10 @@ EXTRA_OECONF += " --disable-nfs " INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" INITSCRIPT_NAME_${PN} = "watchdog.sh" -INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ." +INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ." INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" -INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." +INITSCRIPT_PARAMS_${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ." SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" SYSTEMD_SERVICE_${PN} = "watchdog.service"
Signature · 1 line
1.9.1
PATCH 5/7 watchdog: fix init script for sysvinit
In reply to Chen QiThe current init script is installed from source with redhat style. It does not get configuration from /etc/default/watchdog. We should use debian style init script.
Write our own script just like what wd_keepalive does. Also, in the init script, we check the existence of /dev/watchdog to determine whether to start the daemon or not.
--- .../watchdog/watchdog/watchdog-init.patch | 56 ----------- .../watchdog/watchdog/watchdog.init | 110 +++++++++++++++++++++ meta/recipes-extended/watchdog/watchdog_5.15.bb | 6 +- 3 files changed, 113 insertions(+), 59 deletions(-) delete mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-init.patch create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog.init
meta/recipes-extended/watchdog/watchdog/watchdog-init.patch deleted +0 -56
@@ -1,56 +0,0 @@ -Signed-off-by: Diego Rondini <[email protected]> -Upstream-Status: Inappropriate - ---- watchdog-5.13.orig/redhat/watchdog.init 2014-11-12 17:18:39.125943000 +0100 -+++ watchdog-5.13/redhat/watchdog.init 2014-11-12 18:27:36.189943000 +0100 -@@ -7,7 +7,7 @@ - # Henning P. Schmiedehausen <[email protected]> - - # Source function library. --. /etc/rc.d/init.d/functions -+. /etc/init.d/functions - - [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0 - -@@ -23,22 +23,22 @@ - - start() { - -- echo -n $"Starting $prog: " -+ echo -n "Starting $prog: " - if [ -n "$(pidofproc $prog)" ]; then -- echo -n $"$prog: already running" -- echo_failure -+ echo -n "$prog: already running " -+ failure - echo - return 1 - fi - if [ "$VERBOSE" = "yes" ]; then -- daemon /usr/sbin/${prog} -v -+ /usr/sbin/${prog} -v - else -- daemon /usr/sbin/${prog} -+ /usr/sbin/${prog} - fi - RETVAL=$? - [ $RETVAL -eq 0 ] && touch $lockfile -- [ $RETVAL -eq 0 ] && echo_success -- [ $RETVAL -ne 0 ] && echo_failure -+ [ $RETVAL -eq 0 ] && success -+ [ $RETVAL -ne 0 ] && failure - echo - return $RETVAL - } -@@ -50,8 +50,10 @@ - # and reboot the box. - killproc $prog -TERM - RETVAL=$? -- echo - [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile -+ [ $RETVAL -eq 0 ] && success -+ [ $RETVAL -ne 0 ] && failure -+ echo - return $RETVAL - } -
meta/recipes-extended/watchdog/watchdog/watchdog.init new file +110 -0
110 lines not on this page · raw message
meta/recipes-extended/watchdog/watchdog_5.15.bb +3 -3
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \ file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \ - file://watchdog-init.patch \ + file://watchdog.init \ file://wd_keepalive.init \ "
@@ -31,7 +31,7 @@ EXTRA_OECONF += " --disable-nfs " INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" -INITSCRIPT_NAME_${PN} = "watchdog.sh" +INITSCRIPT_NAME_${PN} = "watchdog" INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ." INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
@@ -49,7 +49,7 @@ do_install_append() { install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} - install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh + install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive # watchdog.conf is provided by the watchdog-config recipe
Signature · 1 line
1.9.1
PATCH 6/7 oeqa/runtime/cases/parselogs.py: ignore a message from watchdog
In reply to Chen QiThe following message from watchdog is not an error.
"error retry time-out = 60 seconds"
Checking watchdog's source codes, we have:
src/watchdog.c: log_message(LOG_INFO, "error retry time-out = %d seconds", retry_timeout);
It's clear this is an info message, so parselogs should ignore it.
--- meta/lib/oeqa/runtime/cases/parselogs.py | 1 + 1 file changed, 1 insertion(+)
meta/lib/oeqa/runtime/cases/parselogs.py +1 -0
@@ -50,6 +50,7 @@ common_errors = [ "GPT: Use GNU Parted to correct GPT errors", "Cannot set xattr user.Librepo.DownloadInProgress", "Failed to read /var/lib/nfs/statd/state: Success", + "error retry time-out =", ] video_related = [
Signature · 1 line
1.9.1
PATCH 7/7 dnf: default to disable systemd units
In reply to Chen QiThe services and timers are not useful if a repo is not configured. In OE, we default to have no repo configured. So we default to disable these units.
The problem was found by the test_systemd_failed runtime test case. dnf-makecache.service is found to fail. This is due to lack of repo. Note that as this service is started by the dnf-makecache.timer, it's possible that test_systemd_failed passes in case the timer is not started yet.
--- meta/recipes-devtools/dnf/dnf_2.7.5.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/dnf/dnf_2.7.5.bb +1 -0
@@ -72,3 +72,4 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \ dnf-automatic-install.service dnf-automatic-install.timer \ dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \ " +SYSTEMD_AUTO_ENABLE ?= "disable"
Signature · 1 line
1.9.1