On 01/07/11 - 03:30:12PM, Mohammed Morsi wrote:
> ACK. Looks good and works with one caveat below.
>
> On 01/07/2011 02:50 PM, Mike Orazi wrote:
> > ---
> > recipes/deltacloud_recipe/files/iwhd.init | 13 +++++++++----
> > recipes/deltacloud_recipe/manifests/iwhd.pp | 13 ++++++++++++-
> > 2 files changed, 21 insertions(+), 5 deletions(-)
> > mode change 100644 => 100755 recipes/deltacloud_recipe/files/iwhd.init
> >
> > diff --git a/recipes/deltacloud_recipe/files/iwhd.init
> > b/recipes/deltacloud_recipe/files/iwhd.init
> > old mode 100644
> > new mode 100755
> > index 4907b92..966304a
> > --- a/recipes/deltacloud_recipe/files/iwhd.init
> > +++ b/recipes/deltacloud_recipe/files/iwhd.init
> > @@ -3,14 +3,14 @@
> > #
> > # iwhd startup script for iwhd server
> > #
> > -# chkconfig: - 97 03
> > +# chkconfig: - 40 60
> > # description: iwhd is primary server process for the \
> > # IWHD component.
> > #
> >
> > [ -r /etc/sysconfig/iwhd ]&& . /etc/sysconfig/iwhd
> >
> > -LOCKFILE="${LOCKFILE:-/var/lock/subsys/iwhd }"
> > +LOCKFILE="${LOCKFILE:-/var/lock/subsys/iwhd}"
> >
> > PROG=/usr/bin/iwhd
> > CONF=/etc/iwhd/conf.js
> > @@ -20,7 +20,10 @@ CONF=/etc/iwhd/conf.js
> > start() {
> > echo -n "Starting iwhd: "
> >
> > - $PROG -c $CONF&
> > + # FIXME: we sleep 2 here to make sure that mongod has really come up.
> > + # Yes, it's a hack
> > + sleep 2
> > + $PROG -c $CONF>& /var/log/iwhd.log&
>
> Can we move this FIXME into the recipe. That way we'd have the delay
> inbetween mongo and iwhd at install time and not every time the iwhd
> service is restarted. If not, thats fine too, this still works. Other
> than that, patch looks good.
You need it more than at install time, though. If you setup the cloud engine
to start on boot, you also need it there, so I think we need to leave it in
the initscript.
If someone wants to figure out a way how to tell if mongodb is really up,
though, and remove this gross hack, I'm all for it.
--
Chris Lalancette
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel