Re: about the new added attributes "check" and "type" for interface mac element

2020-11-01 Thread Yalan Zhang
Hi,

I have filed a bug about the error messages,
https://bugzilla.redhat.com/show_bug.cgi?id=1892130
And I will track the questions on that bug, please help to update on the
bug comments about the questions.
Thank you!

---
Best Regards,
Yalan Zhang
IRC: yalzhang


On Wed, Oct 21, 2020 at 10:51 AM Yalan Zhang  wrote:

> Hi all,
>
> I have done some tests for the new attributes "check" and "type", could
> you please help to have a check?  And I have some questions about the
> patch, please help to have a look, Thank you!
>
> The questions:
> 1. in step 4 below, the error message should be updated:
> Actual results:
> XML error: invalid mac address **check** value: 'next'. Valid values are
> "generated" and "static".
> expected results:
> XML error: invalid mac address **type** value: 'next'. Valid values are
> "generated" and "static".
>
> 2. I have checked the vmware OUI definition and found this:
> https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-1B6A280E-0C77-4775-8F84-4B3F40673178.html
> it says the VMware OUI is 00:50:56, not 00:0c:29 in the patches.  Am I
> missing something?
>
> 3. Could you please tell more about the user story? as I can not
> understand the scenario when " it will ignore all the checks libvirt does
> about the origin of the MAC address(whether or not it's in a VMWare OUI)
> and forward the original one to the ESX server telling it not to check it
> either". Does it happen when we try to transform a kvm guest to a vmware
> guest?
>
> 4. How to test it as a libvirt QE? Are the test scenarios below enough
> without ESX env?
>
>
> Test steps:
>
> 1. Start vm with different configuration with mac in "00:0c:29" range:
> # virsh dumpxml rhel | grep /interface -B12
> ...
> 
>   
>   
>   
>function='0x0'/>
> 
> 
>   
>   
>   
>function='0x0'/>
> 
> 
>   
>   
>   
>function='0x0'/>
> 
> 
>   
>   
>   
>function='0x0'/>
> 
>
> # virsh start rhel
> Domain rhel started
>
> 2. login guest and check the interfaces:
> # ip addr
> ...
> 2: enp5s0:  mtu 1500 qdisc fq_codel state
> UP group default qlen 1000
> link/ether 00:0c:29:e7:9b:cb brd ff:ff:ff:ff:ff:ff
> inet 192.168.122.142/24 brd 192.168.122.255 scope global dynamic
> noprefixroute enp5s0
>valid_lft 3584sec preferred_lft 3584sec
> inet6 fe80::351c:686a:863e:4a7f/64 scope link noprefixroute
>valid_lft forever preferred_lft forever
> 3: enp11s0:  mtu 1500 qdisc fq_codel
> state UP group default qlen 1000
> link/ether 00:0c:29:3b:e0:50 brd ff:ff:ff:ff:ff:ff
> inet 192.168.122.202/24 brd 192.168.122.255 scope global dynamic
> noprefixroute enp11s0
>valid_lft 3584sec preferred_lft 3584sec
> inet6 fe80::2b79:4675:6c59:6822/64 scope link noprefixroute
>valid_lft forever preferred_lft forever
> 4: enp12s0:  mtu 1500 qdisc fq_codel
> state UP group default qlen 1000
> link/ether 00:0c:29:73:f6:dc brd ff:ff:ff:ff:ff:ff
> inet 192.168.122.33/24 brd 192.168.122.255 scope global dynamic
> noprefixroute enp12s0
>valid_lft 3584sec preferred_lft 3584sec
> inet6 fe80::e43d:555:ba85:4030/64 scope link noprefixroute
>valid_lft forever preferred_lft forever
> 5: enp13s0:  mtu 1500 qdisc fq_codel
> state UP group default qlen 1000
> link/ether 00:0c:29:aa:dc:6c brd ff:ff:ff:ff:ff:ff
> inet 192.168.122.161/24 brd 192.168.122.255 scope global dynamic
> noprefixroute enp13s0
>valid_lft 3584sec preferred_lft 3584sec
> inet6 fe80::f32d:e2e8:9c8b:47fd/64 scope link noprefixroute
>valid_lft forever preferred_lft forever
>
>
> 3. start vm without the "check" and "type" attributes, and check the live
> xml do not include these attributes, either.
>  # virsh start vm1
> virshDomain vm1 started
> # virsh dumpxml vm1 | grep /interface -B8
> 
> 
>   
>portid='b02dc78f-69ad-4db7-870c-f371fd730537' bridge='virbr0'/>
>   
>   
>   
>function='0x0'/>
> 
>
> 4. negative test:
> Set "" in virsh edit
> # virsh edit vm1
> error: XML document failed to validate against schema: Unable to validate
> doc against /usr/share/libvirt/schemas/domain.rng
> Extra element devices in interleave
> Element domain failed to validate content
>
> Failed. Try again? [y,n,i,f,?]:   > press 'i'
> error: XML error: invalid mac address check value: 'next'. Valid values
> are "generated" and "static".
> Failed. Try again? [y,n,f,?]:
>
>
> ---
> Best Regards,
> Yalan Zhang
> IRC: yalzhang
>


about the new added attributes "check" and "type" for interface mac element

2020-10-20 Thread Yalan Zhang
Hi all,

I have done some tests for the new attributes "check" and "type", could you
please help to have a check?  And I have some questions about the patch,
please help to have a look, Thank you!

The questions:
1. in step 4 below, the error message should be updated:
Actual results:
XML error: invalid mac address **check** value: 'next'. Valid values are
"generated" and "static".
expected results:
XML error: invalid mac address **type** value: 'next'. Valid values are
"generated" and "static".

2. I have checked the vmware OUI definition and found this:
https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-1B6A280E-0C77-4775-8F84-4B3F40673178.html
it says the VMware OUI is 00:50:56, not 00:0c:29 in the patches.  Am I
missing something?

3. Could you please tell more about the user story? as I can not understand
the scenario when " it will ignore all the checks libvirt does about the
origin of the MAC address(whether or not it's in a VMWare OUI) and forward
the original one to the ESX server telling it not to check it either". Does
it happen when we try to transform a kvm guest to a vmware guest?

4. How to test it as a libvirt QE? Are the test scenarios below enough
without ESX env?


Test steps:

1. Start vm with different configuration with mac in "00:0c:29" range:
# virsh dumpxml rhel | grep /interface -B12
...

  
  
  
  


  
  
  
  


  
  
  
  


  
  
  
  


# virsh start rhel
Domain rhel started

2. login guest and check the interfaces:
# ip addr
...
2: enp5s0:  mtu 1500 qdisc fq_codel state
UP group default qlen 1000
link/ether 00:0c:29:e7:9b:cb brd ff:ff:ff:ff:ff:ff
inet 192.168.122.142/24 brd 192.168.122.255 scope global dynamic
noprefixroute enp5s0
   valid_lft 3584sec preferred_lft 3584sec
inet6 fe80::351c:686a:863e:4a7f/64 scope link noprefixroute
   valid_lft forever preferred_lft forever
3: enp11s0:  mtu 1500 qdisc fq_codel state
UP group default qlen 1000
link/ether 00:0c:29:3b:e0:50 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.202/24 brd 192.168.122.255 scope global dynamic
noprefixroute enp11s0
   valid_lft 3584sec preferred_lft 3584sec
inet6 fe80::2b79:4675:6c59:6822/64 scope link noprefixroute
   valid_lft forever preferred_lft forever
4: enp12s0:  mtu 1500 qdisc fq_codel state
UP group default qlen 1000
link/ether 00:0c:29:73:f6:dc brd ff:ff:ff:ff:ff:ff
inet 192.168.122.33/24 brd 192.168.122.255 scope global dynamic
noprefixroute enp12s0
   valid_lft 3584sec preferred_lft 3584sec
inet6 fe80::e43d:555:ba85:4030/64 scope link noprefixroute
   valid_lft forever preferred_lft forever
5: enp13s0:  mtu 1500 qdisc fq_codel state
UP group default qlen 1000
link/ether 00:0c:29:aa:dc:6c brd ff:ff:ff:ff:ff:ff
inet 192.168.122.161/24 brd 192.168.122.255 scope global dynamic
noprefixroute enp13s0
   valid_lft 3584sec preferred_lft 3584sec
inet6 fe80::f32d:e2e8:9c8b:47fd/64 scope link noprefixroute
   valid_lft forever preferred_lft forever


3. start vm without the "check" and "type" attributes, and check the live
xml do not include these attributes, either.
 # virsh start vm1
virshDomain vm1 started
# virsh dumpxml vm1 | grep /interface -B8


  
  
  
  
  
  


4. negative test:
Set "" in virsh edit
# virsh edit vm1
error: XML document failed to validate against schema: Unable to validate
doc against /usr/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content

Failed. Try again? [y,n,i,f,?]:   > press 'i'
error: XML error: invalid mac address check value: 'next'. Valid values are
"generated" and "static".
Failed. Try again? [y,n,f,?]:


---
Best Regards,
Yalan Zhang
IRC: yalzhang