Without a logical_datapath, ovn-controller won't be able to tell which logical datapath a logical port belongs to, thus it won't be able to implement logical flows related to the logical port.
Signed-off-by: Ben Pfaff <b...@nicira.com> --- ovn/northd/ovn-northd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index be6430d..1680290 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -463,6 +463,13 @@ set_bindings(struct northd_context *ctx) } } + struct uuid logical_datapath; + if (lport->lswitch) { + logical_datapath = lport->lswitch->header_.uuid; + } else { + uuid_zero(&logical_datapath); + } + if (binding) { /* We found an existing binding for this logical port. Update its * contents. */ @@ -482,6 +489,10 @@ set_bindings(struct northd_context *ctx) if (!tags_equal(binding, lport)) { sbrec_bindings_set_tag(binding, lport->tag, lport->n_tag); } + if (!uuid_equals(&binding->logical_datapath, &logical_datapath)) { + sbrec_bindings_set_logical_datapath(binding, + logical_datapath); + } } else { /* There is no binding for this logical port, so create one. */ @@ -493,6 +504,8 @@ set_bindings(struct northd_context *ctx) sbrec_bindings_set_parent_port(binding, lport->parent_name); sbrec_bindings_set_tag(binding, lport->tag, lport->n_tag); } + + sbrec_bindings_set_logical_datapath(binding, logical_datapath); } } @@ -691,6 +704,7 @@ main(int argc, char *argv[]) ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_mac); ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_tag); ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_parent_port); + ovsdb_idl_add_column(ovnsb_idl, &sbrec_bindings_col_logical_datapath); ovsdb_idl_add_column(ovnsb_idl, &sbrec_pipeline_col_logical_datapath); ovsdb_idl_omit_alert(ovnsb_idl, &sbrec_pipeline_col_logical_datapath); ovsdb_idl_add_column(ovnsb_idl, &sbrec_pipeline_col_table_id); -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev