Skip to content
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

Better closing of SSH channel #3504

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Better closing of SSH channel #3504

merged 2 commits into from
Jul 3, 2024

Conversation

benclifford
Copy link
Collaborator

@benclifford benclifford commented Jul 2, 2024

This is paired with DFK behaviour introduced in PR #3503 which closes channels in the DFK.

This PR makes SSHChannel.close (soft) wait until its worker thread is shut down. This is initially driven by the desire for threads to be shut down before test cases end, but more generally is part of a goal of shutting everything down before the relevant close/cleanup operation completes.

"soft" in this sense means that after 30 seconds, a warning will be emitted, rather than hanging longer than that.

This PR modifies a test which does not use the DFK to also perform that shutdown - with parsl/tests/test_providers/test_local_provider.py, this reduces the number of threads remaining at the end of execution from 3 to 2.

Type of change

  • Code maintenance/cleanup

This is paired with DFK behaviour introduced in PR #3503 which closes channels
in the DFK. This PR modifies a test which does not use the DFK to also perform
that shutdown.

With test parsl/tests/test_providers/test_local_provider.py, this reduces the
number of threads remaining at the end of execution from 3 to 2.
@benclifford benclifford changed the title Close SSH channel after test Better closing of SSH channel Jul 2, 2024
benclifford added a commit that referenced this pull request Jul 2, 2024
This stops that thread being left still running over the end of the
test - which is needed in work in PR #3397 to ensure that no threads
are left running at the end of a test.

If that shutdown hangs, this test will now hang rather than leave the
thread behind.

Along with PR #3504, this eliminates any threads left behind after
parsl/tests/test_providers/test_local_provider.py
benclifford added a commit that referenced this pull request Jul 3, 2024
This stops that thread being left still running over the end of the
test - which is needed in work in PR #3397 to ensure that no threads
are left running at the end of a test.

If that shutdown hangs, this test will now hang rather than leave the
thread behind.

Along with PR #3504, this eliminates any threads left behind after
parsl/tests/test_providers/test_local_provider.py
@benclifford benclifford merged commit 2828ac5 into master Jul 3, 2024
7 checks passed
@benclifford benclifford deleted the benc-ssh-close-in-test branch July 3, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants