-
Notifications
You must be signed in to change notification settings - Fork 4
🌱 Add a tool to collect cloud-init logs #48
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
Conversation
49e2408 to
aa983a1
Compare
|
/cc @tuminoid @kashifest |
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.
Pull request overview
This PR introduces a new cloud-init log collection tool designed to fetch cloud-init status and logs from BareMetal hosts via SSH. The tool is containerized for easy deployment and integrated into the CI/CD pipeline for automated builds. It addresses the need to monitor and debug cloud-init bootstrapping processes on Metal3 nodes.
Key Changes:
- Python script implementing SSH-based log collection with configurable targets and commands
- Containerized deployment with Alpine-based Docker image
- GitHub Actions workflow integration for automated container image builds
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 17 comments.
| File | Description |
|---|---|
| cloud-init-tool/main.py | Core Python script implementing SSH log collection, environment variable parsing, and bootstrap status checking |
| cloud-init-tool/README.md | Documentation covering usage, configuration, and exit status behavior |
| cloud-init-tool/Dockerfile | Alpine-based container definition with OpenSSH and Python3 dependencies |
| .github/workflows/build-images-action.yml | CI/CD workflow addition to build and push the cloud-init-tool container image |
Comments suppressed due to low confidence (1)
cloud-init-tool/main.py:68
- File is opened but is not closed.
f = open(file, "w", encoding="utf-8")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I will check back the copilot review comments when I manage time. Meanwhile feel free to react to those you feel are ok to address |
|
Some are valid, some are too nit-picky. I commented on those I felt need to comment, the rest is more or less cleanup or code quality things. |
aa983a1 to
8b57e01
Compare
|
/approve |
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.
/approve
Thanks for contributing this tool, I think it will help a lot with debugging. 🌟
tuminoid
left a comment
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.
This needs rebase. It is missing the new signing stuff.
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tuminoid
left a comment
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.
Some typo fix proposals from bot and rebase + sbom/signing enable from me.
Signed-off-by: Nuutti Hakala <[email protected]>
8b57e01 to
5668dad
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kashifest, Rozzii The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2 similar comments
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kashifest, Rozzii The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kashifest, Rozzii The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
tuminoid
left a comment
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.
/lgtm
This PR adds a python script with a Dockerfile which can be primarily used to collect cloud-init logs but also something else if needed. This PR also adds this container to the workflow to be automatically build, so that it can be included in other workflows.
This tool can be used to fetch cloud-init status as requested here metal3-io/metal3-dev-env#955