Problemi using vif-route script
I'm ccing xen-devel and Roger since he's been looking at the hotplug stuff.
Quoted 5 lines · Ulf Kreutzberg
It seems that
1) in xl.conf you cannot pass a parameter to vif-route like vifscript="vif-route netdev=bond0" any more,
as/etc/xen/scripts/vif-routenetdev=bond0 cannot be executed (error in xl log). I could workaround that...
I didn't realise this was a feature of the old stuff, but yes I can now see that tools/hotplug/Linux/vif-common.sh:dom0_ip() expects netdev=<foo> to have been passed as a parameter to the script.
This something we should fix in the libxl layer I think. In the meantime the obvious workaround would be to create vif-route-bond0 as a simple wrapper around vif-route.
Quoted 5 lines
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.
Quoted 2 lines
If this is not a (known) bug or a general issue, I will provide some logs (xen-hotplug.log or verbose vif-route etc).
If the IP address is in xenstore then more verbose vif-route output would be useful. I usually do
exec 1>>/tmp/vif-hotplug.log
exec 2>&1
set -x
at the top of the script..
Thanks,
Ian.
Quoted 6 lines
Please let me know if you need more information.
Many thanks and best Regards,
Ulf
Quoted 2 lines · Ian Campbell
I'm ccing xen-devel and Roger since he's been looking at the hotplug stuff.
Thanks for Ccing me
Quoted 8 lines · Ulf Kreutzberg
Quoted 5 lines
It seems that
1) in xl.conf you cannot pass a parameter to vif-route like vifscript="vif-route netdev=bond0" any more,
as/etc/xen/scripts/vif-routenetdev=bond0 cannot be executed (error in xl log). I could workaround that...
Quoted 7 lines
I didn't realise this was a feature of the old stuff, but yes I can now see that tools/hotplug/Linux/vif-common.sh:dom0_ip() expects netdev=<foo> to have been passed as a parameter to the script.
This something we should fix in the libxl layer I think. In the meantime the obvious workaround would be to create vif-route-bond0 as a simple wrapper around vif-route.
I will look at adding an option to specify a default netdev in the global xl config file and to allow passing a "netdev" option in the vif specification.
Also, the vif-route script is not working with HVM domains, it is lacking the "add" and "remove" actions used by HVM interfaces, it only supports "online" and "offline".
Quoted 10 lines
Quoted 6 lines
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)
Quoted 23 lines
Quoted 2 lines
If this is not a (known) bug or a general issue, I will provide some logs (xen-hotplug.log or verbose vif-route etc).
If the IP address is in xenstore then more verbose vif-route output would be useful. I usually do
exec 1>>/tmp/vif-hotplug.log
exec 2>&1
set -xat the top of the script..
Thanks,
Ian.Quoted 6 lines
Please let me know if you need more information.
Many thanks and best Regards,
Ulf
Hi,
many thanks for your replies.
Quoted 6 lines · Roger Pau Monné
Quoted 6 lines
Quoted 5 lines
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.
Quoted 7 lines
Quoted 3 lines
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)
At least xenstore-ls did not reveal the IP for the domu.
I will give it another try and see if I did something wrong. Could you please tell me where the parsing code for the ip= parameter in xl.cfg is located so I could insert a printf or something like that for debugging?
Best regards,
Ulf
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 4 lines · Ulf Kreutzberg
Could you please tell me where the parsing code for the ip= parameter in xl.cfg is located so I could insert a printf or something like that for debugging?
Look for "ip" (with the quotes) in tools/libxl/xl_cmdimpl.c parse_config_data.
There's another one in main_networkattach but that is the hotplug (xl network-attach) case (yes, these should be consolidated...).
Ian.
Roger -
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
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.
Quoted 8 lines
Quoted 3 lines
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
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 2 lines · Ulf Kreutzberg
The mac address is not parsed correctly if not padded with leading zeros (and no error reported, though):
Ick, well spotted. It is a bug in xl that it doesn't Do The Right Thing here, even if stripping the leading zeroes is somewhat unconventional IMHO.
Ian.
Quoted 9 lines · Ian Campbell
Quoted 2 lines · Ulf Kreutzberg
The mac address is not parsed correctly if not padded with leading zeros (and no error reported, though):
Ick, well spotted. It is a bug in xl that it doesn't Do The Right Thing here, even if stripping the leading zeroes is somewhat unconventional IMHO.
Ian.
How shall I proceed here? Shall I open a bug report or did some of you already open one?
Thanks and regards,
Ulf
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Ulf Kreutzberg
Quoted 4 lines · Ian Campbell
Quoted 2 lines · Ulf Kreutzberg
The mac address is not parsed correctly if not padded with leading zeros (and no error reported, though):
Quoted 8 lines
Quoted 5 lines
Ick, well spotted. It is a bug in xl that it doesn't Do The Right Thing here, even if stripping the leading zeroes is somewhat unconventional IMHO.
Ian.
How shall I proceed here? Shall I open a bug report or did some of you already open one?
Hello,
I've send a patch series that I think should fix your issues, could you please try them and report back?
http://lists.xen.org/archives/html/xen-devel/2013-01/msg02217.html
Thanks, Roger.