Re: [ovs-discuss] Openvswitch with LXC

2021-02-03 Thread George Papathanail
Thank you Rayomond,

I followed these steps:

1) sudo lxc-start -n c2 -d --logfile=logs
2) ovs-vsctl add-br switch0
ip add add 192.168.100.1/24 dev switch0

I have these two scripts:
BRIDGE=switch0 ovs-vsctl --may-exist add-br $BRIDGE ovs-vsctl --if-exists
del-port $BRIDGE $5 ovs-vsctl --may-exist add-port $BRIDGE $5

# cat /etc/lxc/ifdown #!/bin/bash ovsBr=switch0 ovs-vsctl --if-exists
del-port ${ovsBr} $5


I managed to attach the lxc interface to the ovs-bridge
sudo ovs-vsctl show
8cd3e1a6-eaa9-4341-b5c8-677e381c8306 Bridge switch0 Port vethlQXvGc
Interface vethlQXvGc Port switch0 Interface switch0 type: internal
ovs_version: "2.13.1"
The problem now is that the container did not take IP. P.S I only have one
physical interface so I did not bind it with the bridge.



Στις Πέμ, 4 Φεβ 2021 στις 8:28 π.μ., ο/η Raymond Burkholder <
r...@oneunified.net> έγραψε:

> Pretty simple:
>
> 1) read the man page on lxc.container.conf
> 2) build one or two interface up/down files
>
> Don't guarantee this works without a bit of extra massaging, but should be
> enough to get started:
>
> # cat /etc/lxc/scripts/ovs.port.up.sh
> #!/bin/bash
> logger "lxc_name=${LXC_NAME}"
> logger "lxc_config=${LXC_CONFIG_FILE}"
> logger "values = $1 $2 $3 $4 $5"
> logger "vlan=${VLAN} $5"
> BRIDGE=ovsbr0
> ovs-vsctl --may-exist add-br $BRIDGE
> ovs-vsctl --may-exist add-port $BRIDGE $5
> if [ "$VLAN" != "" ]; then
>   ovs-vsctl set port $5 tag=$VLAN
>   fi
>
>
> There might be other tidbits at:
> https://blog.raymond.burkholder.net/index.php?/categories/7-LXC
>
>
> On 2/3/21 10:12 AM, George Papathanail wrote:
>
> Hello everyone, I'm trying to connect LXC with Openvswitch and to have a
> setup like this:
>
>
>
> I'm kindly asking for your input, or if there is a tutorial please let me
> know
>
> Thank you in advance
>
> ___
> discuss mailing 
> listdiscuss@openvswitch.orghttps://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
>
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Openvswitch with LXC

2021-02-03 Thread Raymond Burkholder

Pretty simple:

1) read the man page on lxc.container.conf
2) build one or two interface up/down files

Don't guarantee this works without a bit of extra massaging, but should 
be enough to get started:


# cat /etc/lxc/scripts/ovs.port.up.sh
#!/bin/bash
logger "lxc_name=${LXC_NAME}"
logger "lxc_config=${LXC_CONFIG_FILE}"
logger "values = $1 $2 $3 $4 $5"
logger "vlan=${VLAN} $5"
BRIDGE=ovsbr0
ovs-vsctl --may-exist add-br $BRIDGE
ovs-vsctl --may-exist add-port $BRIDGE $5
if [ "$VLAN" != "" ]; then
  ovs-vsctl set port $5 tag=$VLAN
  fi


There might be other tidbits at:
https://blog.raymond.burkholder.net/index.php?/categories/7-LXC


On 2/3/21 10:12 AM, George Papathanail wrote:
Hello everyone, I'm trying to connect LXC with Openvswitch and to have 
a setup like this:




I'm kindly asking for your input, or if there is a tutorial please let 
me know


Thank you in advance

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] dp_hash algorithm works incorretly when tcp retransmit

2021-02-03 Thread ychen
We meet a problem that same tcp session selects different ovs group bucket when 
in tcp retransmition, and we can easily reproduce this phenomenon.
After some code research, we found that when tcp retransmit, it may call 
function sk_rethink_txhash(), and this function makes skb->hash changed, hence 
different ovs group bucket selected.
anyone has good suggestions to fix this problem?

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] xml parsing issues with lib/db-ctl-base.xml

2021-02-03 Thread Ilya Maximets
On 2/3/21 7:22 PM, Ben Pfaff wrote:
> On Wed, Feb 03, 2021 at 06:02:02PM +0100, Ilya Maximets wrote:
>>> On Tue, Feb 02, 2021 at 05:02:54PM -0500, Flavio Fernandes wrote:
 Hi Ben,

 compiling ovn master with ovs master is upset because of an xml issue in 
 the file:  lib/db-ctl-base.xml

 Could you help fixing it, please?
