Re: [PATCH 10/34] conf: Assume at least 1 maximum and current vCPU for every conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 23, 2015 at 08:59:06 -0500, John Ferlan wrote:
> On 11/20/2015 10:22 AM, Peter Krempa wrote:
> > Set new domain configs to contain at least 1 vCPU add a check that
> > maximum vCPU count isn't set to 0 and remove unnecesary checks.
> > 
> > The openvz test suite change is necessary since the test case generates
> > the config via virDomainDefNew but does not set the vCPU info. With the
> > change to virDomainDefNew the expected output has changed.
> > ---
> >  src/conf/domain_conf.c     | 12 ++++++++++++
> >  src/lxc/lxc_native.c       |  7 -------
> >  src/openvz/openvz_driver.c | 20 ++++++++------------
> >  src/qemu/qemu_command.c    |  3 ---
> >  src/vmx/vmx.c              |  6 +++---
> >  tests/openvzutilstest.c    |  2 +-
> >  6 files changed, 24 insertions(+), 26 deletions(-)
> > 

[...]

> > diff --git a/tests/openvzutilstest.c b/tests/openvzutilstest.c
> > index 1414d70..0214fe5 100644
> > --- a/tests/openvzutilstest.c
> > +++ b/tests/openvzutilstest.c
> > @@ -81,7 +81,7 @@ testReadNetworkConf(const void *data ATTRIBUTE_UNUSED)
> >          "  <uuid>00000000-0000-0000-0000-000000000000</uuid>\n"
> >          "  <memory unit='KiB'>0</memory>\n"
> >          "  <currentMemory unit='KiB'>0</currentMemory>\n"
> > -        "  <vcpu placement='static'>0</vcpu>\n"
> > +        "  <vcpu placement='static'>1</vcpu>\n"
> >          "  <os>\n"
> >          "    <type>exe</type>\n"
> >          "    <init>/sbin/init</init>\n"
> > 
> 
> [1] Looking through history of things, finds :
> 
> https://www.redhat.com/archives/libvir-list/2008-November/msg00253.html
> 
> which seems to indicate that not providing a vCPU value or providing one
> of zero allows from the container to use all the CPU's on the host. Also
> the original commit id 'd6caacd1' of the test seems to indicate having a

> 0 is acceptable. Hopefully someone doing OpenVZ development could chime
> in here. It seems some code was shared w/r/t reading a configuration
> file and perhaps the output of a vcpus into the XML would be expected
> for this type of network device.  That is - is the output here then fed
> into something else that's creating some network object and will object
> finding a 1 for vcpu count.

Hmm, right. I didn't notice that. I'll probably either replace this
patch by code that adds it to the post parse check, or drop it entirely.

I think it's not exactly necessary in this series.

Peter

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]