[15:54] <[diablo]> Good evening #upstart
[15:55] <[diablo]> guys we're trying to write an upstart job to call a BASH script.. for RHEL6 
[15:55] <[diablo]> we need to be sure that the networking is up, and that the file system is there
[15:56] <[diablo]> http://pastie.org/10815230
[15:56] <[diablo]> syntax check works, but it does not run :-/
[15:56] <[diablo]> anyone advise whats up please?
[19:21] <CrazyTux[m]> pre-start process: unable to execute: Argument list too long
[19:21] <CrazyTux[m]> What could this error mean?  
[19:32] <CrazyTux[m]> this is so odd, no matter what I do  upstart is telling me job fails to start due to argument list being too long, yet there is no really long argument list, and it initially stated that for my pre-start stanza, which then I commented out the entire block and now its saying for my script stanza
[20:06] <chras> CrazyTux[m]: any details?
[20:07] <CrazyTux[m]> chras, it looks like it was an issue with my #limit stack 240 480 line
[20:07] <CrazyTux[m]> I commented it out and it works now
[20:07] <CrazyTux[m]> but now I've one last issue
[20:07] <CrazyTux[m]> I'm trying to chown -R ${USER}:${GROUP} $DIR
[20:08] <CrazyTux[m]> for DIR in a b c
[20:08] <CrazyTux[m]> and this is error'ing out
[20:08] <CrazyTux[m]> inside script stanza
[20:08] <CrazyTux[m]> if I comment out the for loop all is well.
[20:08] <CrazyTux[m]> well its more like for FSDIR in "$A" "$B" "$C" [newline] do [newline] chown -R ${USER}:${GROUP} $FSDIR [newline] done
[20:09] <CrazyTux[m]> "done" seems to be highlighted in vim syntax though so not sure if its reserved or something in upstart
[20:21] <chras> CrazyTux[m]: i havnt used the limit stuff before, but for your chown prob be useful to echo out your chown to see why its failing
[20:21] <chras> then you could try running it by hand
[20:21] <CrazyTux[m]> my loop by hand is fine
[20:21] <chras> whats the actual error when it errors out?
[20:22] <CrazyTux[m]> init: process-name pre-start process (24199) terminated with status 2
[20:23] <chras> so whats exiting with an exit of 2
[20:24] <chras> but didnt you say that
[20:25] <chras> that your for FSDIR was in a script, or was it in pre-start ?
[20:36] <CrazyTux[m]> i've tried both
[20:45] <chras> CrazyTux[m]: something in your pre-start is throwing an exit 2, which is causing your event to fail out
[20:45] <chras> just need to isolate what that is
[20:45] <chras> it could be your chown
[20:46] <chras> tho im not sure what fail case in chown would exit with 2, instead of 1
[20:47] <chras> could you pastebin your event?
[20:48] <CrazyTux[m]> sure one moment.
[20:50] <CrazyTux[m]> chras, http://pastebin.com/ZXgEMTr1
[20:52] <chras> k sec
[20:53] <CrazyTux[m]> sure
[20:54] <chras> and that all works without errors with the exception of your chown loop ?
[20:54] <chras> hm, you said it above
[20:54] <chras> but its not in the paste
[20:55] <chras> your do part of your for
[20:55] <chras> and that DOES throw an exit 2
[20:57] <CrazyTux[m]> correct
[20:57] <CrazyTux[m]> let me try re adding it
[20:57] <CrazyTux[m]> but
[20:57] <CrazyTux[m]> I literally
[20:57] <CrazyTux[m]> tried 100 variations
[20:57] <CrazyTux[m]> so prob
[20:58] <CrazyTux[m]> just got dd'ed in vim
[20:58] <CrazyTux[m]> lol
[20:58] <CrazyTux[m]> testing now sec.
[20:58] <chras> other then missing the do
[20:58] <chras> it looks all sane
[20:58] <CrazyTux[m]> chras, what would cause the limit stack issue?
[20:58] <CrazyTux[m]> chras, that causes it to exit out too
[20:59] <CrazyTux[m]> chras, interesting that worked...
[20:59] <chras> im not that familar with the limit stuff, i can try it here
[20:59] <chras> so still error'd out?
[20:59] <CrazyTux[m]> chras, not sure how the slipped throug; however I do know for fact I did try it with a do in a one line form/fashion
[20:59] <CrazyTux[m]> chras, no that was a go
[20:59] <chras> oh? good?
[20:59] <CrazyTux[m]> yes ty
[20:59] <chras> fresh eyes
[20:59] <CrazyTux[m]> haha :)
[20:59] <chras> lemme try limit here, sec
[21:00] <CrazyTux[m]> I literally tried putting it on one line, because typically when I write bash it is one liner's in console
[21:00] <CrazyTux[m]> for x in a b c; do echo x; done
[21:00] <CrazyTux[m]> I did that that haha
[21:00] <CrazyTux[m]> and it didn't like it :P
[21:00] <CrazyTux[m]> Sure.
[21:01] <CrazyTux[m]> Right now I've ulimit set in script block right before exec, would this even take affect or cause any adverse behavior?
[21:01] <CrazyTux[m]> when setup in this manner it seems ok
[21:01] <CrazyTux[m]> but I find it where that limit nofile works  but not stack.
[21:02] <chras> k i actually do get the same error as you with limit
[21:03] <chras> thats what i do, just ulimit manually inside my script stanza
[21:06] <chras> oh
[21:06] <chras> i think. thats bytes 
[21:06] <chras> right, limit stack works for me, when i use it with bytes
[21:07] <chras> with limit stack 240 240 , i got the same too many arguments error
[21:07] <chras> with limit stack 8192 8192 i got a segv as expeted, and then i did 8k (8388608) and it worked fine
[21:09] <CrazyTux[m]> hmmmm
[21:09] <CrazyTux[m]> so its looking for limit stack 240k /
[21:10] <CrazyTux[m]> yup
[21:10] <CrazyTux[m]> worked here.
[21:10] <CrazyTux[m]> nice.
[21:10] <CrazyTux[m]> chras, thank you for your kind help.
[21:10] <chras> hey no worries
[21:10] <CrazyTux[m]> chras, next time your in SoCal let me know, I'll buy you a few beers!
[21:22] <CrazyTux[m]> chras, interesting
[21:22] <CrazyTux[m]> chars, so 240k works on several systems but I've got one where it tells me...
[21:22] <CrazyTux[m]> [1730361.753244] init: /etc/init/freeswitch.conf:54: Illegal limit, expected 'unlimited' or integer
[21:23] <CrazyTux[m]> so I converted it to straight integers.
[21:23] <CrazyTux[m]> but still no cigar, very weird.
[21:23] <CrazyTux[m]> 1.12.1 upstart version
[21:23] <CrazyTux[m]> vs 1.11
[21:23] <CrazyTux[m]> weird...
[21:23] <CrazyTux[m]> 1.11 works
[21:24] <CrazyTux[m]> but either way, no worries thanks for your help!
[21:24] <CrazyTux[m]> I can take it from here :P
[21:29] <CrazyTux[m]> chras,  ok so yea I know Im not crazy lol, so beyond that stack issue between the two versions my for loop is again broken
[21:30] <chras> i use 1.11
[21:31] <chras> when i said 8k, i meant i did limit stack 8388608 8388608
[21:31] <CrazyTux[m]> Yea .1.12.1 is the "more" problematic one
[21:31] <CrazyTux[m]> chras, oh really? I did 240k
[21:31] <CrazyTux[m]> and it worked
[21:31] <chras> i didnt try that, but seems reasonable
[21:33] <CrazyTux[m]> Yea
[21:35] <CrazyTux[m]> compiling latest stable.. will see what happens
[21:35] <CrazyTux[m]> on a dev box 
[21:41] <CrazyTux[m]> yea no cigar, still does not like the for loop it seems on the later versions.
[21:41] <CrazyTux[m]> w/e ill deal with it for now ol
[21:41] <CrazyTux[m]> lol
[21:42] <CrazyTux[m]> #moving onto more important things will come back to this lol