/srv/irclogs.ubuntu.com/2010/01/26/#upstart.txt

gianluca_rhello all11:12
gianluca_ri'm using Ubuntu9.10 server, putting nginx under upstart, 'start nginx' cmd makes nginx starting and runnig but the job is registered and then unregistered while nginx keeps runnig, when use 'stop nginx' get: "stop: Unknown instance:"11:15
gianluca_rsome hint?11:15
JanCyep, sounds like it forks more often than upstart expects11:17
JanCwhat "expect" line do you have?11:18
gianluca_rJanC: don't an 'expect' line11:19
JanCyou probably need an "expect daemon" line or such (see "man 5 init")11:20
gianluca_rok thnx a lot, try immediatly11:20
gianluca_ri tried before the with a line only containing 'daemon' it resulted in error11:21
gianluca_rJanC: yes it's ok now, thnx11:22
gianluca_ri was reading this: http://upstart.ubuntu.com/wiki/Stanzas and it was clear to me11:23
gianluca_ris there some other docs about upstart 0.6.3?11:23
gianluca_r...and now the 'stop' cmd hangs11:25
JanCdocs --> see the manpage I pointed to11:25
gianluca_rok thnx11:25
gianluca_rit stpos it correctly though11:27
gianluca_rbye all, JanC thanks again11:40
=== sadmac2__ is now known as sadmac2
=== rberger_ is now known as rberger
=== woozy_ is now known as woozy
Jaja_hi23:22
Jaja_is anyone alive here?23:22
=== Jaja_ is now known as Tartaros
TartarosI wonder if it makes sense in the current state of affairs to actually use upstart for definition of my own services/tasks23:23
TartarosI mean, is it stable enough/23:23
Tartaros?23:23
Tartarosstable as in api23:24
Tartarosalso there seem to be quite a lack of tutorials/documentations...23:24
mbieblman init23:24
mbieblregarding the API, are you referring to the job file syntax?23:25
Tartarosyeah I guess so23:25
mbieblafaik it is not set in stone. It won't be before 1.0 is released23:26
JanC"man 5 init" actually, if you want to see the syntax documentation23:26
ionI use Upstart for my jobs. The syntax may change in the future, but i’ll just do the changes needed when upgrading to a new distro release.23:26
mbieblJanC: yes, thanks23:26
ion0.10/1.0/whatever may implement backwards compatibility for 0.6 jobs, though.23:27
Tartaroswell as of current state, do I understand correctly that basically all ubuntu services still have their old init.d scripts, which are only used by "placeholder" simple scripts in /etc/init ?23:27
mbieblTartaros: I assume that given Ubuntu uses upstart heavily in 9.10, it will keep compat for 0.623:27
mbieblTartaros: that is no longer correct since 9.1023:28
ionThe most essential Ubuntu stuff has already migrated to Upstart.23:28
JanCeverything that runs on the default desktop I think23:28
Tartarosso what'23:29
Tartaroswhat's /etc/init.d for?23:29
mbieblTartaros: It's kept for backward compatibility23:29
TartarosI mean how is it still so full?23:29
Tartarosso, is it being used or not?23:29
mbieblTartaros: are you running 9.10?23:29
Tartarosyes, 9.1023:30
JanCactually, there are fake sysvinit scripts in there  ;)23:30
mbieblmost of them are symlinks23:30
mbieblcheck with ls -la23:30
Tartarosfake? yeah I know but they point somewhere23:30
mbieblTartaros: sys admins are used to type /etc/init.d/<service> <action>23:30
mbiebl/lib/init/upstart-job is a tiny, simple shell script23:31
Tartarosso that's all they're for? if you don't type this manually, they're not used?23:31
mbieblwhich basically runs the native upstart jobs23:31
mbieblyeah, they are only for sysadmins convenience23:31
Tartarosoh, ok then23:31
Tartarosand the "service" command is upstart based or initv based?23:32
mbieblBetter check /etc/rc?.d/23:32
mbieblsymlinks in there point to services that are still sysv23:32
mbieblrcS.d and rc2.d are pretty nowadays on a default Ubuntu desktop install 23:33
mbieblpretty empty, i.e.23:33
ionThe service command it designed as the proper way to call sysvinit scripts.23:33
ionis23:33
Tartarosaso for upstart one should use initctl right?23:34
ionOr the symlinks to it, such as start, stop and restart.23:34
Tartarosyeah23:35
Tartarosok23:35
Tartarosas for creating a service - all one is supposed to do is adding a new myjob.conf file in /etc/init, right?23:35
Tartarosand also, is there a way to list events that are in use?23:36
Tartarossay I want to run something "when network is on" but I don't know what even(s) that means... where do I look?23:37
ion/etc/init, yes. As a personal preference, i put my local jobs under /etc/init/local/ for easy access.23:37
mbieblTartaros: grep for "emit"23:37
mbieblemits, actually23:38
mbieblin /etc/init23:38
mbieblthis list is not exhaustive though23:38
Tartarosthere are "inbuilt" events?23:38
Tartaroswhere are they liste23:39
Tartarosd?23:39
ionUpstart’s internal events are documented in init(5). Some of the events emitted by jobs are documented under /etc/init as mbiebl mentioned. ifupdown installs the script /etc/network/if-up.d/upstart, which emits the net-device-up event.23:39
Tartaroscool23:41
Tartarosone last thing :)23:44
Tartaroswhen I want something to be run as a specified user, is there some sort of support for that?23:44
ionFor now, use su.23:44
Tartarosor do I just do se23:44
Tartarossu23:44
Tartarosyeah23:44
Tartarosok23:44
Tartarosthanks :)23:45
ionPAM sessions support is in TODO, but not implemented yet.23:45
Tartarosso without su, it's run as root right?23:45
ionYes23:47
Tartarosok23:47
Tartarosthanks for all the info :)23:47

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!