Bug 524880 - The error message should be more explicit when bridge networking is disabled
Summary: The error message should be more explicit when bridge networking is disabled
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Michal Privoznik
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-22 15:03 UTC by Laurent Léonard
Modified: 2013-06-25 13:33 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-25 13:11:09 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 542447 0 None None None Never

Description Laurent Léonard 2009-09-22 15:03:08 UTC
Description of problem:
The error message from libvirt should be more explicit when bridge networking is disabled in the Linux kernel:

~# virsh net-start default
libvir: QEMU error : internal error cannot create bridge 'virbr0' : Package not installed
error: Failed to start network default

Version-Release number of selected component (if applicable):
0.4.6

How reproducible:
Always

Steps to Reproduce:
1. Get a Linux kernel without bridge networking support.
2. Try to start a virtual network.
  
Actual results:
libvir: QEMU error : internal error cannot create bridge 'virbr0' : Package not installed
error: Failed to start network default

Expected results:
A more explicit error message.

Comment 1 Dave Allan 2013-06-25 12:22:48 UTC
Michal, is this still relevant?

Comment 2 Michal Privoznik 2013-06-25 13:11:09 UTC
Currently you'll get:

virsh # net-start default
error: Failed to start network default
error: Unable to create bridge virbr0: Function not implemented

Can that be considered as more explicit? I think the requester wanted us to tell which package should he install - but that's out of libvirt scope (if even feasible). Getting 'Function not implemented' (=ENOSYS) is the best we can do here for a reasonable trade-off. Hence, I am closing this one. If somebody disagrees feel free to reopen with defining what's expected from a 'more explicit' error message in this case.

Comment 3 Dave Allan 2013-06-25 13:18:05 UTC
Is there any other reason that this codepath would fail other than lack of bridge support in the kernel?  If not, I'd say it should say:

error: Unable to create bridge virbr0: Kernel lacks bridge support

otherwise, I agree with you.

Comment 4 Michal Privoznik 2013-06-25 13:33:11 UTC
The codepath is determined at build time. So no package installation/upgrade after you've build libvirt will change the path. Nor kernel package. The decision on the path is made depending on linux-headers package. In which case the most proper error message then would be "Bridge creation disabled at build time". Do we want to do that?


Note You need to log in before you can comment on or make changes to this bug.