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

Re: [Xen-API] [Xen-users] is_physical bug in xapi



(Dropping xen-users, please send XCP and Xapi questions to xen-api list)

On 05/10/12 03:51, pf shineyear wrote:
> hi all, 
> 
> i just found a bug from xapi code network_utils.ml
> <http://network_utils.ml>:

This is a bug we have been aware of, but hadn't gotten around to fixing
it yet because of other bugs. It's benign, but ugly. It should be fixed
in xapi upstream, so the next major release of xcp-xapi on Debian/Ubuntu
should have this resolved.

Mike

> let is_physical name =
> 
> try
> 
> let link = Unix.readlink (getpath name "device") in
> 
> (* filter out device symlinks which look like
> /../../../devices/xen-backend/vif- *)
> 
> not(List.mem "xen-backend" (String.split '/' link))
> 
> with _ -> false
> 
> 
> i use xcp + ubuntu 12.04, in my /sys/class/net/  dir it looks like:
> 
> 
> 
> drwxr-xr-x  2 root root 0 Oct  4 17:02 ./
> 
> drwxr-xr-x 46 root root 0 Oct  4 17:02 ../
> 
> lrwxrwxrwx  1 root root 0 Oct  4 17:02 eth0 ->
> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/net/eth0/
> 
> lrwxrwxrwx  1 root root 0 Oct  4 17:02 eth1 ->
> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.1/net/eth1/
> 
> lrwxrwxrwx  1 root root 0 Oct  4 17:02 lo -> ../../devices/virtual/net/lo/
> 
> lrwxrwxrwx  1 root root 0 Oct  4 19:05 tap9.0 ->
> ../../devices/virtual/net/tap9.0/
> 
> lrwxrwxrwx  1 root root 0 Oct  5 11:11 vif10.0 ->
> ../../devices/vif-10-0/net/vif10.0/
> 
> lrwxrwxrwx  1 root root 0 Oct  5 11:54 vif11.0 ->
> ../../devices/vif-11-0/net/vif11.0/
> 
> lrwxrwxrwx  1 root root 0 Oct  5 11:54 vif12.0 ->
> ../../devices/vif-12-0/net/vif12.0/
> 
> lrwxrwxrwx  1 root root 0 Oct  4 17:28 vif5.0 ->
> ../../devices/vif-5-0/net/vif5.0/
> 
> lrwxrwxrwx  1 root root 0 Oct  4 19:05 vif9.0 ->
> ../../devices/vif-9-0/net/vif9.0/
> 
> lrwxrwxrwx  1 root root 0 Oct  4 17:02 xenbr0 ->
> ../../devices/virtual/net/xenbr0/
> 
> lrwxrwxrwx  1 root root 0 Oct  4 17:02 xenbr1 ->
> ../../devices/virtual/net/xenbr1/
> 
> 
> 
> so , there is no subdir or symlink like "xen-backend", each device will
> be think as real physical device and always return true from that function.
> 
> 
> this bug will happen when ur dom0 reboot from a crash (some instance
> does not released when crash happen), there will have a lots of bridge
> like "brvif..."
> 
> 
> thanks.
> 
> 
> 
> 


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.