[ovs-dev,2/3] ovn-controller: Fix a case wherein tag can be zero.
diff mbox

Message ID 20150929190627.GM30384@nicira.com
State Not Applicable
Headers show

Commit Message

Ben Pfaff Sept. 29, 2015, 7:06 p.m. UTC
On Tue, Sep 29, 2015 at 10:34:06AM -0700, Gurucharan Shetty wrote:
> If the ovn-nb DB's logical_port table is populated such
> that tag is zero, we should not consider that record.
> 
> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>

I thought that the intention was that tag=0 was for "control" traffic
into the VM, for managing the containers.

If tag=0 should be invalid then we should disallow it in the schema:

Comments

Gurucharan Shetty Sept. 29, 2015, 8:30 p.m. UTC | #1
On Tue, Sep 29, 2015 at 12:06 PM, Ben Pfaff <blp@nicira.com> wrote:
> On Tue, Sep 29, 2015 at 10:34:06AM -0700, Gurucharan Shetty wrote:
>> If the ovn-nb DB's logical_port table is populated such
>> that tag is zero, we should not consider that record.
>>
>> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
>
> I thought that the intention was that tag=0 was for "control" traffic
> into the VM, for managing the containers.

For the "control" traffic, there will be no parent_port specified and
it will be just regular VM traffic. So I think we can change the
schema to include 1 as the minimum value. I will send a patch (the
original commit already got applied. So I will send a revert).

>
> If tag=0 should be invalid then we should disallow it in the schema:
>
> diff --git a/ovn/ovn-sb.ovsschema b/ovn/ovn-sb.ovsschema
> index 1ffd1b4..7f857ed 100644
> --- a/ovn/ovn-sb.ovsschema
> +++ b/ovn/ovn-sb.ovsschema
> @@ -86,7 +86,7 @@
>                  "parent_port": {"type": {"key": "string", "min": 0, "max": 1}},
>                  "tag": {
>                       "type": {"key": {"type": "integer",
> -                                      "minInteger": 0,
> +                                      "minInteger": 1,
>                                        "maxInteger": 4095},
>                                "min": 0, "max": 1}},
>                  "chassis": {"type": {"key": {"type": "uuid",
Ben Pfaff Sept. 29, 2015, 11:29 p.m. UTC | #2
On Tue, Sep 29, 2015 at 01:30:49PM -0700, Gurucharan Shetty wrote:
> On Tue, Sep 29, 2015 at 12:06 PM, Ben Pfaff <blp@nicira.com> wrote:
> > On Tue, Sep 29, 2015 at 10:34:06AM -0700, Gurucharan Shetty wrote:
> >> If the ovn-nb DB's logical_port table is populated such
> >> that tag is zero, we should not consider that record.
> >>
> >> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
> >
> > I thought that the intention was that tag=0 was for "control" traffic
> > into the VM, for managing the containers.
> 
> For the "control" traffic, there will be no parent_port specified and
> it will be just regular VM traffic. So I think we can change the
> schema to include 1 as the minimum value. I will send a patch (the
> original commit already got applied. So I will send a revert).

OK.

Patch
diff mbox

diff --git a/ovn/ovn-sb.ovsschema b/ovn/ovn-sb.ovsschema
index 1ffd1b4..7f857ed 100644
--- a/ovn/ovn-sb.ovsschema
+++ b/ovn/ovn-sb.ovsschema
@@ -86,7 +86,7 @@ 
                 "parent_port": {"type": {"key": "string", "min": 0, "max": 1}},
                 "tag": {
                      "type": {"key": {"type": "integer",
-                                      "minInteger": 0,
+                                      "minInteger": 1,
                                       "maxInteger": 4095},
                               "min": 0, "max": 1}},
                 "chassis": {"type": {"key": {"type": "uuid",