[virt-tools-list] [virt-manager PATCH] virtinst: clearer error message when disks upper limits reached

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Mon Jan 27 02:27:45 UTC 2014



> -----Original Message-----
> From: virt-tools-list-bounces at redhat.com
> [mailto:virt-tools-list-bounces at redhat.com] On Behalf Of Martin Kletzander
> Sent: Friday, January 24, 2014 6:52 AM
> To: Chen Hanxiao
> Cc: virt-tools-list at redhat.com
> Subject: Re: [virt-tools-list] [virt-manager PATCH] virtinst: clearer
error
> message when disks upper limits reached
> 
> On Thu, Jan 23, 2014 at 11:26:17PM +0800, Chen Hanxiao wrote:
> > From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> >
> > We set upper limits for virtio, hd ... disks in virtinst.
> > So we should let users know this.
> >
> > Improve error message suggested by:
> > https://bugzilla.redhat.com/show_bug.cgi?id=822331
> >
> > Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> > ---
> >  virtinst/devicedisk.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py
> > index 469d968..1a431e5 100644
> > --- a/virtinst/devicedisk.py
> > +++ b/virtinst/devicedisk.py
> > @@ -879,6 +879,6 @@ class VirtualDisk(VirtualDevice):
> >          if ret:
> >              self.target = ret
> >              return ret
> > -        raise ValueError(_("No more space for disks of type '%s'" %
prefix))
> > +        raise ValueError(_("Only %s %s disks supported in virt-manager"
%
> (maxnode, prefix)))
> >
> 
> I agree with you on the change; it's nice to show that info to the
> user, but this code path can be reached from virt-install as well,
> doesn't it?  I'd drop the " in virt-manager" in that case.
> 

Thanks for your clarification.

I pushed as Giuseppe suggested:

-        raise ValueError(_("No more space for disks of type '%s'" %
prefix))
+        raise ValueError(_("Only %s disks of type '%s' are supported"
+            % (maxnode, prefix)))







More information about the virt-tools-list mailing list