WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

RE: [Xen-API] [PATCH] add pool join and eject hooks executing /etc/xapi.

To: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Subject: RE: [Xen-API] [PATCH] add pool join and eject hooks executing /etc/xapi.d/pool-{join, eject}/*
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 5 May 2010 17:41:36 +0100
Cc: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 05 May 2010 09:42:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <81A73678E76EA642801C8F2E4823AD21807F3CA8B3@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <3198ac4809a2170a27e5.1272993996@xxxxxxxxxxxxxxxxxxxxxx> <81A73678E76EA642801C8F2E4823AD21807F3CA8B3@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2010-05-05 at 16:23 +0100, Dave Scott wrote:
> Hi Ian,
> 
> > I placed the hooks at the end of each action. I didn't go as far as
> > {pre,post}x{join,eject} but could do if that is desirable.
> 
> Perhaps we should name the hooks pool_post_{join,eject} just to leave space 
> for adding the "pre" ones later?

Sounds sensible.

> [...]
> I think we should run the pool_eject_hook as the last thing before the
> finally (fun () -> light_fuse_and_reboot_after_eject()) since the
> light_fuse_* functions start an async background thread with a timer
> in it. We run the risk of the script hook not quite completing in time
> before the host reboots.

I didn't know about the async, moving it before seems very sensible.

or perhaps I should add the hook to the end of the async background
thread, just before the reboot?

> It's also worth double-checking that a script containing CLI commands
> actually works when run at this point -- this is well after a bunch of
> important files are deleted, such as the pool secret. If this doesn't
> work then I recommend switching over to pool_post_join and
> pool_pre_eject :-)

My use case doesn't actually need to do any XenAPI/CLI stuff (it needs
to notify the vswitch that we have changed pool). Is a hook which has
the explicit caveat "no XenAPI access" acceptable?

Ian.


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>