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] xapi accepting commands before being fully up

To: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Anil Madhavapeddy <anil@xxxxxxxxxx>
Subject: RE: [Xen-API] xapi accepting commands before being fully up
From: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Date: Mon, 12 Jul 2010 18:34:57 +0100
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 12 Jul 2010 10:35:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C3B34FE.3090802@xxxxxxxxxxxxx>
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>
References: <4C3B280D.2020005@xxxxxxxxxxxxx> <2A9AEA3E-8692-48A3-8923-9FC20BDCF3AC@xxxxxxxxxx> <4C3B34FE.3090802@xxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acsh1sONy+LHopnyQXiCHFKVN602CgAEFZNg
Thread-topic: [Xen-API] xapi accepting commands before being fully up
Hi George,

...
> But it just seems
> logical to me that if there's a bunch of initialization to do, you
> should refuse / delay certain classes of queries until after it's done.
> 
> Anyway, that's my $0.02, I'll leave it with you guys. :-)

I agree this would be ideal. In fact we already have code to block master 
database lookups until the database state is considered ready -- we could 
probably do something similar for the CLI at least. The XenAPI handling is a 
bit complicated because some limited master <-> slave communication is needed 
in order to 'enable' a host.

Cheers,
Dave


>   -George
> 
> On 12/07/10 15:43, Anil Madhavapeddy wrote:
> > Xapi touches a file when it has finished starting up, based on the -
> writeinitcomplete command line flag passed to it.  In XenServer, that's
> defined in the startup script as /var/run/xapi_init_complete.cookie
> >
> > Might be better to monitor that file, rather than SSH (which is
> pretty unrelated to xapi, but I'm not sure monitoring 443 would work
> better as stunnel might come up quite early).
> >
> > -anil
> >
> > On 12 Jul 2010, at 15:34, George Dunlap wrote:
> >
> >> It seems that xapi is up and accepting commands before everything is
> actually ready yet.  I have a script that will wait for a host to boot
> by pinging and then testing listening on the ssh port; when it succeeds,
> the host should be up and ready.
> >>
> >> However, if I write a command that runs that script, and then
> immediately tries to start a VM on that host, I get this error message:
> >> ---
> >> There are no suitable hosts to start this VM on.
> >> The following table provides per-host reasons for why the VM could
> not be started:
> >>
> >> exile    : Cannot start here [Host disabled (use 'xe host-enable' to
> re-enable)]
> >> --
> >>
> >> Subsequent attempts succeed.
> >>
> >> It seems like xapi should either wait until all local hosts are up
> before accepting vm-start commands, or if they get a command that
> depends on certain hosts, it should wait for them to be enabled.
> >>
> >> I think if that's not easy to do, maybe a "wait-for-host-to-be-
> initialized" command... :-)
> >>
> >> -George
> >>
> >> _______________________________________________
> >> xen-api mailing list
> >> xen-api@xxxxxxxxxxxxxxxxxxx
> >> http://lists.xensource.com/mailman/listinfo/xen-api
> >>
> >
> 
> 
> _______________________________________________
> xen-api mailing list
> xen-api@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/mailman/listinfo/xen-api

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

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