jitsu icon indicating copy to clipboard operation
jitsu copied to clipboard

Custom vif setup script not working with mirage-net-xen 1.4.1

Open MagnusS opened this issue 10 years ago • 3 comments

For jitsu we use a faster vif setup script (available here and in C here) instead of the default in /etc/xen/scripts/vif-bridge. With mirage-net-xen version 1.4.1 they stopped working. Downgrading to 1.4.0 fixes the problem.

The unikernel hangs after "MAC: ..." :

Netif: add resume hook
Netif.connect 0
Netfront.create: id=0 domid=0
MAC: 00:16:3e:00:9f:c4

This is in xenstore:

 vif = ""
  0 = ""
   backend = "/local/domain/0/backend/vif/2/0"
   backend-id = "0"
   state = "4"
   handle = "0"
   mac = "00:16:3e:00:9f:c4"
   tx-ring-ref = "9"
   rx-ring-ref = "8"
   event-channel = "4"
   request-rx-copy = "1"
   feature-rx-notify = "1"
   feature-sg = "1"

As the default script works I guess the problem is in the custom scripts, but I'm not sure what should be added to them to fix it. Any suggestions? /cc @djs55

MagnusS avatar May 01 '15 14:05 MagnusS

The only change in 1.4.1 was to wait for the backend to enter state=4. I'd be interested to know what was in the xenstore backend directory (/local/domain/0/backend/vif/2/0 in this case). There might be a log message from netback in the domain 0 log.

The standard vif script might be doing a bit more than ours? In the past it would write a special 'hotplug-status=connected' key, I'm not sure if that's still needed.

Do you know if libxl is running the script itself or via udev? IIRC it's a configuration option which is written somewhere in xenstore. Perhaps the hotplug-status=connected key was only needed for the running via udev case.

(sorry for the brain dump)

On Fri, May 1, 2015 at 3:42 PM, Magnus Skjegstad [email protected] wrote:

For jitsu we use a faster vif setup script (available here https://github.com/mirage/jitsu/blob/master/scripts/fast-vif-bridge and in C here https://github.com/mirage/jitsu/blob/master/scripts/add_vif.c) instead of the default in /etc/xen/scripts/vif-bridge. With mirage-net-xen version 1.4.1 they stopped working. Downgrading to 1.4.0 fixes the problem.

The unikernel hangs after "MAC: ..." :

Netif: add resume hook Netif.connect 0 Netfront.create: id=0 domid=0 MAC: 00:16:3e:00:9f:c4

This is in xenstore:

vif = "" 0 = "" backend = "/local/domain/0/backend/vif/2/0" backend-id = "0" state = "4" handle = "0" mac = "00:16:3e:00:9f:c4" tx-ring-ref = "9" rx-ring-ref = "8" event-channel = "4" request-rx-copy = "1" feature-rx-notify = "1" feature-sg = "1"

As the default script works I guess the problem is in the custom scripts, but I'm not sure what should be added to them to fix it. Any suggestions? /cc @djs55 https://github.com/djs55

— Reply to this email directly or view it on GitHub https://github.com/mirage/jitsu/issues/14.

Dave Scott

djs55 avatar May 01 '15 16:05 djs55

Thanks! Writing hotplug-status=connected to xenstore seems to fix the problem with fast-vif-bridge at least.

/local/domain/0/libxl/disable_udev is set to "1" in Xenstore

MagnusS avatar Aug 14 '15 17:08 MagnusS

Hm looks like it didn't fix the problem completely... maybe I was just lucky and won the race a few times.

MagnusS avatar Aug 14 '15 17:08 MagnusS