Bug 2074019 - [ovn-controller] nb_cfg value over a certain value causes erroneous update to SB DB
Summary: [ovn-controller] nb_cfg value over a certain value causes erroneous update to...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn22.03
Version: FDP 22.L
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Ales Musil
QA Contact: Ehsan Elahi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-11 11:51 UTC by Martin Kennelly
Modified: 2023-07-31 13:56 UTC (History)
6 users (show)

Fixed In Version: ovn22.03-22.03.0-220.el8fdp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-1888 0 None None None 2022-04-11 12:05:36 UTC

Description Martin Kennelly 2022-04-11 11:51:04 UTC
Description of problem:
I have noticed a value over 32 bits of information to nb_cfg field in NB DB NB_Global table causes unexpected behaviour from ovn-controller.

Version-Release number of selected component (if applicable):
ovn-nbctl 21.06.1
Open vSwitch Library 2.15.90
DB Schema 5.32.0

How reproducible:
Always


Steps to Reproduce:
1. Deploy ovsdb-monitor and start to monitor OVN_Southbound or OVN_Northbound.
2. ovn-nbctl set NB_Global . nb_cfg=4294967297
3. Each chassis_private's nb_cfg field gets set to 1 and shortly after to the correct value 4294967297. Hv_cfg field gets set to 1 and shortly after to the correct value 4294967297.

Actual results:
Two updates are sent to SB DB to the ovn-controllers respective chassis_private table row.

Expected results:
I should be able to add information up to 64 bits signed to nb_cfg.
Ovn-controllers should only update SB DBs table chassis_private nb_cfg field once per update of nb_cfg field in NB DBs NB_Global table.

This is impacting a PR for me as I depend on knowing what value was previously set.

Additional info:

Comment 4 OVN Bot 2023-07-18 04:08:34 UTC
ovn23.06 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223475
ovn23.06 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223476
ovn23.03 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223478
ovn23.03 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223479
ovn22.12 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223480
ovn22.12 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223481
ovn22.09 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223482
ovn22.09 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223483
ovn22.06 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223484
ovn22.06 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223485
ovn22.03 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2223486

Comment 7 Ehsan Elahi 2023-07-31 13:56:12 UTC
Reproduced on: 

ovn22.03-22.03.0-219.el8fdp.x86_64
ovn22.03-host-22.03.0-219.el8fdp.x86_64
ovn22.03-central-22.03.0-219.el8fdp.x86_64
openvswitch2.17-2.17.0-108.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-31.el8fdp.noarch

[root@....] # ovn-nbctl set NB_Global . nb_cfg=4294967297
[root@....] # ovsdb-tool show-log -mmm /var/lib/ovn/ovnnb_db.db
---------
database records trimmed 
---------
record 7: 2023-07-31 13:40:18.205 "ovn-northd"
  table NB_Global row 651e010c (651e010c) diff:
    hv_cfg=1
    hv_cfg_timestamp=1690810818204

record 8: 2023-07-31 13:40:18.205 "ovn-northd"
  table NB_Global row 651e010c (651e010c) diff:
    hv_cfg=4294967297
    hv_cfg_timestamp=1690810818205

<====== 2 separate records are added as mentioned in the BZ description. 


Verified on:

ovn22.03-22.03.0-220.el8fdp.x86_64
ovn22.03-host-22.03.0-220.el8fdp.x86_64
ovn22.03-central-22.03.0-220.el8fdp.x86_64
openvswitch2.17-2.17.0-108.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-31.el8fdp.noarch


[root@....] # ovn-nbctl set NB_Global . nb_cfg=4294967297
[root@....] # ovsdb-tool show-log -mmm /var/lib/ovn/ovnnb_db.db
---------
database records trimmed 
---------
record 7: 2023-07-31 13:48:54.220 "ovn-northd"
  table NB_Global row 66d21016 (66d21016) diff:
    hv_cfg=4294967297
    hv_cfg_timestamp=1690811334220


<========= Only single record added


Note You need to log in before you can comment on or make changes to this bug.