You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
K8SPSMDB-1504 Fix MongoDB Connection Leaks in PBM Operations (#2098)
* fix con
* fix lint and add test
* log pbm connection closing error & improve error message in e2e test
* uniform error messages for e2e test
---------
Co-authored-by: George Kechagias <[email protected]>
conn_count=$(run_mongo 'db.serverStatus().connections.current'"clusterAdmin:clusterAdmin123456@$cluster.$namespace"| egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|bye')
78
78
if [ ${conn_count}-gt${max_conn} ];then
79
+
echo"error: connection count (${conn_count}) exceeds maximum allowed (${max_conn})"
conn_count=$(run_mongo 'db.serverStatus().connections.current'"clusterAdmin:clusterAdmin123456@$cluster2.$namespace"| egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|bye')
121
+
if [ ${conn_count}-gt${max_conn} ];then
122
+
echo"error: connection count (${conn_count}) exceeds maximum allowed (${max_conn}) with backup enabled"
123
+
exit 1
124
+
fi
125
+
115
126
desc 'check if mongod log files exist in pod'
116
127
log_files=$(kubectl exec"${cluster2}-0" -c "mongod" -- ls "/data/db/logs"2>/dev/null)
0 commit comments