-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MON-48766-community-pr-fix-file-descriptors-leak-in-gorgone-that-occu…
…r-when-pollers-are-disconnected (#1512) fix(gorgone): fd leak TODO : we need to change the gha to launch this test only on develop, and if possible execute it nighty Co-authored-by: garnier-quentin <[email protected]> Co-authored-by: qgarnier <[email protected]>
- Loading branch information
1 parent
299de12
commit 6258e6d
Showing
12 changed files
with
95 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -552,4 +552,6 @@ sub close { | |
$self->disconnect(); | ||
} | ||
|
||
sub cleanup {} | ||
|
||
1; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
*** Settings *** | ||
Documentation check Gorgone don't leak file descriptor when a poller become unavailable | ||
Resource ${CURDIR}${/}..${/}..${/}resources${/}import.resource | ||
Test Timeout 1200s | ||
|
||
*** Test Cases *** | ||
check gorgone proxy do not leak file descriptor with a poller | ||
[Tags] long_tests | ||
[Teardown] Stop Gorgone And Remove Gorgone Config push_zmq_gorgone_central sql_file=${ROOT_CONFIG}db_delete_poller.sql | ||
${cmd_count_file_descriptor}= Set Variable count=0; for pid in \$(ps aux | grep gorgone-proxy | grep -v grep | awk '{ print \$2 }') ; do num=\$(lsof | grep \$pid | wc -l); count=\$((count + \$num)) ; done ; echo \$count | ||
|
||
Log To Console \nStarting the gorgone setup | ||
Setup Two Gorgone Instances communication_mode=push_zmq central_name=push_zmq_gorgone_central poller_name=push_zmq_gorgone_poller_2 | ||
# We wait for gorgone to be ready, and grab all file descriptor it need. | ||
Sleep 10 | ||
${before_kill_fd_nb} Run ${cmd_count_file_descriptor} | ||
Stop Gorgone And Remove Gorgone Config push_zmq_gorgone_poller_2 | ||
Sleep 10 | ||
# check what is the normal number of file descriptor for gorgone to take | ||
${initial_fd_nb} Run ${cmd_count_file_descriptor} | ||
Log To Console \n number of file descriptor on before killing poller : ${before_kill_fd_nb} and after : ${initial_fd_nb} \n | ||
${max}= Evaluate ${initial_fd_nb} + 15 | ||
Log To Console max is ${max} | ||
Sleep 20 | ||
FOR ${i} IN RANGE 60 | ||
${current_fd_nb} Run ${cmd_count_file_descriptor} | ||
IF ${i} % 10 == 0 | ||
Log To Console exec ${i} \t got ${current_fd_nb} | ||
END | ||
Should Be True ${max} > ${current_fd_nb} gorgone is using more and more file descriptor after a poller disconnect, starting at ${initial_fd_nb} and after ${i} iteration (5 sec each) to ${current_fd_nb} | ||
Sleep 5 | ||
END |
6258e6d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Failed Tests
Hostgroups