Hide Forgot
Description of problem: ============================ This is a spin off of bug 740688... When iwhd starts, the following is logged to its log file: 0 replication servers defined Oct 21 11:31:11 iwhd[19191]: convert-provider: ITER key: name Oct 21 11:31:11 iwhd[19191]: convert-provider: ITER key: type Oct 21 11:31:11 iwhd[19191]: convert-provider: ITER key: path Can we get something like: Oct 21 11:31:11 iwhd[19191]: process starting up When iwhd stops, nothing is logged, can we get something like: Oct 21 11:31:11 iwhd[19191]: process is shutting down And when iwhd fails to start because mongod is down: Oct 21 11:31:11 iwhd[19191]: process starting up Oct 21 11:31:11 iwhd[19191]: process failed to start, mongod is unaccessible
Also, this comment, https://bugzilla.redhat.com/show_bug.cgi?id=740688#c6, seems to indicate that if mongod goes down while warehouse is running, warehouse will stay up waiting for mongod to come back online. This circumstance needs to be logged as well, something like: Oct 21 11:31:11 iwhd[19191]: mongod service in inaccessible Oct 21 11:31:11 iwhd[19191]: mongod service in back online
partially addressed (start/stop) by http://git.fedorahosted.org/git?p=iwhd.git;a=commitdiff;h=e24af06c38014e9bda0d4164f64de3f8b51d6a79, which is in iwhd-1.0
Hi, looks it doesn't work as expected for me against the latest available version on f16 : # /bin/iwhd --version /bin/iwhd (iwhd) 1.0.1-1945 #service iwhd start log output /var/log/iwhd.log: Initializing... 0 replication servers defined Nov 08 09:21:55 iwhd[14268]: convert-provider: ITER key: name Nov 08 09:21:55 iwhd[14268]: convert-provider: ITER key: type Nov 08 09:21:55 iwhd[14268]: convert-provider: ITER key: path #service iwhd stop log output /var/log/iwhd.log: 11 08 09:22:48 killed iwhd[] If mongod is down then I'm not getting anything in the log. Moving bug to ON_DEV status.
I do not understand... The iwhd reports that Mongo is down just fine here: [root@lembas iwhd-tip]# systemctl start iwhd.service [root@lembas iwhd-tip]# tail /var/log/iwhd.log Initializing... 0 replication servers defined Feb 01 17:03:01 iwhd[12039]: convert-provider: ITER key: name Feb 01 17:03:01 iwhd[12039]: convert-provider: ITER key: type Feb 01 17:03:01 iwhd[12039]: convert-provider: ITER key: path Feb 01 17:03:01 iwhd[12039]: server down, no metadata access [root@lembas iwhd-tip]# I noticed some small problems with Jim's fix: - [$pid] is empty, because on success pidfile is removed - "Initializing" should be log_msg() to get timestamp I'm going to fix that up, but I think bug is fixed. Dave? Martin? BTW: [root@lembas iwhd-tip]# rpm -q iwhd iwhd-1.2-1.fc16.x86_64
ok, lemme check that with the latest version.
So with iwhd-1.2-3.el6.x86_64 package it still works as is describe in description. When iwhd stops, nothing is logged, when is start then you get [root@qeblade ~]# tail /var/log/iwhd.log Initializing... 0 replication servers defined Feb 02 06:53:48 iwhd[25988]: convert-provider: ITER key: name Feb 02 06:53:48 iwhd[25988]: convert-provider: ITER key: type Feb 02 06:53:48 iwhd[25988]: convert-provider: ITER key: path if mongod is stop then nothing is logged and output is: # service mongod status mongod is stopped [root@qeblade22 iwhd]# service iwhd status iwhd is stopped [root@qeblade22 iwhd]# service iwhd start waiting for mongod to listen on localhost:27017 [FAILED] [root@qeblade22 iwhd]# rpm -q iwhd iwhd-1.2-3.el6.x86_64 Let me know if you need further information.
When mongod is not running, iwhd does not even start, so there is no way the iwhd binary can log anything. The init script detects that. It waits for configurable MONGOD_N_SECONDS (default=2) for the mongod server to start. If mongod fails to start in time, the script prints the "[FAILED]" diagnostic. The current init script does this: wait_for_mongod $MONGOD_N_SECONDS && echo_success \ || { echo_failure; echo; return 1; } it's easy to make it write an explanation to the log: wait_for_mongod $MONGOD_N_SECONDS && echo_success \ || { echo_failure; echo echo "$(date '+%b %d %T') $PROCESS: failed to start:" \ "mongod is inaccessible" >> $IWHD_LOG_FILE return 1; }
IMHO, this isn't worth a release. I suggest deferring to 1.1. If someone disagrees, let me know ASAP.
From QA point of view I'm OK with both releases.
Thanks. Moved to cloudforms-1.1.0