Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
I second this. Being able to throw up a 5-line systemd service file for a new daemon (without trolling through mailing lists looking for prewritten scripts and gotchas) is wonderful.
Poettering: The Biggest Myths
Posted Jan 27, 2013 11:17 UTC (Sun) by alankila (subscriber, #47141)
Either way, I screwed up somewhere and failure at writing the init job definition caused upstart to no longer be able to startup and shutdown that particular service, it seemed to just stall. Killing the php processes didn't help, upstart was still stuck waiting on the service somehow. I couldn't even shutdown the machine anymore because it kept on jamming on that service file forever, forcing a manual power off. Again, on systemd, the fact I killed the process is enough evidence that the service is down, so systemd wouldn't have had the problem in the first place, and if it did, it would have been able to recover because it's actually smart.
I can only hope that I get to enjoy systemd at some point in the future as well. upstart is maybe fine if you know exactly how it works and know how to debug it; systemd seems almost designed for clueless admins like me.
Posted Jan 27, 2013 12:20 UTC (Sun) by davidstrauss (subscriber, #85867)
Correct. It's also one of the features that cannot be portable; it relies of cgroups.
> Again, on systemd, the fact I killed the process is enough evidence that the service is down
Posted Jan 27, 2013 20:56 UTC (Sun) by cwillu (subscriber, #67268)
Posted Jan 28, 2013 0:45 UTC (Mon) by davidstrauss (subscriber, #85867)
The difference is that Upstart can't reliably detect what's going on, let alone know whether it's correct.
systemd can detect what's going on, regardless of how you have the service configured. The configuration allows systemd to compare what is happening against what it's detecting to know whether the service is in a failed state.
Posted Jan 28, 2013 1:55 UTC (Mon) by mezcalero (subscriber, #45103)
Upstart's tracing via ptrace() is one evil feature OTOH. Upstart basically becomes the debugger of the daemons it runs. Really, really evil stuff.
Posted Jan 28, 2013 2:53 UTC (Mon) by davidstrauss (subscriber, #85867)
I wasn't speaking to detecting the main PID, only what is happening in terms of all forking behavior. When a process forks into a ton of other processes in the way you describe, there is no amount of collectable data on the system that allows properly identifying the main PID every time.
Posted Jan 27, 2013 14:03 UTC (Sun) by pizza (subscriber, #46)
systemd is such a vast improvement over what came before that it's not even funny.
Posted Jan 27, 2013 18:58 UTC (Sun) by apoelstra (subscriber, #75205)
Various Internet searches gave me 50-60 line init scripts for old versions of Ubuntu. These scripts were long and opaque and probably not even close to something that would run on Fedora 18. They relied on the detachtty tool (a minimal screen-type program) and did some sort of $PID dance around this. I wanted the server to restart whenever I killed it, so that I could reload the setup code that way. (Also I kept accidentally killing it by hitting Ctrl+D into screen.)
There's nothing out there about using hunchentoot with systemd. So, with maybe five minutes of searching manpages, I wrote
Description=Run sbcl webserver session on a screen tty
After = syslog.target network.target
ExecStart=/usr/bin/screen -D -m /bin/sbcl --load-path /home/lisp-web/ --load default-server.lisp
Short, simple, clear, works correctly, tells me when things go wrong, etc, etc. I can connect to screen and hit Ctrl+D to reliably restart the server. It never hangs or gets out of sync or leaves ports in use or files locked.
Posted Jan 27, 2013 21:11 UTC (Sun) by pizza (subscriber, #46)
It took me under five minutes. Would have been less time if the Fedora 16 server it's running on had a more modern systemd installed.
Posted Jan 28, 2013 13:23 UTC (Mon) by pboddie (subscriber, #50784)
Sorry for the pedantry, but I keep reading "trolling" used in this sense and assume that it must be either incorrect or American English. At least if it is the latter, the same cannot be said for the epidemic of "loose" (instead of "lose") and the unbearably irritating "choosen" (instead of "chosen").
Posted Jan 28, 2013 13:51 UTC (Mon) by mpr22 (subscriber, #60784)
Funny thing: I hadn't even noticed the existence of "choosen", and can't imagine it being more irritating than the loose/lose confusion. (Of course, this is what we get for using an orthography invented by non-native speakers 900 years ago, barely upgraded since, and at this point prohibitively expensive to reform.)
Posted Jan 28, 2013 14:35 UTC (Mon) by tnoo (subscriber, #20427)
Posted Jan 28, 2013 16:27 UTC (Mon) by HelloWorld (guest, #56129)
Posted Feb 9, 2013 22:50 UTC (Sat) by cas (subscriber, #52554)
Posted Jan 28, 2013 15:50 UTC (Mon) by Wol (guest, #4433)
A trawler goes trawling with a trawl-net.
Dunno what the proper name of a troller is, but they go trolling with a troll-line. Most tuna, for example, is caught by trolling.
I've been trolling for mackerel ...
Posted Jan 29, 2013 14:23 UTC (Tue) by pboddie (subscriber, #50784)
The interesting thing here is that the example given on the above page is rather similar to the one used earlier, but unless one attracts the catch using bait - putting something out to attract the catch - the trawling metaphor is actually more appropriate, since one is just seeing what gets dragged up. But anyway...
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds