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

Enhance DPU Tools with Better Minicom Handling, Connectivity Checks, and Runtime Access Improvements #26

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

SamD2021
Copy link
Contributor

  • Added a context manager to minicom.py to manage Minicom configurations cleanly, improving usage in non-containerized environments.
  • Updated the Dockerfile to include ping support, enabling connectivity checks within the container.
  • Implemented a simple connectivity check function in common_ipu.py to verify IPU reachability before attempting Minicom access.
  • Enhanced fwutils.py to reduce unnecessary Minicom usage, optimizing runtime access by checking connectivity first.
  • Fixed keyword matching in minicom_get_version for broader firmware compatibility.

For this tool to be used both as a non-containerized and containerized
environments, we should make it easy to clean up the function by
deferring a clean up action. In go we have the `defer` keyword that
would do this but a way to do it in python is to make
`configure_minicom` a context manager and call it using the `with`
keyword
Centos stream9 doesn't seem to ship `ping` in its base image, so we add
it by installing `iputils` to the Dockerfile.
We should have a simple way to check connectivity to a dpu by pinging
its address. This function could be used in the IPU Runtime Access step
to not to attempt running minicom if it already can stablish a
connection with the dpu therefore avoiding cases where the runtime
access has already been granted which minicom may not know how to handle
properly.
When we use minicom to get the version of the firmware for the imc, it
looks for some keywords that aren't shared by all the versions, causing
exceptions to occur.
We should avoid minicom as much as possible as it can be hard to predict
all the edge cases needed to successfully perform what we have in mind.
In the IPU Runtime Access step it would mean we should first check if it
can connect to it properly, then if not, try the more "manual" method.
@SamD2021 SamD2021 changed the title Enhance DPU Tools with Minicom Management, Connectivity Checks, and Runtime Access Improvements Enhance DPU Tools with Better Minicom Handling, Connectivity Checks, and Runtime Access Improvements Oct 29, 2024
@bn222 bn222 merged commit e0cb598 into bn222:main Oct 30, 2024
1 check passed
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