Re: [openstack-dev] [nova][libvirt] The None and 'none' for CONF.libvirt.cpu_mode

2015-03-05 Thread Jiang, Yunhong

> -Original Message-
> From: Daniel P. Berrange [mailto:berra...@redhat.com]
> Sent: Wednesday, March 4, 2015 9:56 AM
> To: Jiang, Yunhong
> Cc: openstack-dev@lists.openstack.org; Xu, Hejie
> Subject: Re: [nova][libvirt] The None and 'none' for CONF.libvirt.cpu_mode
> 
> On Wed, Mar 04, 2015 at 05:24:53PM +, Jiang, Yunhong wrote:
> > Daniel, thanks for your clarification.
> >
> > Another related question is, what will be the guest's real cpu model
> > is the cpu_model is None? This is about a reported regression at
> 
> The guest CPU will be unspecified - it will be some arbitrary
> hypervisor decided default which nova cannot know.
> 
> > https://bugs.launchpad.net/nova/+bug/1082414 . When the
> > instance.vcpu_model.mode is None, we should compare the source/target
> > cpu model, as the suggestion from Tony, am I right?
> 
> If CPU model is none, best we can do is compare the *host* CPU of
> the two hosts to make sure the host doesn't loose any features, as
> we have no way of knowing what features the guest is relying on.

Thanks for clarification. I will cook a patch for this issue.

--jyh

> 
> Regards,
> Daniel
> --
> |: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org  -o- http://virt-manager.org :|
> |: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][libvirt] The None and 'none' for CONF.libvirt.cpu_mode

2015-03-04 Thread Daniel P. Berrange
On Wed, Mar 04, 2015 at 05:24:53PM +, Jiang, Yunhong wrote:
> Daniel, thanks for your clarification.
> 
> Another related question is, what will be the guest's real cpu model
> is the cpu_model is None? This is about a reported regression at

The guest CPU will be unspecified - it will be some arbitrary
hypervisor decided default which nova cannot know.

> https://bugs.launchpad.net/nova/+bug/1082414 . When the
> instance.vcpu_model.mode is None, we should compare the source/target
> cpu model, as the suggestion from Tony, am I right?

If CPU model is none, best we can do is compare the *host* CPU of
the two hosts to make sure the host doesn't loose any features, as
we have no way of knowing what features the guest is relying on.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][libvirt] The None and 'none' for CONF.libvirt.cpu_mode

2015-03-04 Thread Jiang, Yunhong
Daniel, thanks for your clarification.

Another related question is, what will be the guest's real cpu model is the 
cpu_model is None? This is about a reported regression at 
https://bugs.launchpad.net/nova/+bug/1082414 . When the 
instance.vcpu_model.mode is None, we should compare the source/target cpu 
model, as the suggestion from Tony, am I right?

Thanks
--jyh

> -Original Message-
> From: Daniel P. Berrange [mailto:berra...@redhat.com]
> Sent: Wednesday, March 4, 2015 6:56 AM
> To: Jiang, Yunhong
> Cc: openstack-dev@lists.openstack.org; Xu, Hejie
> Subject: Re: [nova][libvirt] The None and 'none' for CONF.libvirt.cpu_mode
> 
> On Wed, Mar 04, 2015 at 02:52:06PM +, Jiang, Yunhong wrote:
> > Hi, Daniel
> > I'm a bit confused of the None/'none' for CONF.libvirt.cpu_mode.
> Per my understanding, None means there is no configuration provided and
> libvirt will select the default value based on the virt_type, none means no
> cpu_mode information should be provided. For the guest, am I right?
> >
> >   In _get_guest_cpu_model_config() on virt/libvirt/driver.py,
> > if mode is 'none', kvm/qemu virt_type will return a
> > vconfig.LibvirtConfigGuestCPU() while other virt type will return None.
> > What's the difference of this return difference?
> 
> The LibvirtConfigGuestCPU  object is used for more than just configuring
> the CPU model. It is also used for expressing CPU topology (sockets, cores,
> threads) and NUMA topology. So even if cpu model is None, we still need
> that object in the kvm case.
> 
> Regards,
> Daniel
> --
> |: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org  -o- http://virt-manager.org :|
> |: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][libvirt] The None and 'none' for CONF.libvirt.cpu_mode

2015-03-04 Thread Daniel P. Berrange
On Wed, Mar 04, 2015 at 02:52:06PM +, Jiang, Yunhong wrote:
> Hi, Daniel
>   I'm a bit confused of the None/'none' for CONF.libvirt.cpu_mode. Per my 
> understanding, None means there is no configuration provided and libvirt will 
> select the default value based on the virt_type, none means no cpu_mode 
> information should be provided. For the guest, am I right?
> 
>   In _get_guest_cpu_model_config() on virt/libvirt/driver.py,
> if mode is 'none', kvm/qemu virt_type will return a
> vconfig.LibvirtConfigGuestCPU() while other virt type will return None.
> What's the difference of this return difference?

The LibvirtConfigGuestCPU  object is used for more than just configuring
the CPU model. It is also used for expressing CPU topology (sockets, cores,
threads) and NUMA topology. So even if cpu model is None, we still need
that object in the kvm case.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [nova][libvirt] The None and 'none' for CONF.libvirt.cpu_mode

2015-03-04 Thread Jiang, Yunhong
Hi, Daniel
I'm a bit confused of the None/'none' for CONF.libvirt.cpu_mode. Per my 
understanding, None means there is no configuration provided and libvirt will 
select the default value based on the virt_type, none means no cpu_mode 
information should be provided. For the guest, am I right?

  In _get_guest_cpu_model_config() on virt/libvirt/driver.py, if 
mode is 'none', kvm/qemu virt_type will return a 
vconfig.LibvirtConfigGuestCPU() while other virt type will return None. What's 
the difference of this return difference?

Thanks
--jyh

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev