Repository navigation
feat: Add EOF and TIMEOUT exception handling in SolConnection._deacti… - #49
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves robustness of SOL session teardown in SolConnection by retrying graceful deactivation when pexpect encounters TIMEOUT/EOF, and introducing a fallback cleanup path that finds and kills defunct/stopped ipmiutil processes. It adds unit tests to validate the retry and fallback behaviors.
Changes:
- Add retry loop and
TIMEOUT/EOFhandling toSolConnection._deactivate_sol_session. - Add
_kill_defunct_ipmiutil_processesfallback that parsespsoutput and kills stopped (STATstarts withT)ipmiutilprocesses. - Add unit tests covering successful deactivation, retry behavior, fallback invocation, and kill-path edge cases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
mfd_connect/sol.py |
Adds retryable SOL deactivation and a fallback cleanup routine to kill defunct/stopped ipmiutil processes. |
tests/unit/test_mfd_connect/test_sol.py |
Adds unit tests for the new deactivation retry logic and defunct-process kill fallback. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
DawidBerk
force-pushed
the
task_MFD_9170
branch
from
August 28, 2026 09:42
fd0fca4 to
ecf3054
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Suppressed comments (2)
mfd_connect/sol.py:429
sudo/killspawn failures (e.g., missingsudoin PATH,OSError, etc.) are not caught, which can leak raw exceptions instead of the expectedSolException.
except (pexpect.TIMEOUT, pexpect.EOF) as e:
mfd_connect/sol.py:404
- This cleanup currently kills any stopped (STAT starts with 'T')
ipmiutilprocess, regardless of whether it’s a SoL session. That can terminate unrelated ipmiutil usage on the controller host. Since the intent is to clean up defunct SoL sessions, scope the match toipmiutil sol ...lines.
pid, stat, command = columns[1], columns[7], columns[10]
if command.rsplit("/", 1)[-1] != self._ipmi_tool_name:
continue
if stat.startswith("T"):
defunct_pids.append(pid)
tjankows-itp
suggested changes
Sep 1, 2026
KarolinaPomian
approved these changes
Sep 3, 2026
DawidBerk
force-pushed
the
task_MFD_9170
branch
2 times, most recently
from
September 9, 2026 12:34
4c3baf6 to
94c1f8a
Compare
DawidBerk
force-pushed
the
task_MFD_9170
branch
from
September 9, 2026 12:59
94c1f8a to
054cc1a
Compare
tjankows-itp
approved these changes
Sep 10, 2026
mchromin
previously approved these changes
Sep 10, 2026
adrianlasota
requested changes
Sep 10, 2026
DawidBerk
force-pushed
the
task_MFD_9170
branch
3 times, most recently
from
September 16, 2026 15:37
3d5307a to
fd72bd8
Compare
adrianlasota
requested changes
Sep 17, 2026
…vate_sol_session Signed-off-by: Berk, Dawid <dawidx.berk@intel.com>
DawidBerk
force-pushed
the
task_MFD_9170
branch
from
September 21, 2026 10:58
fd72bd8 to
1feaf82
Compare
adrianlasota
approved these changes
Sep 21, 2026
mchromin
approved these changes
Sep 22, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…vate_sol_session