On Sun, 2008-12-28 at 01:20 -0500, Dimi Paun wrote:
> On Sun, 2008-12-28 at 12:11 +1100, Frank Crawford wrote:
> > Yep. Two easy points are at the start (where the DBs are dumped) and
> > at the end during cleanup. This is fairly easy to code, just invoke a
> > script (or scripts) from the client, if they exist.
> Right. Would it be useful to have such points before and after we
> setup the snapshot?
YEs, although I'm concious that we don't want too many such points. For
my automount problem, a callout after setting up and tearing down the
snapshots would be good. But also, what do we do if there is no
snapshot? Still do two call?
> > An agreement on what and when is something to start with. It could be
> > a single script with a specific argument (e.g. "safekeep-script
> > start ...", "safekeep-script end ...") or separate scripts. Also,
> > what would we pass (if anything).
> A single script would be OK. But what do we do for:
> - parameters?
> - exit status?
A single script is easy, but multiple scripts allow safekeep to test if
it exists before calling. However, I favour a single script.
> For parameters we can pass the client name I guess, but would
> that be useful? Should we fail on non-zero exit status? I admit
> it's a bit late now and I haven't thought these out...
Client name would be good, then you could write a common script with
specific cases for different hosts. I favour passing lots of
information in (though that could be via environment variables), but not
sure what would really be useful.
As for exit status, I hadn't though of that at all. The two choices are
to either fail on non-zero, but that could just cause problems. The
alternative would be to just warn on a non-zero status. I'd hate to get
into more complicated than that.
Similarly, what do we do with any output from the script, return it as
at a debug level?