failing tests
Marc Weber
marco-oweber at gmx.de
Thu Jun 10 17:01:07 BST 2010
Hi,
For some time pre-stop jobs are no longer run.
I enabled the testsuite (make tests) and got these failures for both:
version 0.6.6 and 0.6.5:
FAIL: test_job_class
FAIL: test_job_process
FAIL: test_job
FAIL: test_event
FAIL: test_conf
Full log:
http://mawercer.de/~marc/0.6.6
Using the following test script job I notice that the pre-stop script is
not run. I couldn't find anyting in the man pages or the Changelog
indicating that it's gone. Is it only NixOS which has this issue?
===========
# Upstart job `test-job'. This is a generated file. Do not edit.
description "(no description given)"
stop on starting shutdown
pre-start script
exec >> /var/log/upstart/test-jobpre-start 2>&1
echo "pre-start";
end script
respawn
pre-stop script
exec >> /var/log/upstart/test-jobpre-stop 2>&1
echo preStop
end script
post-stop script
exec >> /var/log/upstart/test-jobpost-stop 2>&1
echo postStop
end script
==
tail -f ing /var/log/messages when running restart test-job yields:
Jun 10 17:44:58 nixos init: Connection from private client
Jun 10 17:44:58 nixos init: job_class_register: Registered job /com/ubuntu/Upstart/jobs/avahi_2ddaemon
Jun 10 17:44:58 nixos init: job_class_register: Registered job /com/ubuntu/Upstart/jobs/postgresql
[...]
Jun 10 17:44:58 nixos init: job_class_register: Registered job /com/ubuntu/Upstart/jobs/test_2djob
Jun 10 17:44:58 nixos init: job_register: Registered instance /com/ubuntu/Upstart/jobs/test_2djob/_
[...]
Jun 10 17:44:58 nixos init: job_class_register: Registered job /com/ubuntu/Upstart/jobs/ntpd
Jun 10 17:44:58 nixos init: job_register: Registered instance /com/ubuntu/Upstart/jobs/ntpd/_
Jun 10 17:44:58 nixos init: test-job goal changed from start to stop
Jun 10 17:44:58 nixos init: test-job state changed from running to stopping
Jun 10 17:44:58 nixos init: event_new: Pending stopping event
Jun 10 17:44:58 nixos init: test-job goal changed from stop to start
Jun 10 17:44:58 nixos init: Handling stopping event
Jun 10 17:44:58 nixos init: event_finished: Finished stopping event
Jun 10 17:44:58 nixos init: test-job state changed from stopping to killed
Jun 10 17:44:58 nixos init: test-job state changed from killed to post-stop
Jun 10 17:44:58 nixos init: test-job post-stop process (20026)
Jun 10 17:44:58 nixos init: job_process_handler: Ignored event 1 (0) for process 20026
Jun 10 17:44:58 nixos init: test-job post-stop process (20026) exited normally
Jun 10 17:44:58 nixos init: test-job state changed from post-stop to starting
Jun 10 17:44:58 nixos init: event_new: Pending starting event
Jun 10 17:44:58 nixos init: Handling starting event
Jun 10 17:44:58 nixos init: event_finished: Finished starting event
Jun 10 17:44:58 nixos init: test-job state changed from starting to ch=ffpre-start
Jun 10 17:44:58 nixos init: test-job pre-start process (20027)
Jun 10 17:44:58 nixos init: job_process_handler: Ignored event 1 (0) for process 20027
Jun 10 17:44:58 nixos init: test-job pre-start process (20027) exited normally
Jun 10 17:44:58 nixos init: test-job state changed from pre-start to spawned
Jun 10 17:44:58 nixos init: test-job state changed from spawned to post-start
Jun 10 17:44:58 nixos init: test-job state changed from post-start to running
Jun 10 17:44:58 nixos init: event_new: Pending started event
Jun 10 17:44:58 nixos init: Handling started event
Jun 10 17:44:58 nixos init: event_finished: Finished started event
Note: all .conf files are symlinks to /nix/store/..
using files instead of symlinks and running initctl reload-configuration
didn't fix it.
My questions:
a) are those test failures serious?
b) do think they could be related to the pre-stop problem?
c) Should I try to fix pre-stop or should I rewrite the jobs so that
they don't use it?
Does it make sense to try older versions than 0.6.5 ?
Maybe using bash traps and dummy loops instead?
eg
trap .. "postfix stop"
while :; do sleep 9999; done
Marc Weber
More information about the upstart-devel
mailing list