Re: Autostart

2010-09-30 Thread Jeff Garzik
On Wed, Sep 29, 2010 at 7:09 PM, Pete Zaitcev zait...@redhat.com wrote:
 An interesting question is what to do when iwhd exits. I decided not to
 kill what was started. So, we have a little self-contained cell of
 tabled, chunkd, S3, based off a certain local directory or other
 namespace anchor. Therefore, when iwhd restarts, it tests if the
 cell is still there, and uses that. It also tests if the service
 started successfuly, using the same method.

 As we see, for each service iwhd starts, it needs to verify that
 it's available (either before spawning it, or after). This would be
 done best by talking to the service. But iwhd only has S3 client,
 and no CLD client, so it cannot talk to cld (or chunkd). I had an idea:
 add an autostart feature to tabled.

 Tabled knows how to talk to both chunkd and cld, so it can verify
 that they are running. It would not be that much code. The downside
 is that it's clearly a special case, encoding of a policy. So I am
 asking how objectionable it would be (including do we want tabled -a
 for tests... they kinda run ok as they are).

It seems like quite a special case feature.  tabled is designed to use
multiple chunkd nodes (and hopefully soon, multiple cld nodes).  So
having tabled start chunkd/cld seems misaligned with the existing
design.

That said, if it was possible to write a script or program that
performed autostart without modifying tabled, it would be a nice
addition to the git repository.  tabled.autostart could be a simple
program that pinged cld/chunkd, started if necessary, then exec'd the
real tabled.

Something modular and separate like that would be great.

 Jeff
--
To unsubscribe from this list: send the line unsubscribe hail-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Autostart

2010-09-29 Thread Pete Zaitcev
Jeff et.al.:

I am working on a feature called autostart in Image Warehouse. It amounts
to iwhd starting with a certain default configuration, but is a bit more:
it also launches services necessary to support said default, e.g. tabled.
Naturally, tabled needs cld and chunkd.

An interesting question is what to do when iwhd exits. I decided not to
kill what was started. So, we have a little self-contained cell of
tabled, chunkd, S3, based off a certain local directory or other
namespace anchor. Therefore, when iwhd restarts, it tests if the
cell is still there, and uses that. It also tests if the service
started successfuly, using the same method.

As we see, for each service iwhd starts, it needs to verify that
it's available (either before spawning it, or after). This would be
done best by talking to the service. But iwhd only has S3 client,
and no CLD client, so it cannot talk to cld (or chunkd). I had an idea:
add an autostart feature to tabled.

Tabled knows how to talk to both chunkd and cld, so it can verify
that they are running. It would not be that much code. The downside
is that it's clearly a special case, encoding of a policy. So I am
asking how objectionable it would be (including do we want tabled -a
for tests... they kinda run ok as they are).

Cheers,
-- Pete
--
To unsubscribe from this list: send the line unsubscribe hail-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html