[ovs-dev] [PATCH] bridge:The retry function does not work.
XiaoXiong Ding
dingxiaoxiong at huawei.com
Mon Dec 7 02:15:33 UTC 2020
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 at huawei.com>
---
vswitchd/bridge.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
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());
--
2.14.1.windows.1
More information about the dev
mailing list