[openstack-dev] [Nova][libvirt] Understand why we lookup libvirt domains by instance name
Sahid Orentino Ferdjaoui
sahid.ferdjaoui at redhat.com
Thu May 21 14:49:26 UTC 2015
On Thu, May 21, 2015 at 10:23:35AM +0100, Daniel P. Berrange wrote:
> On Wed, May 20, 2015 at 03:01:50PM -0700, Michael Still wrote:
> > I note that we use instance.name to lookup the libvirt domain a bunch
> > in the driver. I'm wondering why we don't just use instance.uuid all
> > the time -- the code for that already exists. Is there a good reason
> > to not move to always using the uuid?
> >
> > I ask because instance.name is not guaranteed to be unique depending
> > on how weird the nova deployment is.
>
> Agreed, there's no benefit to using name - internally libvirt will always
> prefer to use the UUID itself too.
>
> These days though, there is only a single place in nova libvirt driver
> that needs updating - the nova.virt.libvirt.host.Host class get_domain()
> method just needs to be switched to use uuid.
I'm currently working on the libvirt driver I can add this in my TODO
https://review.openstack.org/#/c/181969/
s.
More information about the OpenStack-dev
mailing list