Hide Forgot
Description of problem: In the iwhd start() function, one of the things it does is to check to make sure that mongo is running by trying to contact mongod. If it contacts mongod, then everything is good and it goes on and starts iwhd. The problem is that if mongod never responds, it prints an error and still goes on. Because iwhd relies on mongo to do underlying operations, this is just setting iwhd up for failure. If contacting mongod fails, the iwhd initscript probably wants to abort entirely, instead of setting things up in a halfway state. Version-Release number of selected component (if applicable): 0.95 How reproducible: Always Steps to Reproduce: 1. service mongod stop 2. service iwhd start Actual results: iwhd starts, but is poised to crash on most (all?) operations. Expected results: iwhd doesn't start unless mongod is running.
Thanks for the report, Chris. Here's the probable patch. Does it solve your problem? diff --git a/iwhd.init.in b/iwhd.init.in index 59d4032..47f9ceb 100644 --- a/iwhd.init.in +++ b/iwhd.init.in @@ -73,7 +73,8 @@ start() { mkdir -p @localstatedir@/cache/iwhd rm -rf @localstatedir@/cache/iwhd/* printf %s $"waiting for mongod to listen on $MONGOD_SERVER_SPEC" - wait_for_mongod $MONGOD_N_SECONDS && echo_success || echo_failure + wait_for_mongod $MONGOD_N_SECONDS && echo_success \ + || { echo_failure; echo; return 1; } echo printf %s $"Starting $SERVICE daemon: "
Created attachment 502362 [details] Here's a complete patch. I've attached a complete patch.
Looks good to me. And I see you have now committed it. Thanks! Chris Lalancette
This is good to go in commit 9e86ebf939a68c37c04004e8248013aab8f8cbb9, moving to verified.
release pending...
closing out old bugs
perm close