[openstack-dev] [Nova][libvirt] Understand why we lookup libvirt domains by instance name

Sahid Orentino Ferdjaoui sahid.ferdjaoui at redhat.com
Thu May 21 16:28:54 UTC 2015


On Thu, May 21, 2015 at 09:11:57AM -0700, Michael Still wrote:
> On Thu, May 21, 2015 at 7:49 AM, Sahid Orentino Ferdjaoui
> <sahid.ferdjaoui at redhat.com> wrote:
> > 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/
> 
> Well, I am playing in this code to do some qemu stuff, so I will throw
> something out in the next day or so anyways. If you beat me to it then
> that's fine as well.

Nothing hurry in my side I let you play with this part of code :)

s.



More information about the OpenStack-dev mailing list