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:
I didn't look too much into this but I suspect it's related to the mismatch between uint64_t and int64_t in ovn-controller, e.g.: In ofctrl-seqno: https://github.com/ovn-org/ovn/blob/b22684d4e37c3dd205a959925b6e3f1827bbe045/controller/ofctrl-seqno.h#L28 In ovn-controller.c: https://github.com/ovn-org/ovn/blob/b22684d4e37c3dd205a959925b6e3f1827bbe045/controller/ovn-controller.c#L870 https://github.com/ovn-org/ovn/blob/b22684d4e37c3dd205a959925b6e3f1827bbe045/controller/ovn-controller.c#L887
Patch posted: https://patchwork.ozlabs.org/project/ovn/patch/20230713082335.386633-1-amusil@redhat.com/
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
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
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (ovn22.03 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:4682