/srv/irclogs.ubuntu.com/2012/06/28/#upstart.txt

stiangHow can I convince upstart that "no, there is no process 26428 anymore, please start solr even if you think it is still running"?12:21
pdtpatr1ckQuestion - upstart returns 0 whether the app is running or stopped. I've read many bug reports and the back and forth, haven't seen any solution 16:34
SpamapSpdtpatr1ck: upstart *prints* the actual status19:57
=== marrusl is now known as marrusl-ebayqbr
JanCan option to return a status might be useful though21:04
=== marrusl-ebayqbr is now known as marrusl
JanCe.g. in scripts21:05
SpamapSJanC: I agree21:33
SpamapSJanC: I believe there is also a feature request to have something like --oknodo for start/stop21:33
SpamapSJanC: so that you can just say 'start --ok-no-do foo' and then it will just make sure foo is started, not that it changed from stop->start21:34
SpamapSJanC: given that, status would become less relevant in scripting21:34
JanCdepends21:34
JanCthat isn't useful if you want to be sure it's not running  ;)21:36
JanCor if you just want to do something different based on that status21:37
SpamapSJanC: stop --oknodo is the same thing21:45
SpamapSJanC: if its stopped, you return 0. If you move from start->stop, you return 0. You only return 1 if there's an error.21:45
SpamapSJanC: for the other cases, parsing status is fine21:45
JanCparsing is always prone to errors (unless the output is guaranteed never to change)21:50
JanCand you do not always want to change the started/stopped status21:50
SpamapSthe output is guaranteed never to change22:15
SpamapSgoal/state is set in stone22:16
SpamapSJanC: we agree, but there are two things.. goal and state.. and status's return code cannot possibly handle all of the combinations of those sanely.22:16
JanCSpamapS: let's say I feel more comfortable with separate output for machines & humans...   ;)22:41
SpamapSJanC: what would you have status do then? 0 only for start/running, 1 for all others?22:43
JanCeven if the output would be printed to stdout or stderr, or whatever mechanism is used, there should probably be a difference between output for humans and for computers22:46
JanCand both should be optimized for their purpose22:47
SpamapSJanC: $jobname[space]$goal/$state is pretty darn easy to parse for human and machine22:48
SpamapSJanC: no probably, show me the money. I want to know how you envision it. :)22:48
JanCthat's already not going to work...22:51
JanCe.g. "network-interface-security (network-manager) start/running"22:51
JanCor "tty6 start/running, process 1811"22:52
JanC(well, that's with list output, but you don't always know the exact thing to query without parsing that)22:55
JanCand maybe not even by parsing that  ;)22:57
JanCalso, sometimes an PID is added, sometimes not22:58
JanCand maybe in the future other things will be added22:59

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