Re: [ovs-discuss] [OVN] Logging IRC meetings

2020-03-06 Thread Daniel Alvarez Sanchez
Thanks a lot Ben

On Fri, Mar 6, 2020 at 8:48 PM Ben Pfaff  wrote:

> On Fri, Mar 06, 2020 at 04:09:41PM +0100, Daniel Alvarez Sanchez wrote:
> > In OpenStack we use Meetbot [0] to log the IRC meetings and it'll
> generate
> > the minutes afterwards that we can send after the meeting to the ML index
> > them in the website (coming up!).
> >
> > @Ben, as founder of the #openvswitch channel we can start straight away
> > using OpenStack Meetbot by following steps at [1]. I checked with
> > #openstack-infra folks and they're fine with #openvswitch logging the
> > meetings using the bot.
>
> OK, I did the steps there, that is, I sent the 3 messages to chanserv
> that it mentioned.  It didn't make meetbot join the channel, which I
> think is part of the goal.  I am not sure what I need to do to make that
> happen.  Do you know what I missed?
>

I think that we missed this patch that I just proposed [0].
Once approved I believe we'll see the bot joining.

Thanks a lot!
Daniel

[0] https://review.opendev.org/#/c/711756/
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] [OVN] Logging IRC meetings

2020-03-06 Thread Ben Pfaff
On Fri, Mar 06, 2020 at 04:09:41PM +0100, Daniel Alvarez Sanchez wrote:
> In OpenStack we use Meetbot [0] to log the IRC meetings and it'll generate
> the minutes afterwards that we can send after the meeting to the ML index
> them in the website (coming up!).
> 
> @Ben, as founder of the #openvswitch channel we can start straight away
> using OpenStack Meetbot by following steps at [1]. I checked with
> #openstack-infra folks and they're fine with #openvswitch logging the
> meetings using the bot.

OK, I did the steps there, that is, I sent the 3 messages to chanserv
that it mentioned.  It didn't make meetbot join the channel, which I
think is part of the goal.  I am not sure what I need to do to make that
happen.  Do you know what I missed?
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] How to know lifetime of each matched flow?

2020-03-06 Thread Ben Pfaff
On Fri, Mar 06, 2020 at 08:27:38PM +0800, Su Jinzhao wrote:
> I noticed that for each flow entry or meter, there are n_bytes, n_pkts,
> duration field with the output of dump-flows or meter-stats command. I know
> that the duration field for a flow entry is the time since it installed in
> the switch.
> 
> BUT, how can I know when does each matched flow start and stop?

If you need to know that for individual connections, you might want to
try NetFlow.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] [HELP] Question about Raft

2020-03-06 Thread Han Zhou
On Fri, Mar 6, 2020 at 1:13 AM txfh2007 via discuss <
ovs-discuss@openvswitch.org> wrote:
>
> Hi Han && all:
>
> I have a question about RAFT: I have tried the latest OVN-2.30, and
have found in some condition, there is one node whose role is always
"Candidate" (got by cluster/status cmd), but act as a Follower. My cluster
still works well, but it seems odd that a server's role is always
Candidate. As far as I know, server's role is normally Follower or Leader.

Hi Timo, I happened to fix the problem yesterday and here is the patch:
https://patchwork.ozlabs.org/patch/1250116/. Details of my analysis is in
commit message and a test case is added to cover this scenario.

> After digging into related code, I think I can try to describe how to
reproduce this scenario:
> 1. It is three servers cluster: One Leader(S2), Two
followers(S1,S3)
> 2. Try to disconnect Leader(S2) from other two servers,so S2
would add term and send vote request, and meanwhile S1 and S3 would choose
a new Leader(Let's say it's S3)

When S1 and S3 choose a new leader, they (one of them, or both) would have
to increase the term, too.

> 3. Recover connection between S2 and other two nodes, then if S2
receives append entry req from S3, as S3's term is lower, so S2 will reply
"stale term"

If S2 or S3 already becomes leader, their term won't be lower than S2. From
this point on, the below steps shouldn't happen. But instead, it is
possible that when S2 receives append-request from the new leader, it has
the same term, and it updates the leader without switching from candidate
to follower, thus result in the candidate state forever.

