/srv/irclogs.ubuntu.com/2011/09/13/#upstart.txt

c9erhey... i am trying to make an upstart script for rabbitmq but it blocks it starts the service and when i stop it the service is stopped but the stop process hangs and if killed it and try to start it again the start hangs08:34
jhunt_c9er: sounds like Upstart is unable to find the pid of the rabbitmq process. Have you specified "expect fork" or "expect daemon"? http://upstart.ubuntu.com/cookbook/#expect08:36
c9eryes i did08:37
jhunt_which one? maybe you specified the wrong option (they are different)08:37
c9erexpect fork08:37
jhunt_I don't know rabbitmq, but if it forks twice, that won't work.08:38
c9erwhat if it forks more than twice?08:38
jhunt_it wouldn't need to. 2 forks is the maximum number of forks any daemon needs to perform to initialize.08:39
c9erwill then i guess i will try the expect daemon08:39
jhunt_it might subsequently fork off process of course to handle incoming requests, but we're talking solely about daemon initialisation this point.08:39
jhunt_That *should* work, but if it doesn't, you can cheat: http://upstart.ubuntu.com/cookbook/#alternative-method08:40
c9eranother question is there anyway to make the upstart reread the files without rebooting 08:40
c9erbecause you know i define an instance then i remove it then i stop ther service but the upstart insists that i have to define that instance 08:41
jhunt_there is a caveat though - although that will ensure the process starts, upstart still won't know the pid, so won't be able to stop it gracefully.08:41
jhunt_you want upstart to re-read its .conf files?08:42
jhunt_removing a .conf file when an instance is running, is going to cause you problems :)08:42
jhunt_upstart re-reads its .conf files automatically whenever any of them changes.08:43
c9erno they don't 08:43
jhunt_?08:43
c9erand i mean by instance the instance variable inside the file08:43
c9erit keeps telling me that variable need a value08:44
c9erwhile i have already removed it's line from he file08:44
jhunt_If you have a running job that needs an instance variable, yes, you'll need to specify the value of that instance variable to stop that running instance.08:45
jhunt_See http://upstart.ubuntu.com/cookbook/#instance08:45
jhunt_Also see: http://upstart.ubuntu.com/cookbook/#attempting-to-stop-a-job-that-requires-an-instance-variable08:45
c9eri don't mean so08:45
c9eri have already removed the line of the variable after stopping the service08:46
c9erthe next time i need to start it it asked for the value08:46
jhunt_c9er: sounds like you might have another instance of that job still running?08:46
c9ernope i check the ps output each time08:47
c9eri think i may report it as a bug08:47
jhunt_please do, ensuring you specify exactly how to reproduce the problem.08:49
jhunt_Going back to what you say above: "i define an instance then i remove it then i stop ther service"08:49
jhunt_this is wrong - you have to start the instance, stop then instance *then* remove the variable from the file.08:49
c9erthat's exactly what i have done08:54
c9er:)08:54
c9eri have wrote upstart script on ubuntu 10.10 version 6.6 it'w working perfectly but when i use the same script on upstart 9.7.3 on ubuntu 11.04 it freezes11:39
c9erany help?!11:42
jhunt_c9er: please raise a bug with the details: https://bugs.launchpad.net/ubuntu/+source/upstart/+filebug11:57
c9erany idea why would the upstart script hang when i use stop?16:42
c9erkay does upstart have any kind of a data base locking file or caching thing?17:02
JanCc9er: AFAIK upstart keeps all its "state" data in RAM, and the only thing resembling a database is the collection of *.conf files?17:30
c9erJanC, is there anyway to access these data in RAM?17:35
JanCnot really17:37
JanCyou can get some of it using some 'initctl' commands like "list"17:39
c9erwell do you know why would stop hangs?17:41
JanCand of course you can turn up log verbosity & check the log messages17:41
c9erJanC, how is that?17:41
JanCc9er: not without context17:41
JanCc9er: read "man initctl" for the command to change log verbosity17:42
c9erk17:42
JanCit's named 'log-priority'17:42
JanCyou can also set it on the kernel commandline in Ubuntu (see the cookbook)17:43
c9erJanC, so any idea why would the script hang on stop?17:44
JanCc9er: script?17:44
JanCc9er: did you read http://upstart.ubuntu.com/cookbook/#debugging ?17:45
c9eryea i did17:46
[dlp]Enhancement request:21:50
[dlp]At boot time, with "noisy" output (and no splash screen).21:50
[dlp]..21:50
[dlp]Information about what process is being started left justified...21:51
[dlp]Indication of success: right justified.21:51
[dlp]Most monitors are wide enough to make it impossible to correlate one to the other.21:51
[dlp]Either print them together and be jaggedy or pad it with dots.21:52
[dlp]If anyone agrees and is prepared to point me inthe direction of exactly the right source file I'll do it myself.22:03

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