← Back to team overview

openstack team mailing list archive

Re: [OpenStack] Xen Hypervisor

 

> -----Original Message-----
> From: Thomas Goirand [mailto:thomas@xxxxxxxxxx]
> Sent: 26 March 2012 13:56
> To: John Garbutt
> Cc: Ewan Mellor; Alexandre Leites; openstack@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Openstack] [OpenStack] Xen Hypervisor
> 
> On 03/26/2012 04:35 PM, John Garbutt wrote:
> > I certainly changed the plugin so it always required the host_uuid,
> but
> > I also changed the "call_plugin" code in xenapi_conn to ensure we
> always
> > pass the host_uuid.
> >
> >
> >
> > Indeed it looks like in the code path below, that you should get the
> > host_uuid passed all the way though.
> >
> >
> >
> > I have not tested with XCP myself, only with XenServer 6. I am afraid
> I
> > will not get chance to try this out till Wednesday (currently on
> > holiday). One other useful log will be from XCP where it logs the
> > parameters passed into the plugin (on XenSever it is
> > /var/log/xensource.log, it could be /var/log/xcp.log? or xapi.log,
> can't
> > remember I am afraid) You should be able to track the host_uuid to
> > ensure it gets from nova->xapi client->xapi server->plugin
> >
> >
> >
> > If you want to move on with your deployment a work around is to add
> this
> > into the xenhost plugin:
> >
> >
> >
> > Change:
> >
> > host_uuid=arg_dict['host_uuid']
> >
> > Into:
> >
> >                 host_uuid=_run_command("xe host-list | grep
> > uuid").split(":")[-1].strip()
> 
> Hi John,
> 
> Why not using:
> xe host-list --minimal
> 
> instead of the grep, split, strip code, which adds useless complexity?
> 
> Also, this piece of code doesn't seem to be resistant to having more
> than one host as reply (in which case the UUID would be separated by a
> coma, if I'm not mistaking).

Using --minimal would be preferable, I agree. John did say that this code only works in the non-pool case though -- it's obviously not going to get committed in this form.

Cheers,

Ewan.



References