> 4. After S3 gets S2's reply, S3 will change its term to S2's
value and change its role to follower and then candidate(at the same time ,
S1/S2/S3 are all candidate role)
> 5.Then if S2 got S3's vote request and vote for S3, S3 will
become new leader, but S2's role is still candidate
>
> I guess The reason is term of S3's vote request is equal to S2's
term, For S2, it will change to follower only if receiving vote request
whose term value is larger than it own .
> Am I right? and the candidate role(but actually is a follower) is
reasonable ?
>
> Thanks
> Timo
>
Hi Timo,
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] [OVN] Multiple localnet ports on a single Logical Switch

2020-03-06 Thread Ben Pfaff
On Fri, Mar 06, 2020 at 02:36:00PM +0100, Daniel Alvarez Sanchez wrote:
> Thanks a lot for your answer, Ben.
> 
> On Thu, Mar 5, 2020 at 9:21 PM Ben Pfaff  wrote:
> 
> > On Wed, Mar 04, 2020 at 04:01:22PM +0100, Daniel Alvarez Sanchez wrote:
> > > As a possible alternative, we could support multiple localnet ports on
> > the
> > > same Logical Switch. In the first place, we can assume that on a
> > particular
> > > hypervisor, we're not going to have ports bound to multiple segments (ie.
> > > on hv1 only ports on segment1 will be present, on hv2 only ports on
> > > segment2 will be present and so on...). This way, ovn-controller can
> > create
> > > the patch-port to the provider bridge based on the local bridge-mappings
> > > configuration on each hypervisor and the rest of the localnet ports will
> > > have no effect.
> >
> > I don't see a big problem with this.
> >
> > If you implement it, be sure to update the documentation, since there
> > are multiple places that talk about LSes with localnet ports having only
> > two LSPs total.
> >
> 
> Right, I noticed this and it's a great point.
> 
> I drew this little diagram [0] to show graphically the idea behind my
> suggestion.
> The idea is not to have multiple mappings for the same LS on a given
> hypervisor as that'd make things trickier I believe. In the diagram, we
> would not expect to have hv1 having both 'segment1:br-ex, segment2:br-ex2'.
> As long as CMS ensures that only one localnet port is 'active' on a single
> hv, I believe it should not be much trouble but perhaps I'm too optimistic
> :)
> 
> [0] https://imgur.com/a/0Tt9nvI

This diagram matches what I was thinking.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] [OVN] Logging IRC meetings

2020-03-06 Thread Daniel Alvarez Sanchez
Hi folks,

In OpenStack we use Meetbot [0] to log the IRC meetings and it'll generate
the minutes afterwards that we can send after the meeting to the ML index
them in the website (coming up!).

@Ben, as founder of the #openvswitch channel we can start straight away
using OpenStack Meetbot by following steps at [1]. I checked with
#openstack-infra folks and they're fine with #openvswitch logging the
meetings using the bot.

However, as OVS is an LF-supported project we could as well use [2]. I
don't really know how to tell the LF meetbot to join #ovn-meeting (or
#openvswitch) but looks like we need to open a ticket reading from what
OPNFV folks mention here [3]. In this case, I believe Ben/Justin might need
to do it?

Thanks a lot!
Daniel

[0] https://docs.openstack.org/infra/system-config/irc.html#meetbot
[1] https://docs.openstack.org/infra/system-config/irc.html#access
[2] https://docs.releng.linuxfoundation.org/en/latest/meetbot.html
[3]
https://lists.linuxfoundation.org/pipermail/opnfv-tech-discuss/2016-July/011759.html
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] [OVN] Support for QoS on Floating IP

2020-03-06 Thread Maciej Jozefczyk
Hey!

In Openstack Neutron we can configure QoS in a few different places:
1) QoS on port
2) QoS on Gateway (gateway port)
3) QoS on Floating IP

For both 1) and 2) we can easily define a qos row in QoS table and create
proper match action, like:

# ovn-nbctl list qos
_uuid   : 42aa1074-ad2e-4d3c-abf8-c2dceb1169f9
action  : {}
bandwidth   : {burst=3000, rate=3000}
direction   : from-lport
external_ids: {}
match   : "inport == \"015aa2ca-6d18-4d0e-96e5-91d44dc1a398\""
priority: 2002

That will be applied on OVS as a OpenFlow Meter.

