/srv/irclogs.ubuntu.com/2012/09/19/#upstart.txt

j4m3s_i have an upstart script that doesn't appear to be setting the limit stack size, i have a pre-start script that sets the limits but my startup script throws a warning when the limit isn't set properly01:53
SpamapSj4m3s_: pre-start does not share process space/group w/ the main process01:53
SpamapSj4m3s_: you can just put that in script/end script with the main process01:53
j4m3s_SpamapS: http://pastie.org/private/nhapxgtg2qzzxzpjkjptg01:56
SpamapSahh limit stanza01:59
SpamapSj4m3s_: http://pastie.org/475111702:00
SpamapSj4m3s_: forgot to make it private.. but.. that might work02:01
j4m3s_i tried that too02:01
j4m3s_SpamapS: just confirmed still getting the same error02:02
SpamapSj4m3s_: what version of upstart is this btw? 1.4 and later will log stdout/stderr to /var/log/upstart/$jobname.log02:03
SpamapSj4m3s_: hm, with the numeric value, you need the soft and the hard02:03
j4m3s_0.902:03
j4m3s_SpamapS: i tried changing it to 999999 999999, still getting same warning02:05
SpamapSj4m3s_: just to be sure, are you doing a full 'stop' then 'start' or just 'restart' ?02:11
j4m3s_restart02:11
SpamapSj4m3s_: ok, stop/start are needed to reload the job file02:11
j4m3s_SpamapS: start freeswitch   start: Unknown job: freeswitch02:12
SpamapSj4m3s_: check syslog, its probably got a syntax error02:15
SpamapSj4m3s_: if you have init-checkconf you can use that too02:15
j4m3s_SpamapS: http://pastie.org/private/knrpjsuz6nl84cojzx4tng02:27
SpamapSj4m3s_: thats after you fixed whatever was causing the "unknown job" ?02:29
SpamapSj4m3s_: KILL is sent 5 seconds after TERM when you stop a job02:29
j4m3s_i forgot the expect daemon02:29
j4m3s_sorry 02:29
SpamapSstill weird htt it would say KILL02:30
SpamapSusually it would just say that it exitted with status 1 or 0 or something02:30
j4m3s_SpamapS: it's still not working, it says it's running but it's not running02:33
j4m3s_SpamapS: it appears that upstart loses it whenever i put the limit stanza with the exec, if i put it in pre-start it tracks it fine and everything starts up fine02:49
j4m3s_SpamapS: the only way it succeeds is if the limit lines are commented out or in pre-start02:51
j4m3s_SpamapS: got it to work ;)02:54
SpamapSj4m3s_: perhaps your daemon only forks once, so 'expect fork' is more appropriate?03:08
SpamapSj4m3s_: what was the trick?03:08
tohavaIf I want to have shell code run SYNCHRONOUSLY before a service, should I put it in pre-start?09:44
jodhtohava: yes, that is guaranteed to be run before that jobs main ('exec' or 'script') stanza.09:56
tohavajodh, thanks09:57
jodhtohava: this is covered in the Upstart Cookbook here: http://upstart.ubuntu.com/cookbook/#job-lifecycle and is also in upstart-events(7) after all the tables :)09:58

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