* Re: [Xen-users] Problemi using vif-route script
[not found] ` <51015DB8.40107@hosteurope.de>
@ 2013-01-25 9:20 ` Ian Campbell
2013-01-25 13:51 ` Roger Pau Monné
0 siblings, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2013-01-25 9:20 UTC (permalink / raw)
To: Ulf Kreutzberg; +Cc: xen-users@lists.xen.org, Roger Pau Monne, xen-devel
I'm ccing xen-devel and Roger since he's been looking at the hotplug
stuff.
On Thu, 2013-01-24 at 16:13 +0000, Ulf Kreutzberg wrote:
> 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-route netdev=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.
> 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.
> 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.
> Please let me know if you need more information.
>
> Many thanks and best Regards,
> Ulf
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-users] Problemi using vif-route script
2013-01-25 9:20 ` [Xen-users] Problemi using vif-route script Ian Campbell
@ 2013-01-25 13:51 ` Roger Pau Monné
2013-01-25 14:04 ` Ulf Kreutzberg
2013-01-28 13:45 ` Ulf Kreutzberg
0 siblings, 2 replies; 8+ messages in thread
From: Roger Pau Monné @ 2013-01-25 13:51 UTC (permalink / raw)
To: Ian Campbell; +Cc: Ulf Kreutzberg, xen-devel, xen-users@lists.xen.org
On 25/01/13 10:20, Ian Campbell wrote:
> I'm ccing xen-devel and Roger since he's been looking at the hotplug
> stuff.
Thanks for Ccing me
>
> On Thu, 2013-01-24 at 16:13 +0000, Ulf Kreutzberg wrote:
>> 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-route netdev=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.
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".
>
>> 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)
>> 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.
>
>> Please let me know if you need more information.
>>
>> Many thanks and best Regards,
>> Ulf
>>
>>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-users] Problemi using vif-route script
2013-01-25 13:51 ` Roger Pau Monné
@ 2013-01-25 14:04 ` Ulf Kreutzberg
2013-01-25 14:15 ` Ian Campbell
2013-01-28 13:45 ` Ulf Kreutzberg
1 sibling, 1 reply; 8+ messages in thread
From: Ulf Kreutzberg @ 2013-01-25 14:04 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: xen-users@lists.xen.org, Ian Campbell, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 910 bytes --]
Hi,
many thanks for your replies.
On 25.01.2013 14:51, Roger Pau Monné wrote:
>>> 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)
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
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-users] Problemi using vif-route script
2013-01-25 14:04 ` Ulf Kreutzberg
@ 2013-01-25 14:15 ` Ian Campbell
0 siblings, 0 replies; 8+ messages in thread
From: Ian Campbell @ 2013-01-25 14:15 UTC (permalink / raw)
To: Ulf Kreutzberg; +Cc: xen-users@lists.xen.org, xen-devel, Roger Pau Monne
On Fri, 2013-01-25 at 14:04 +0000, Ulf Kreutzberg wrote:
>
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-users] Problemi using vif-route script
2013-01-25 13:51 ` Roger Pau Monné
2013-01-25 14:04 ` Ulf Kreutzberg
@ 2013-01-28 13:45 ` Ulf Kreutzberg
2013-01-28 13:59 ` Ian Campbell
1 sibling, 1 reply; 8+ messages in thread
From: Ulf Kreutzberg @ 2013-01-28 13:45 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: xen-users@lists.xen.org, Ian Campbell, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 2032 bytes --]
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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-users] Problemi using vif-route script
2013-01-28 13:45 ` Ulf Kreutzberg
@ 2013-01-28 13:59 ` Ian Campbell
2013-02-01 14:46 ` Ulf Kreutzberg
0 siblings, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2013-01-28 13:59 UTC (permalink / raw)
To: Ulf Kreutzberg; +Cc: xen-users@lists.xen.org, xen-devel, Roger Pau Monne
On Mon, 2013-01-28 at 13:45 +0000, Ulf Kreutzberg wrote:
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-users] Problemi using vif-route script
2013-01-28 13:59 ` Ian Campbell
@ 2013-02-01 14:46 ` Ulf Kreutzberg
2013-02-02 15:51 ` Roger Pau Monné
0 siblings, 1 reply; 8+ messages in thread
From: Ulf Kreutzberg @ 2013-02-01 14:46 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-users@lists.xen.org, xen-devel, Roger Pau Monne
[-- Attachment #1.1: Type: text/plain, Size: 515 bytes --]
On 28.01.2013 14:59, Ian Campbell wrote:
> On Mon, 2013-01-28 at 13:45 +0000, Ulf Kreutzberg wrote:
>> 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
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-users] Problemi using vif-route script
2013-02-01 14:46 ` Ulf Kreutzberg
@ 2013-02-02 15:51 ` Roger Pau Monné
0 siblings, 0 replies; 8+ messages in thread
From: Roger Pau Monné @ 2013-02-02 15:51 UTC (permalink / raw)
To: Ulf Kreutzberg; +Cc: xen-users@lists.xen.org, Ian Campbell, xen-devel
On 01/02/13 15:46, Ulf Kreutzberg wrote:
>
> On 28.01.2013 14:59, Ian Campbell wrote:
>> On Mon, 2013-01-28 at 13:45 +0000, Ulf Kreutzberg wrote:
>>> 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?
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-02-02 15:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20121026072821.GA9853@intersect>
[not found] ` <1351237241.8558.9.camel@dagon.hellion.org.uk>
[not found] ` <20121026121544.GA14662@intersect>
[not found] ` <1351255054.15162.66.camel@zakaz.uk.xensource.com>
[not found] ` <20121026170920.GA4835@intersect>
[not found] ` <1351276218.11876.0.camel@dagon.hellion.org.uk>
[not found] ` <51015DB8.40107@hosteurope.de>
2013-01-25 9:20 ` [Xen-users] Problemi using vif-route script Ian Campbell
2013-01-25 13:51 ` Roger Pau Monné
2013-01-25 14:04 ` Ulf Kreutzberg
2013-01-25 14:15 ` Ian Campbell
2013-01-28 13:45 ` Ulf Kreutzberg
2013-01-28 13:59 ` Ian Campbell
2013-02-01 14:46 ` Ulf Kreutzberg
2013-02-02 15:51 ` Roger Pau Monné
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).