Skip to content

services: Don't try to list/cleanup templates when OVN doesn't suppor…#3523

Merged
trozet merged 1 commit into
ovn-kubernetes:masterfrom
dceara:fix-no-template-support
Apr 7, 2023
Merged

services: Don't try to list/cleanup templates when OVN doesn't suppor…#3523
trozet merged 1 commit into
ovn-kubernetes:masterfrom
dceara:fix-no-template-support

Conversation

@dceara
Copy link
Copy Markdown
Collaborator

@dceara dceara commented Apr 6, 2023

…t that.

Spotted in upstream ovn-org/ovn CI when running against ovn versions <=22.09 which don't support component templates:

https://github.com/ovn-org/ovn/actions/runs/4628617882

Reported error:
failed to sync chassis: error: failed to get template var list: error:
Wrong parameter type (*nbdb.ChassisTemplateVar): Model not found in
Database Model

Fixes: 4b3475a ("services: Use OVN template load balancers for NodePort services.")

@dceara
Copy link
Copy Markdown
Collaborator Author

dceara commented Apr 6, 2023

FYI @tssurya @flavio-fernandes @trozet this still fails because libovsdb refuses to connect to an old database (that doesn't contain the chassis_template_var table). I thought libovsdb was enhanced to support that, do you know what happened?

E0406 15:45:54.400748      56 ovnkube.go:369] error when trying to initialize libovsdb NB client: failed to connect to tcp:10.89.0.104:6641: database OVN_Northbound validation error (3): database model contains a model for table Chassis_Template_Var that does not exist in schema. Mapper Error. Object type nbdb.LogicalSwitchPort contains field MirrorRules ([]string) ovs tag mirror_rules: Column does not exist in schema. database model contains a model for table Mirror that does not exist in schema

@flavio-fernandes
Copy link
Copy Markdown
Contributor

heh, I wonder if you need this PR merged first:
#3507

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 6, 2023

Coverage Status

Coverage: 52.876% (-0.03%) from 52.905% when pulling 2a89def on dceara:fix-no-template-support into 0254d0f on ovn-org:master.

@dceara
Copy link
Copy Markdown
Collaborator Author

dceara commented Apr 6, 2023

heh, I wonder if you need this PR merged first: #3507

@flavio-fernandes I don't know. Does that enable support to connect to a database that has an older schema (missing some tables) compared to the schema that was used to generate the model?

Comment thread go-controller/pkg/ovn/master.go Outdated
…t that.

Spotted in upstream ovn-org/ovn CI when running against ovn versions
<=22.09 which don't support component templates:

https://github.com/ovn-org/ovn/actions/runs/4628617882

Reported error:
  failed to sync chassis: error: failed to get template var list: error:
  Wrong parameter type (*nbdb.ChassisTemplateVar): Model not found in
  Database Model

Fixes: 4b3475a ("services: Use OVN template load balancers for NodePort services.")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
@dceara dceara force-pushed the fix-no-template-support branch from 2457287 to 2a89def Compare April 6, 2023 19:03
@flavio-fernandes
Copy link
Copy Markdown
Contributor

/lgtm

@dceara
Copy link
Copy Markdown
Collaborator Author

dceara commented Apr 6, 2023

FYI @tssurya @flavio-fernandes @trozet this still fails because libovsdb refuses to connect to an old database (that doesn't contain the chassis_template_var table). I thought libovsdb was enhanced to support that, do you know what happened?

E0406 15:45:54.400748      56 ovnkube.go:369] error when trying to initialize libovsdb NB client: failed to connect to tcp:10.89.0.104:6641: database OVN_Northbound validation error (3): database model contains a model for table Chassis_Template_Var that does not exist in schema. Mapper Error. Object type nbdb.LogicalSwitchPort contains field MirrorRules ([]string) ovs tag mirror_rules: Column does not exist in schema. database model contains a model for table Mirror that does not exist in schema

In a private discussion @trozet pointed out that "older libovsdb should be able to connect to newer OVN schema". So that explains why i'm getting the above when trying to run against ovn 22.09.

Assuming that in the future libovsdb will be able "to connect to older OVN schema", the PR is still needed. If not, we might as well remove the useTemplate/svcTemplateSupport variables all together as they don't really make much sense.

@dceara
Copy link
Copy Markdown
Collaborator Author

dceara commented Apr 7, 2023

Known CI failure: [Fail] Load Balancer Service Tests with MetalLB [It] Should ensure load balancer service works with 0 node ports when ETP=local

@dceara
Copy link
Copy Markdown
Collaborator Author

dceara commented Apr 7, 2023

/retest-failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants