[virt-tools-list] [virt-manager PATCH] details: Fix processor tab display for some LXC guests

Martin Kletzander mkletzan at redhat.com
Tue Oct 29 10:30:28 UTC 2013


On Mon, Oct 28, 2013 at 12:11:24PM -0400, Cole Robinson wrote:
> On 10/21/2013 10:56 AM, Martin Kletzander wrote:
> > With LXC domain, the 'current' attribute of 'vcpu' element is not
> > always present, but the code is still depending on it.
> > 
> > Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> > ---
> > 
> > Notes:
> >     TBH, I haven;t gone through all the code to realize what _exactly_
> >     'self._startup_vcpus' means, but this is my best guess.
> > 
> 
> startup_vcpus was for handling back compat with old libvirt versions that
> didn't have a concept of max vcpus vs. current vcpus, so we use 'vcpus at
> guest startup' to mean 'maxvcpus'.
> 
> >  virtManager/domain.py | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/virtManager/domain.py b/virtManager/domain.py
> > index 4ff156e..d099176 100644
> > --- a/virtManager/domain.py
> > +++ b/virtManager/domain.py
> > @@ -1036,7 +1036,10 @@ class vmmDomain(vmmLibvirtObject):
> >          return int(self.get_xmlobj().maxmemory)
> > 
> >      def vcpu_count(self):
> > -        return int(self.get_xmlobj().curvcpus)
> > +        guest = self.get_xmlobj()
> > +        return int(guest.curvcpus or
> > +                   self._startup_vcpus or
> > +                   guest.vcpus)
> >      def vcpu_max_count(self):
> >          guest = self.get_xmlobj()
> >          has_xml_max = (guest.curvcpus != guest.vcpus)
> > 
> 
> ACK
> 

Thanks, pushed.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20131029/df1d23a3/attachment.sig>


More information about the virt-tools-list mailing list