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

Re: [MirageOS-devel] Mirage OS 2.4 errors on install and mirage-skeleton build



Thanks Mindy and everyone for all the input! Doing a make clean and running with elevated privileges has moved the bar, I'm now building and running the network samples. Yay!

But... I've run into more issues.

First, this is the output when I run sudo ./mir-ping:

plugging into tap0 with mac c2:9d:56:19:d7:2c..
Netif: connect tap0
starting...
ARP: sending gratuitous from 10.0.0.2
IP6
Netif: error, terminating listen loop
done!

I'm not sure what I was suppose to expect as the output but it says there was an error and that "IP6" is actually coloured red so that can't be good? But the error might be related to the second issue that I see which is that whenever I run a network related sample, the tap0 interface just disappears, or maybe gets deleted. I am unfortunately fairly inexperienced with tun/tap so I'm not sure if this is the expected behaviour, but I'm guessing these two errors might be related to each other and I'm on the verge of success if I fix this last problem.

-Robert


On Wed, Apr 29, 2015 at 7:56 AM, Mindy <mindy@xxxxxxxxxxxxxxxxxxx> wrote:


On 04/29/2015 11:58 AM, Justin Cormack wrote:
On 29 April 2015 at 10:35, Thomas Gazagnaire <thomas@xxxxxxxxxxxxxx> wrote:
Third, when I managed to get one of the network samples building, for
example "ping", I couldn't get the unikernel running locally with a tun/tap
device I created. Even though I use tapctl to create a tap0 device owned by
my user account, just like the tutorial advises, when I go to execute the
unikernel I still get this error:

Fatal error: exception Failure("net_tap0")
Raised at file "src/core/lwt.ml", line 788, characters 22-23
Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
Called from file "main.ml", line 47, characters 2-28


This is rather cryptic but might indicate that you need to run the command
using sudo.
What does strace show here? It might be permissions but if you made
the device owned by your user account it shouldnt be. You may need to
make /dev/net/tun world read and write (which is safe to do).
On 14.04.2, I need to run with sudo even if the device is owned by my user, I've made it with tunctl -u me, and the mode is u+rwx, otherwise strace shows

open("/dev/net/tun", O_RDWR)Â Â Â Â Â Â = 4
ioctl(4, TUNSETIFF, 0x7fffb7dd0a20)Â Â Â= 0
ioctl(4, TUNSETPERSIST, 0)Â Â Â Â Â Â Â = 0
fcntl(4, F_GETFL)Â Â Â Â Â Â Â Â Â Â Â Â= 0x8002 (flags O_RDWR|O_LARGEFILE)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
ioctl(5, SIOCGIFFLAGS, {ifr_name="tap0", ifr_flags=IFF_BROADCAST|IFF_MULTICAST}) = 0
ioctl(5, SIOCSIFFLAGS, {ifr_name="tap0", ???}) = -1 EPERM (Operation not permitted)

So you may need to run it with elevated privileges even if it seems like you should be able to get away with running it as yourself.

(Thanks for the bug report; attempting to reproduce it got me to actually use the tap interface for the first time.)

-Mindy


_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

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