/srv/irclogs.ubuntu.com/2016/04/27/#upstart.txt

=== Cidan is now known as zz_Cidan
[diablo]Good evening #upstart15:54
[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 there15:55
[diablo]http://pastie.org/1081523015:56
[diablo]syntax check works, but it does not run :-/15:56
[diablo]anyone advise whats up please?15:56
=== zz_Cidan is now known as Cidan
=== Cidan is now known as zz_Cidan
CrazyTux[m]pre-start process: unable to execute: Argument list too long19:21
CrazyTux[m]What could this error mean?  19:21
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 stanza19:32
chrasCrazyTux[m]: any details?20:06
CrazyTux[m]chras, it looks like it was an issue with my #limit stack 240 480 line20:07
CrazyTux[m]I commented it out and it works now20:07
CrazyTux[m]but now I've one last issue20:07
CrazyTux[m]I'm trying to chown -R ${USER}:${GROUP} $DIR20:07
CrazyTux[m]for DIR in a b c20:08
CrazyTux[m]and this is error'ing out20:08
CrazyTux[m]inside script stanza20: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] done20:08
CrazyTux[m]"done" seems to be highlighted in vim syntax though so not sure if its reserved or something in upstart20:09
chrasCrazyTux[m]: i havnt used the limit stuff before, but for your chown prob be useful to echo out your chown to see why its failing20:21
chrasthen you could try running it by hand20:21
CrazyTux[m]my loop by hand is fine20:21
chraswhats the actual error when it errors out?20:21
CrazyTux[m]init: process-name pre-start process (24199) terminated with status 220:22
chrasso whats exiting with an exit of 220:23
chrasbut didnt you say that20:24
chrasthat your for FSDIR was in a script, or was it in pre-start ?20:25
CrazyTux[m]i've tried both20:36
chrasCrazyTux[m]: something in your pre-start is throwing an exit 2, which is causing your event to fail out20:45
chrasjust need to isolate what that is20:45
chrasit could be your chown20:45
chrastho im not sure what fail case in chown would exit with 2, instead of 120:46
chrascould you pastebin your event?20:47
CrazyTux[m]sure one moment.20:48
CrazyTux[m]chras, http://pastebin.com/ZXgEMTr120:50
chrask sec20:52
CrazyTux[m]sure20:53
chrasand that all works without errors with the exception of your chown loop ?20:54
chrashm, you said it above20:54
chrasbut its not in the paste20:54
chrasyour do part of your for20:55
chrasand that DOES throw an exit 220:55
CrazyTux[m]correct20:57
CrazyTux[m]let me try re adding it20:57
CrazyTux[m]but20:57
CrazyTux[m]I literally20:57
CrazyTux[m]tried 100 variations20:57
CrazyTux[m]so prob20:57
CrazyTux[m]just got dd'ed in vim20:58
CrazyTux[m]lol20:58
CrazyTux[m]testing now sec.20:58
chrasother then missing the do20:58
chrasit looks all sane20:58
CrazyTux[m]chras, what would cause the limit stack issue?20:58
CrazyTux[m]chras, that causes it to exit out too20:58
CrazyTux[m]chras, interesting that worked...20:59
chrasim not that familar with the limit stuff, i can try it here20:59
chrasso 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/fashion20:59
CrazyTux[m]chras, no that was a go20:59
chrasoh? good?20:59
CrazyTux[m]yes ty20:59
chrasfresh eyes20:59
CrazyTux[m]haha :)20:59
chraslemme try limit here, sec20:59
CrazyTux[m]I literally tried putting it on one line, because typically when I write bash it is one liner's in console21:00
CrazyTux[m]for x in a b c; do echo x; done21:00
CrazyTux[m]I did that that haha21:00
CrazyTux[m]and it didn't like it :P21:00
CrazyTux[m]Sure.21:00
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 ok21:01
CrazyTux[m]but I find it where that limit nofile works  but not stack.21:01
chrask i actually do get the same error as you with limit21:02
chrasthats what i do, just ulimit manually inside my script stanza21:03
chrasoh21:06
chrasi think. thats bytes 21:06
chrasright, limit stack works for me, when i use it with bytes21:06
chraswith limit stack 240 240 , i got the same too many arguments error21:07
chraswith limit stack 8192 8192 i got a segv as expeted, and then i did 8k (8388608) and it worked fine21:07
CrazyTux[m]hmmmm21:09
CrazyTux[m]so its looking for limit stack 240k /21:09
CrazyTux[m]yup21:10
CrazyTux[m]worked here.21:10
CrazyTux[m]nice.21:10
CrazyTux[m]chras, thank you for your kind help.21:10
chrashey no worries21:10
CrazyTux[m]chras, next time your in SoCal let me know, I'll buy you a few beers!21:10
CrazyTux[m]chras, interesting21: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 integer21:22
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 version21:23
CrazyTux[m]vs 1.1121:23
CrazyTux[m]weird...21:23
CrazyTux[m]1.11 works21:23
CrazyTux[m]but either way, no worries thanks for your help!21:24
CrazyTux[m]I can take it from here :P21:24
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 broken21:29
chrasi use 1.1121:30
chraswhen i said 8k, i meant i did limit stack 8388608 838860821:31
CrazyTux[m]Yea .1.12.1 is the "more" problematic one21:31
CrazyTux[m]chras, oh really? I did 240k21:31
CrazyTux[m]and it worked21:31
chrasi didnt try that, but seems reasonable21:31
CrazyTux[m]Yea21:33
CrazyTux[m]compiling latest stable.. will see what happens21:35
CrazyTux[m]on a dev box 21:35
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 ol21:41
CrazyTux[m]lol21:41
CrazyTux[m]#moving onto more important things will come back to this lol21:42

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