Re: [libvirt] [PATCH] openvz: fix bridge devices parsing in openvzReadNetworkConf()

2011-06-01 Thread Matthias Bolte
2011/5/31 Jean-Baptiste Rouault :
> On Tuesday 31 May 2011 14:41:55 Matthias Bolte wrote:
>> I also added a testcase and looked at the other config parsing code in
>> the OpenVZ driver. I thing that openvzLoadDomains is missing this
>> line:
>>
>>   dom->def->virtType = VIR_DOMAIN_VIRT_OPENVZ;
>>
>> Could you do a virsh dumpxml for an OpenVZ guest and check the first
>> line of XML? I think it currently reads
>>
>>   
>>
>> but should actually read
>>
>>   
>>
>> and we need to fix this.
>>
>> Matthias
>
> It indeed outputs ""
>
> Regards,
> Jean-Baptiste

Now fixed by this patch

https://www.redhat.com/archives/libvir-list/2011-June/msg3.html

Matthias

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] openvz: fix bridge devices parsing in openvzReadNetworkConf()

2011-05-31 Thread Jean-Baptiste Rouault
On Tuesday 31 May 2011 14:41:55 Matthias Bolte wrote:
> I also added a testcase and looked at the other config parsing code in
> the OpenVZ driver. I thing that openvzLoadDomains is missing this
> line:
> 
>   dom->def->virtType = VIR_DOMAIN_VIRT_OPENVZ;
> 
> Could you do a virsh dumpxml for an OpenVZ guest and check the first
> line of XML? I think it currently reads
> 
>   
> 
> but should actually read
> 
>   
> 
> and we need to fix this.
> 
> Matthias

It indeed outputs ""

Regards,
Jean-Baptiste

-- 
Jean-Baptiste ROUAULT
Ingénieur R&D - Diateam : Architectes de l'information
Phone : +33 (0)9 53 16 02 70 Fax : +33 (0)2 98 050 051

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] openvz: fix bridge devices parsing in openvzReadNetworkConf()

2011-05-31 Thread Matthias Bolte
2011/5/31 Jean-Baptiste Rouault :
> strchrnul() was called on the wrong string so it returned
> the same result for each iteration.
> ---
>  src/openvz/openvz_conf.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
> index 5f33f75..6e32242 100644
> --- a/src/openvz/openvz_conf.c
> +++ b/src/openvz/openvz_conf.c
> @@ -237,7 +237,7 @@ openvzReadNetworkConf(virDomainDefPtr def,
>
>             /*parse string*/
>             do {
> -                char *next = strchrnul (token, ',');
> +                char *next = strchrnul (p, ',');
>                 if (STRPREFIX(p, "ifname=")) {
>                     /* skip in libvirt */
>                 } else if (STRPREFIX(p, "host_ifname=")) {
> --
> 1.7.1

ACK and applied, thanks.

I also added a testcase and looked at the other config parsing code in
the OpenVZ driver. I thing that openvzLoadDomains is missing this
line:

  dom->def->virtType = VIR_DOMAIN_VIRT_OPENVZ;

Could you do a virsh dumpxml for an OpenVZ guest and check the first
line of XML? I think it currently reads

  

but should actually read

  

and we need to fix this.

Matthias

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] openvz: fix bridge devices parsing in openvzReadNetworkConf()

2011-05-31 Thread Jean-Baptiste Rouault
strchrnul() was called on the wrong string so it returned
the same result for each iteration.
---
 src/openvz/openvz_conf.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index 5f33f75..6e32242 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -237,7 +237,7 @@ openvzReadNetworkConf(virDomainDefPtr def,
 
 /*parse string*/
 do {
-char *next = strchrnul (token, ',');
+char *next = strchrnul (p, ',');
 if (STRPREFIX(p, "ifname=")) {
 /* skip in libvirt */
 } else if (STRPREFIX(p, "host_ifname=")) {
-- 
1.7.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list