Page MenuHomeVyOS Platform

Bug in weight calculation for failover mode
Open, Requires assessmentPublicBUG

Description

Possible fix for correction:

diff --git a/src/lbdecision.cc b/src/lbdecision.cc
index a5c334e..2005585 100644
--- a/src/lbdecision.cc
+++ b/src/lbdecision.cc
@@ -572,9 +572,11 @@ LBDecision::get_new_weights(LBData &data, LBRule &rule)
 	    w_iter->second = 0.; //zero out previous weight
 	    ++w_iter;
 	  }
+	  weights.insert(pair<string,float>(iter->first,iter->second));
+	  group = iter->second;
+	} else {
+	  weights.insert(pair<string,float>(iter->first,0.));
 	}
-	weights.insert(pair<string,float>(iter->first,iter->second));
-	group = iter->second;
       }
       else {
 	weights.insert(pair<string,float>(iter->first,0.));

Details

Difficulty level
Normal (likely a few hours)
Version
1.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

@banditos13 Can you describe more details?
What is the bug and how to reproduce it?

In failover mode only one active channel with "best parameters" can be used for connections

@banditos13 can you send a link to the file, which you suggest to fix, or create PR?

Вячеслав @Viacheslav, я не понял вопроса...
В шапке таска лежит рабочий патч

erkin renamed this task from Bug in weigt calculation for failover mode to Bug in weight calculation for failover mode.Sun, Aug 29, 1:06 PM
erkin set Issue type to Bug (incorrect behavior).
erkin removed a subscriber: Active contributors.