Open mangelajo opened 3 years ago
We are finding this on submariner, because we use ovn-nbctl from fedora which is newer than the ovn-kubernetes image. But will suffer of the same issue if somebody uses upstream submariner with openshift's ovn-kubernetes, for example.
ovn-nbctl is part of ovn common package and ovn-nb.ovsschema/ovn-sb.ovsschema are part of ovn-central package.
Is it not possible to make sure the same version is used ?
I don't think we have the support in C IDL helper functions (which ovn-nbctl uses) to check if a column is part of the schema or not.
A simple work around is to use ovn-nbctl create command instead of using ovn-nbctl lr-policy-add
Like
ovn-nbctl -- --id=@lrp create Logical_Router_Policy \ match="ip4.dst == 100.2.0.0/16" priority=20000 action=reroute nexthop=169.254.254.1 -- add Logical_Router \ ovn_cluster_router policies @lrp
ovn-nbctl is part of ovn common package and ovn-nb.ovsschema/ovn-sb.ovsschema are part of ovn-central package.
Is it not possible to make sure the same version is used ?
Not really, since ovn-kubernetes will be built with a base image we don't know... it could be upstream ovn-kubernetes, or it could be openshift-sdn, or they could be in the process of upgrading the database, etc...
I don't think we have the support in C IDL helper functions (which ovn-nbctl uses) to check if a column is part of the schema or not.
Ack, If you had that you could make ovn-nbctl compatible with version-1, instead of version+1 like now, which is weird :-)
A simple work around is to use ovn-nbctl create command instead of using ovn-nbctl lr-policy-add
Like
ovn-nbctl -- --id=@lrp create Logical_Router_Policy match="ip4.dst == 100.2.0.0/16" priority=20000 action=reroute nexthop=169.254.254.1 -- add Logical_Router ovn_cluster_router policies @lrp
+1 That will help I hadn't thought of that option :-) thank you.
Would it be possible for ovn-nbctl to detect the DB schema in runtime and use nexthop instead?
@numansiddique ^ ;-)