[09:37] <jefimenko> where are the docs for upstart
[09:37] <jefimenko> i have a daemon that runs on a typical /etc/init.d script
[09:37] <jefimenko> to ensure better availability in case it does crash
[09:38] <plautrba> jefimenko: man 5 init
[09:38] <jefimenko> i'd like it to restart automatically
[10:22] <jefimenko> plautrba: thanks, i've been playing around with things after reading those docs
[10:22] <jefimenko> how can i source a config file
[10:22] <jefimenko> like a /etc/default/servicename
[10:23] <jefimenko> to set environment variables, etc.
[12:21] <derosa> Hi, I have a service that must be run at shutdown/reboot. Before upstart I just used a init script in rc[06].  As my sript depends on dbus, the rc[06] solution is no longer valid, as dbus is stopped before my script runs. I tried a little config file that just runs the script when dbus is about to be stopped (start on stopping dbus), but it doesn't seem to be running at all. I appened the "--debug" flag to the kernel but it doesn't help to me. Any hints?
[12:31] <derosa> Hi, I have a service that must be run at shutdown/reboot. Before upstart I just used a init script in rc[06].  As my sript depends on dbus, the rc[06] solution is no longer valid, as dbus is stopped before my script runs. I tried a little config file that just runs the script when dbus is about to be stopped (start on stopping dbus), but it doesn't seem to be running at all. I appened the "--debug" flag to the kernel but it doesn't help to me. Any hints?
[12:46] <Keybuk> you mean "stop on stopping dbus" surely?
[12:56] <derosa> My "service" is in fact just a command that doen's daemonize, so I thought it would be starting
[12:58] <derosa> I thought "stop" would only stop something that has previously been started
[13:04] <Keybuk> ah right
[13:04] <Keybuk> then yes, use "start on"
[13:04] <Keybuk> you'll also want to add "task" - that tells Upstart to block D-Bus from stopping until your command completes
[13:08] <derosa> like this?
[13:08] <derosa> description "nfssyncd final"
[13:08] <derosa> start on stopping dbus 
[13:08] <derosa> task
[13:08] <derosa> exec nfssyncd-plymouth-final-sync
[13:11] <Keybuk> right
[13:13] <derosa> so, that should block until my cmd finiches, right?
[13:13] <derosa> *finishes
[13:13] <Keybuk> right
[13:15] <derosa> it blocks when testing with "service dbus stop", but it doesn't when rebooting with "reboot" or using GDM applet
[13:18] <Keybuk> there should be no difference between the two
[13:18] <Keybuk> it may be that on reboot, other things that your task needs aren't around anymore
[13:20] <derosa> I'll take a deeper look, thank you
[13:39] <AnAnt> Hello, I have the following code in /etc/init/usb-blaster.conf: http://pastebin.com/SnPtBur2
[13:39] <AnAnt> the problem is that sometimes the symlink is created, and sometimes not
[13:39] <AnAnt> what could be the possible problem ?
[13:41] <Keybuk> AnAnt: two "exec" lines
[13:41] <Keybuk> only the first will be run
[13:41] <Keybuk> between script...end script is just shell
[13:41] <Keybuk> just drop both "exec"
[13:41] <AnAnt> oh ! silly me
[13:41] <AnAnt> thanks !
[13:54] <mezcalero> Keybuk: btw, it's not a very grown-up move not to accept the comment i posted a week ago on your latest blog story, while accepting later ones...
[13:55] <Keybuk> mezcalero: ?
[13:55] <mezcalero> Lennart says:
[13:55] <mezcalero> Your comment is awaiting moderation.
[13:55] <mezcalero> May 31, 2010 at 5:35 pm
[13:55] <Keybuk> hmm, I don't see anything in the pending queue
[13:55] <Keybuk> let me check spam
[13:56] <Keybuk> ah, found it
[13:56] <Keybuk> it's not a very grown-up move to accuse someone of foul play without even asking them ;-)
[13:58]  * Keybuk clears a couple of others stuck in spam too
[13:58] <mezcalero> I still a kid inside ;-)
[13:59] <mezcalero> add an "am" there
[16:17] <magcius> uggh
[16:17] <magcius> somehow I knew this would happen
[16:18] <Keybuk> magcius: I knew it would to
[16:19] <magcius> Keybuk: thoughts?
[16:19] <Keybuk> the only thing we can do is fight
[16:19] <magcius> Keybuk: the thing is that the article is half wrong
[16:19] <Keybuk> the one about the aliens?
[16:19] <magcius> Keybuk: nah, systemd
[16:19] <magcius> oh wait
[16:19] <magcius> yeah, that's the one too
[16:20] <magcius> Keybuk: it says a lot about manual configuration of rules and stuff
[16:20] <Keybuk> Lennart doesn't "get" Upstart
[16:20] <magcius> Keybuk: but, as I understand it, that's all low-level stuff to make it easy for the system to parse at boot-time, right? There's a higher level
[16:20] <magcius> language/compiler thing, right?
[16:21] <magcius> Keybuk: sshhh, he's in this room.
[16:21] <Keybuk> I know ;-)
[16:21] <magcius> Keybuk: and I'm surprised at that.
[16:21] <magcius> Keybuk: and we're now falling back to letting D-Bus starting things too
[16:22] <Keybuk> D-Bus bus activation is an important part of the plan
[16:22] <magcius> yep
[16:22] <Keybuk> it does for Linux what Mach IPC does for Apple
[16:22] <magcius> oh of course
[16:22] <Keybuk> (though Apple seem to change their mind on a release by release basis about whether frameworks should use Mach IPC or UNIX sockets)
[16:22] <magcius> Keybuk: so, from what I've heard, the rules files were to make it easy to parse, and were done by hand at first
[16:22] <Keybuk> the current upstart config?  right
[16:23] <magcius> Keybuk: wait, I thought there was a compiler that took a map and generated the rules
[16:24] <Keybuk> I don't know what you mean by that
[16:24] <magcius> Keybuk: for some reason, I thought there was a higher-level language, and a compiler that took conditions and optimized for them
[16:24] <Keybuk> in Upstart?  no
[16:24] <Keybuk> that'd be the wrong approach anyway
[16:24] <magcius> Keybuk: like, on an SSD, the compiler would generate different rules than an 6100 RPM HDD
[16:25] <magcius> Keybuk: so how do you handle system services?
[16:25] <magcius> Keybuk: like Apache, etc. etc.
[16:26] <Keybuk> I'm not sure I know what you're asking
[16:27] <magcius> Keybuk: I must be thinking of another init system
[16:27] <magcius> Keybuk: but if I have a service like httpd to start at boot time
[16:27] <magcius> Keybuk: and I install the package, what rules get put into place to ensure that it does?
[16:28] <Keybuk> a configuration file in /etc/init
[16:28] <magcius> Keybuk: and is this a sh script that uses the Debian start-stop-daemon stuff?
[16:28] <Keybuk> no
[16:28] <magcius> ok, so, there's a /etc/init/httpd.rule or something
[16:29] <Keybuk> right
[16:29] <magcius> and it has "d-bus-started" as a dependency?
[16:29] <Keybuk> Upstart isn't a dependency-based system
[16:29] <Keybuk> (and why would a web server need D-Bus?! :p)
[16:29] <magcius> Keybuk: does anything start before d-bus?
[16:30] <Keybuk> lots of things
[16:30] <magcius> ok
[16:30] <Keybuk> some things start in parallel with D-Bus too
[16:30] <mezcalero> magcius: for example if you plug in mod_dnssd into apache it would talk to avahi via dbus to register its services
[16:30] <magcius> Keybuk: the systemd blog post mentioned things like the conditionals in Upstart. Do you know how systemd handles these things WITHOUT them?
[16:30] <magcius> ah
[16:31] <Keybuk> magcius: through launchd-like functionality
[16:31] <Keybuk> one service makes an open() or connect() call to the other, which blocks
[16:31] <magcius> mezcalero: are you talking about Upstart or systemd?
[16:31] <mezcalero> magcius: that sentence was about neither
[16:31] <Keybuk> the init daemon has prepared the socket in advance, so when it polls, starts the service and passes the socket along to it
[16:31] <Keybuk> thus services are started by demand
[16:32] <mezcalero> Keybuk: actually often enough it wouldn't even block, i.e. in the case of syslog
[16:32] <Keybuk> Dave calls this pay-as-you-go
[16:32] <mezcalero> Keybuk: it would just enqueue and go on
[16:32] <Keybuk> mezcalero: indeed
[16:32] <mezcalero> Keybuk: and no, services are not started on-demand, generally
[16:32] <mezcalero> you can do that
[16:32] <mezcalero> makes little sense though except in very few cases such as ssh or cups
[16:33] <mezcalero> in the general case this is used to parallelize startup
[16:33] <mezcalero> not to do things on-demand
[16:33] <mezcalero> doing things on-demand simply delays things
[16:33] <magcius> mezcalero: uh, why would you ever want to not start sshd on boot?
[16:33] <Keybuk> mezcalero: I was referring to launchd there
[16:33] <mezcalero> Keybuk: same for launchd
[16:33] <Keybuk> I'm not sure how you're going to do things with systemd in Fedora
[16:33] <magcius> exactly
[16:33] <mezcalero> magcius: why would you? only every other month people to tend to log into their laptops with ssh
[16:34] <Keybuk> magcius: it's not a matter of "not starting" ... sshd is "possible to start" on every boot
[16:34] <magcius> mezcalero: so
[16:34] <mezcalero> magcius: so it is sufficient to have the port open, so that people can connect and then start it on demand
[16:34] <magcius> mezcalero: if I want to ssh into my home computer from a remote location
[16:34] <Keybuk> magcius: then connecting to the open ssh port (opened by init) would result in sshd starting, and being passed your connection (actually the listening socket)
[16:35] <Keybuk> the first connection would take longer due to the overhead of starting ssh
[16:35] <magcius> Keybuk: yeah, gotcha
[16:35] <mezcalero> magcius: from the clients' perspective little changes... the port is open with or without it
[16:35] <magcius> Keybuk: I forgot that systemd held control of sockets
[16:35] <mezcalero> but anyway, for stuff like dbus or syslog we don't do on-demand loading
[16:35] <Keybuk> but then sshd would be running (until a quit time of its own choosing) so subsequent connections while running would be normal
[16:35] <mezcalero> we start all that in parallel
[16:35] <magcius> does systemd hold all sockets or just the standard <1024
[16:35] <mezcalero> Keybuk: actually for sshd we chose to do it like macos, and do it in inetd-like per-connection mode
[16:36] <mezcalero> Keybuk: but thats the only daemon where we do that
[16:36] <Keybuk> mezcalero: makes sense, since then you can isolate each login
[16:36] <magcius> about networkmanager, here's another thing I hate
[16:36] <mezcalero> Keybuk: yepp, it's really nice actually because you get a seperate cgroup named after the connection parameters for each instance
[16:36] <magcius> if you have no wireless, you can't connect to localhost
[16:36] <mezcalero> Keybuk: o.e. the cgroup carries the clients ip addresses and such
[16:36] <magcius> so you have to go in and uncheck "Enable Wireless"
[16:36] <Keybuk> magcius: yes you can
[16:37] <Keybuk> if you can't connect to localhost, you have a bigger problem
[16:37] <magcius> Keybuk: last time I tried, it returned E_AGAIN
[16:37] <magcius> Keybuk: I believe it was either gethostbyaddr or getaddrinfo that failed
[16:37] <Keybuk> sounds like your box is misconfigured
[16:42] <magcius> it was a fedora box :P
[16:42] <Keybuk> magcius: I don't really know much about Fedora, sorry
[16:43] <Keybuk> while recently there's been some movement towards making things like Fedora and Ubuntu more similar
[16:44] <Keybuk> recent events mean it's more likely they're going to become very different again, possibly even incompatible
[16:56] <mezcalero> Keybuk: hey, you are welcome to adopt systemd in ubuntu too, to work against that! ;-)
[16:56] <Keybuk> mezcalero: not going to happen ;-)
[17:06] <mezcalero> Keybuk: tss, just admit it, deep in your heart you want it too!
[17:07] <Keybuk> mezcalero: it'd certainly make my life much easier
[17:07] <Keybuk> but then we'd have to rename our distro to Ubuntu Lennarx
[17:11] <mezcalero> i am a humble man, no need for that ;-)
[17:11] <mezcalero> Keybuk: btw, have you seen how i love ubuntu and now am a facebook fan of ubuntu? if that's not proof that i don't hate ubunut i don't know what could be proof enough ;-)
[17:12]  * Keybuk has one of the "I am Fedora" t-shirts
[17:12] <Keybuk> can we make out now?
[17:13] <mezcalero> nope, sorry, not into dudes. Also, I have more Suse shirts than Ubuntu shirts...
[17:13] <mezcalero> but otoh i have more ubuntu pens than any other distro pens
[17:14] <sadmac> mezcalero: ...so who does that leave you making out with?
[17:14] <mezcalero> but in regards to usb keys mandriva i love the most
[17:14] <mezcalero> sadmac: Suse is a german girl's name...
[17:16] <sadmac> mezcalero: also wasn't it Novell that inserted that cute Linux girl into the I'm a Mac/I'm a PC commercials?
[17:16] <Keybuk> oh, usb keys I'm totally for ubuntu
[17:16] <Keybuk> we have boxes full of them at the office
[17:16] <Keybuk> I never need to pay for portable storage again