>>>
>>> Oops, I applied this:
>>
>> 
>>
>> Thanks, Ben for fixing this.  I missed that typo during review.
>>
>> I was trying to figure out why we didn't catch this issue in OVS build
>> and I found that we actually have 2 copies of several parts of manpages.
>> One .man file and one .xml file for following docs:
>>
>> lib/common.xml
>> lib/daemon.xml
>> lib/db-ctl-base.xml
>> lib/ssl.xml
>> lib/ssl-bootstrap.xml
>> lib/ssl-peer-ca-cert.xml
>> lib/table.xml
>> lib/vlog.xml
>> lib/unixctl.xml
>>
>> All these files were added to be used in OVN man pages and has no users in
>> OVS code base.  We should, probably, generate man pages from these xml files
>> instead of having *.man duplicates to catch this kind of issues.
> 
> At one point I was trying to convert all the manpages to XML.  I stopped
> before I finished.
> 
> These days, .rst files might be a better solution.

Yes, probably.  Right now we have all 3 types of manpage sources
(man, xml and rst).  It'll be good to unify them, i.e. convert all
to rST.  Looks like a big chunk of work, though.

While we're on this topic, It would be great if you could take a
quick look at this patch:
  
http://patchwork.ozlabs.org/project/openvswitch/patch/20210129140305.1392406-1-i.maxim...@ovn.org/

Best regards, Ilya Maximets.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] xml parsing issues with lib/db-ctl-base.xml

2021-02-03 Thread Ben Pfaff
On Wed, Feb 03, 2021 at 06:02:02PM +0100, Ilya Maximets wrote:
> > On Tue, Feb 02, 2021 at 05:02:54PM -0500, Flavio Fernandes wrote:
> >> Hi Ben,
> >> 
> >> compiling ovn master with ovs master is upset because of an xml issue in 
> >> the file:  lib/db-ctl-base.xml
> >> 
> >> Could you help fixing it, please?
> > 
> > Oops, I applied this:
> 
> 
> 
> Thanks, Ben for fixing this.  I missed that typo during review.
> 
> I was trying to figure out why we didn't catch this issue in OVS build
> and I found that we actually have 2 copies of several parts of manpages.
> One .man file and one .xml file for following docs:
> 
> lib/common.xml
> lib/daemon.xml
> lib/db-ctl-base.xml
> lib/ssl.xml
> lib/ssl-bootstrap.xml
> lib/ssl-peer-ca-cert.xml
> lib/table.xml
> lib/vlog.xml
> lib/unixctl.xml
> 
> All these files were added to be used in OVN man pages and has no users in
> OVS code base.  We should, probably, generate man pages from these xml files
> instead of having *.man duplicates to catch this kind of issues.

At one point I was trying to convert all the manpages to XML.  I stopped
before I finished.

These days, .rst files might be a better solution.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Openvswitch with LXC

2021-02-03 Thread George Papathanail
Hello everyone, I'm trying to connect LXC with Openvswitch and to have a
setup like this:

[image: lxc.png]

I'm kindly asking for your input, or if there is a tutorial please let me
know

Thank you in advance
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] xml parsing issues with lib/db-ctl-base.xml

2021-02-03 Thread Ilya Maximets
> On Tue, Feb 02, 2021 at 05:02:54PM -0500, Flavio Fernandes wrote:
>> Hi Ben,
>> 
>> compiling ovn master with ovs master is upset because of an xml issue in the 
>> file:  lib/db-ctl-base.xml
>> 
>> Could you help fixing it, please?
> 
> Oops, I applied this:



Thanks, Ben for fixing this.  I missed that typo during review.

I was trying to figure out why we didn't catch this issue in OVS build
and I found that we actually have 2 copies of several parts of manpages.
One .man file and one .xml file for following docs:

lib/common.xml
lib/daemon.xml
lib/db-ctl-base.xml
lib/ssl.xml
lib/ssl-bootstrap.xml
lib/ssl-peer-ca-cert.xml
lib/table.xml
lib/vlog.xml
lib/unixctl.xml

All these files were added to be used in OVN man pages and has no users in
OVS code base.  We should, probably, generate man pages from these xml files
instead of having *.man duplicates to catch this kind of issues.

(Writing this down just to highlight the issue and not forget).

Best regards, Ilya Maximets.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss