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

Re: [Xen-devel] [Xen-users] Problemi using vif-route script



Roger -

>>> 2) from domU config:
>>> vif = [ 'mac=de:ad:a:1e:42:3,ip=10.3.2.3',
>>>         'mac=ba:cc:7f:0:4:1,bridge=backupbr0,script=vif-bridge']
>>>
>>> The IP is not parsed so the ${ip} variable in the xen scripts is empty.
>>
>> ip should be parsed and written to xenstore -- do you see it there >> (in
>> the backend dir)? I can see the code which reads it in the hotplug
>> script.
>
> I've tried this config and ip is written to xenstore:
>
> /local/domain/0/backend/vif/6/0/ip = "192.168.1.230"   (n0,r6)
>

I think I could track down the issue:
The mac address is not parsed correctly if not padded with leading zeros
(and no error reported, though):
Using the example above which worked perfectly with the old xm,
xl create -n test.domU
====
...shortened output...
"nics": [
            {
                ...
                "mac": "de:ad:0a:0e:02:00",
                "ip": null,
                "bridge": null,
                "ifname": null,
                ...
            },
            {
                ...
                "mac": "ba:cc:7f:00:00:0b",
                "ip": null,
                "bridge": null,
                "ifname": null,
                ...
            }
        ]
=====
If I use padded bytes,
vif = [ 'mac=de:ad:0a:1e:42:03, ip=10.3.2.3',
        'mac=ba:cc:7f:00:04:01,bridge=backupbr0,script=vif-bridge']
it creates correctly
=====
"nics": [
            {
                ...
                "mac": "de:ad:0a:1e:42:03",
                "ip": "10.3.2.3",
                "bridge": null,
                "ifname": null,
                ...
            },
            {
                ...
                "mac": "ba:cc:7f:00:04:01",
                "ip": null,
                "bridge": "backupbr0",
                "ifname": null,
                ...
            }
        ]
=====
which is totally ok for me. Routes are set and the IP of the routed vif
shows up in xenstore.

Many thanks and best regards,
Ulf



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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