For 3) - Is it possible to apply meter action on Floating IP?
By Floating IP I mean NAT with dnat_and_snap type, like:

# ovn-nbctl find NAT type=dnat_and_snat
_uuid   : faf6cba8-d923-4a80-a262-4346232cba2d
external_ip : "10.74.167.211"
external_mac: "fa:16:3e:94:8e:89"
logical_ip  : "192.168.1.6"
logical_port: "755413fa-fd8d-4e4f-bcdb-bd9e69b12268"
type: dnat_and_snat


There is use-case, when we want to shape traffic to/from provider_network,
but not in tenant network. We could define QoS for Gateway Chassis
Logical_Router_Port, but we want each VM to have his own N/S traffic
shaping.

Can we somehow combine meters with NATs?

Thanks,
Maciej




-- 
Best regards,
Maciej Józefczyk
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] [OVN] Multiple localnet ports on a single Logical Switch

2020-03-06 Thread Daniel Alvarez Sanchez
Thanks a lot for your answer, Ben.

On Thu, Mar 5, 2020 at 9:21 PM Ben Pfaff  wrote:

> On Wed, Mar 04, 2020 at 04:01:22PM +0100, Daniel Alvarez Sanchez wrote:
> > As a possible alternative, we could support multiple localnet ports on
> the
> > same Logical Switch. In the first place, we can assume that on a
> particular
> > hypervisor, we're not going to have ports bound to multiple segments (ie.
> > on hv1 only ports on segment1 will be present, on hv2 only ports on
> > segment2 will be present and so on...). This way, ovn-controller can
> create
> > the patch-port to the provider bridge based on the local bridge-mappings
> > configuration on each hypervisor and the rest of the localnet ports will
> > have no effect.
>
> I don't see a big problem with this.
>
> If you implement it, be sure to update the documentation, since there
> are multiple places that talk about LSes with localnet ports having only
> two LSPs total.
>

Right, I noticed this and it's a great point.

I drew this little diagram [0] to show graphically the idea behind my
suggestion.
The idea is not to have multiple mappings for the same LS on a given
hypervisor as that'd make things trickier I believe. In the diagram, we
would not expect to have hv1 having both 'segment1:br-ex, segment2:br-ex2'.
As long as CMS ensures that only one localnet port is 'active' on a single
hv, I believe it should not be much trouble but perhaps I'm too optimistic
:)

[0] https://imgur.com/a/0Tt9nvI
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] How to know lifetime of each matched flow?

2020-03-06 Thread Su Jinzhao
Hi, Guys:

I noticed that for each flow entry or meter, there are n_bytes, n_pkts,
duration field with the output of dump-flows or meter-stats command. I know
that the duration field for a flow entry is the time since it installed in
the switch.

BUT, how can I know when does each matched flow start and stop?

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


[ovs-discuss] [HELP] Question about Raft

2020-03-06 Thread txfh2007 via discuss
Hi Han && all:

I have a question about RAFT: I have tried the latest OVN-2.30, and have 
found in some condition, there is one node whose role is always "Candidate" 
(got by cluster/status cmd), but act as a Follower. My cluster still works 
well, but it seems odd that a server's role is always Candidate. As far as I 
know, server's role is normally Follower or Leader.
After digging into related code, I think I can try to describe how to 
reproduce this scenario:
1. It is three servers cluster: One Leader(S2), Two followers(S1,S3)
2. Try to disconnect Leader(S2) from other two servers,so S2 would add 
term and send vote request, and meanwhile S1 and S3 would choose a new 
Leader(Let's say it's S3)
3. Recover connection between S2 and other two nodes, then if S2 
receives append entry req from S3, as S3's term is lower, so S2 will reply 
"stale term"
4. After S3 gets S2's reply, S3 will change its term to S2's value and 
change its role to follower and then candidate(at the same time , S1/S2/S3 are 
all candidate role)
5.Then if S2 got S3's vote request and vote for S3, S3 will become new 
leader, but S2's role is still candidate

I guess The reason is term of S3's vote request is equal to S2's term, For 
S2, it will change to follower only if receiving vote request whose term value 
is larger than it own .
Am I right? and the candidate role(but actually is a follower) is 
reasonable ? 

Thanks 
Timo


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