Port-xen archive

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

Re: Cannot create domU's on current: sysctl_createv: sysctl_create(xvif1.0) returned 22



On 11/08/2009 07:06 PM, Manuel Bouyer wrote:
On Sun, Nov 08, 2009 at 01:04:52PM +0000, Hugo Silva wrote:
Not sure if I should post this to current-users instead, let me know
if that's a better option..

The problem ended up being LVM related, sorry for the noise. I saw these
new messages and jumped to the conclusion.

I still get the sysctl messages though, while in another dom0 running
5.0.1 I don't. Are they safe to ignore?

it's probably going to be a problem at some point, but I don't know what's
using these sysctls right  now.

The issue is that xvif identifiers use "." to separate domain from handle. This causes issues when generating "net.interfaces.xvifX.Y.sndq" sysctl entries, because "." is not allowed in a name of a node.

As an exercise, I replaced "." with "_" at couple of places -- as a proof of concept -- and it seems it fixed the warning and also allowed sysctl entries to be created. Testing changes I did are attached to this email. I booted domU domain and was able to use network.

I'm not sure, however, these are *complete* changes needed. Maybe there's a "." hidden somewhere waiting for replacement...

-- Juraj
diff --git a/sys/arch/xen/xen/xennetback_xenbus.c 
b/sys/arch/xen/xen/xennetback_xenbus.c
index 15f1ac2..bb9c89d 100644
--- a/sys/arch/xen/xen/xennetback_xenbus.c
+++ b/sys/arch/xen/xen/xennetback_xenbus.c
@@ -296,7 +296,7 @@ xennetback_xenbus_create(struct xenbus_device *xbusd)
        /* we can't use the same MAC addr as our guest */
        xneti->xni_enaddr[3]++;
        /* create pseudo-interface */
-       snprintf(xneti->xni_if.if_xname, IFNAMSIZ, "xvif%d.%d",
+       snprintf(xneti->xni_if.if_xname, IFNAMSIZ, "xvif%d_%d",
            (int)domid, (int)handle);
        aprint_verbose_ifnet(ifp, "Ethernet address %s\n",
            ether_sprintf(xneti->xni_enaddr));
diff --git a/usr/pkg/etc/xen/scripts/vif-bridge 
b/usr/pkg/etc/xen/scripts/vif-bridge
index e87b62a..dac3fe5 100755
--- a/usr/pkg/etc/xen/scripts/vif-bridge
+++ b/usr/pkg/etc/xen/scripts/vif-bridge
@@ -20,7 +20,7 @@ case $xstatus in
        xbridge=$(xenstore-read "$xpath/bridge")
        xfid=$(xenstore-read "$xpath/frontend-id")
        xhandle=$(xenstore-read "$xpath/handle")
-       iface=xvif$xfid.$xhandle
+       iface=xvif${xfid}_$xhandle
        echo ifconfig $iface up
        ifconfig $iface up
        brconfig $xbridge add $iface
diff --git a/usr/pkg/etc/xen/scripts/vif-ip b/usr/pkg/etc/xen/scripts/vif-ip
index 2160602..9d7fcd4 100755
--- a/usr/pkg/etc/xen/scripts/vif-ip
+++ b/usr/pkg/etc/xen/scripts/vif-ip
@@ -20,7 +20,7 @@ case $xstatus in
        xip=$(xenstore-read "$xpath/ip")
        xfid=$(xenstore-read "$xpath/frontend-id")
        xhandle=$(xenstore-read "$xpath/handle")
-       iface=xvif$xfid.$xhandle
+       iface=xvif${xfid}_$xhandle
        echo ifconfig $iface $xip up
        ifconfig $iface $xip up
        xenstore-write $xpath/hotplug-status connected


Home | Main Index | Thread Index | Old Index