diff mbox series

[ovs-dev] bridge:The retry function does not work.

Message ID 20201214013654.214108-1-dingxiaoxiong@huawei.com
State Deferred
Headers show
Series [ovs-dev] bridge:The retry function does not work. | expand

Commit Message

XiaoXiong Ding Dec. 14, 2020, 1:36 a.m. UTC
The value of status_txn_try_again is set to true after bridge_reconfigure. It is expected that the system will try again later. However, run_status_update will Check status_txn. if status_txn is not null, the logic for re-applying for the transition is skipped and submit the status_txn again. If this operation is successful, set status_txn_try_again to false. As a result, the status_txn_try_again flag do not work and the results in bridge_reconfigure cannot be synchronized to the database, and the data in the database remains unchanged.
The Solution is If status_txn_try_again is set to true, submit the previous status_txn firstly. Give up even it is success or not. This ensures that the retry logic can always be executed.

Fixes: 15c9fbd8f28f ("bridge: Make ovs-vswitchd run again if status_txn commit fails.")
Signed-off-by: XiaoXiong Ding <dingxiaoxiong@huawei.com>
---
 vswitchd/bridge.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Simon Horman Oct. 5, 2023, 8:51 a.m. UTC | #1
On Mon, Dec 14, 2020 at 09:36:54AM +0800, XiaoXiong Ding wrote:
> The value of status_txn_try_again is set to true after bridge_reconfigure. It is expected that the system will try again later. However, run_status_update will Check status_txn. if status_txn is not null, the logic for re-applying for the transition is skipped and submit the status_txn again. If this operation is successful, set status_txn_try_again to false. As a result, the status_txn_try_again flag do not work and the results in bridge_reconfigure cannot be synchronized to the database, and the data in the database remains unchanged.
> The Solution is If status_txn_try_again is set to true, submit the previous status_txn firstly. Give up even it is success or not. This ensures that the retry logic can always be executed.
> 
> Fixes: 15c9fbd8f28f ("bridge: Make ovs-vswitchd run again if status_txn commit fails.")
> Signed-off-by: XiaoXiong Ding <dingxiaoxiong@huawei.com>

Hi XiaoXiong Ding,

This patch appears to have gone stale in patchwork, for one reason or
another. If it is still relevant then I think it needs to be revisited,
by being reposted after appropriate preparation.

As such I'm marking this patch as "Deferred" in patchwork.

No action is required unless there is a desire to revisit this patch.
diff mbox series

Patch

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 2976771ae..c2c17a10d 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2854,9 +2854,12 @@  stats_update_wait(void)
 static void
 run_status_update(void)
 {
-    if (!status_txn) {
+    if (!status_txn || status_txn_try_again) {
         uint64_t seq;
-
+        if (status_txn) {
+            ovsdb_idl_txn_commit(status_txn);
+            ovsdb_idl_txn_destroy(status_txn);
+        }
         /* Rate limit the update.  Do not start a new update if the
          * previous one is not done. */
         seq = seq_read(connectivity_seq_get());