-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
port scan inactivity timeout #2060
port scan inactivity timeout #2060
Conversation
6fa5c83
to
0e25102
Compare
@arjclark @oliver-sanders please review. |
An off-piste review: can you print out the port number of connections that hang and timeout? It can be useful information (someone suspended a non-detached suite with Ctrl-Z ...) |
Review 1: seems fine to me and not too horrendous in terms of waiting time now when tested. @hjoliver's suggestion about printing hung ports sounds like it'd be useful |
I thought I have done this. However, on a revisit, the logic does not work for the |
1edd042
to
8f8b418
Compare
(Trying to get Travis CI to work with the new test. Please hold.) |
f070285
to
2ac5e09
Compare
Manage custom process pool instead of using `multiprocessing.Pool`. This allows the logic to terminate processes with hanging connecitons - about 10 seconds of inactivity. Report each `host:port` that times out or causes a process to hang. Also: * Child processes are used as workers. Each process runs a loop to receive messages from the main process to scan the next `host:port`. Previously, each process pool job scans all ports (in range) of a host. * Single UUID for all jobs. * Remove cylc 6.5 compatibility logic. Cylc 7 port scan does not work with cylc 6 suites any way. * Improve returned data structure.
2ac5e09
to
bb2ff88
Compare
@arjclark @oliver-sanders Travis CI now back in green. Please continue review. |
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.
Looks OK. Tested as solving the issue originally reported.
@arjclark If you're happy with the alterations I'll merge. |
@oliver-sanders - yup all good with me. |
Manage custom process pool instead of using
mutliprocess.Pool
.This allows the logic to terminate processes with hanging connections - about 10 seconds of inactivity.
Report each
host:port
that causes a process to hang or has timed out connection.Also:
Each worker runs a loop to receive messages from main process to scan the next
host:port
.Previously, each process pool job scans all ports (in range) of a host.
Cylc 7 port scan does not work with cylc 6 suites any way.