Skip to content

Add boots/smee container logs to support bundle #9683

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charles-large
Copy link
Member

@charles-large charles-large commented Apr 24, 2025

Issue #, if available:
#4179
Description of changes:
Smee logs now accessible in support-bundle

The following gets added to support bundle yaml following troubleshoot docs here

---
apiVersion: troubleshoot.sh/v1beta2
kind: HostCollector
metadata:
  creationTimestamp: null
  name: host-collector
spec:
  collectors:
  - run:
      args:
      - logs
      - boots
      collectorName: boots-logs
      command: docker
      outputDir: boots-logs

Creates a new nested directory at host-collectors/run-host

largchar@largchar-dev:~$ ls support-bundle-2025-04-24T04_37_28/host-collectors/run-host

Smee logs located here

largchar@largchar-dev:~$ ls support-bundle-2025-04-24T04_37_28/host-collectors/run-host/
boots-logs-info.json boots-logs.txt

Example content

boots-logs.txt

largchar@largchar-dev:~$ cat support-bundle-2025-04-24T04_37_28/host-collectors/run-host/boots-logs.txt
{"time":"2025-04-24T04:35:56.055793582Z","level":"INFO","source":{"function":"main.main","file":"cmd/smee/main.go","line":157},"msg":"starting","version":"0b77c7d"}
{"time":"2025-04-24T04:35:56.056328617Z","level":"INFO","source":{"function":"main.main","file":"cmd/smee/main.go","line":179},"msg":"starting syslog server","bind_addr":"10.80.8.110:514"}
{"time":"2025-04-24T04:35:56.056359636Z","level":"INFO","source":{"function":"main.main","file":"cmd/smee/main.go","line":209},"msg":"starting tftp server","bind_addr":"10.80.8.110:69"}
{"time":"2025-04-24T04:35:56.059453899Z","level":"INFO","source":{"function":"github.com/tinkerbell/ipxedust.(*Server).listenAndServeTFTP","file":"tinkerbell/[email protected]/ipxedust.go","line":201},"msg":"serving iPXE binaries via TFTP","service":"github.com/tinkerbell/smee","logger":"github.com/tinkerbell/ipxedust","addr":"10.80.8.110:69","blocksize":512,"timeout":5000000000,"singlePortEnabled":true}
{"time":"2025-04-24T04:35:56.071567685Z","level":"INFO","source":{"function":"main.main","file":"cmd/smee/main.go","line":291},"msg":"serving http","addr":"10.80.8.110:7171","trusted_proxies":null}
{"time":"2025-04-24T04:35:56.073374249Z","level":"INFO","source":{"function":"main.main","file":"cmd/smee/main.go","line":304},"msg":"starting dhcp server","bind_addr":"0.0.0.0:67"}
{"time":"2025-04-24T04:35:56.073565679Z","level":"INFO","source":{"function":"internal/dhcp/server.(*DHCP).Serve","file":"dhcp/server/dhcp.go","line":35},"msg":"Server listening on","addr":{"IP":"0.0.0.0","Port":67,"Zone":""}}

boots-logs-info.json

largchar@largchar-dev:~$ cat support-bundle-2025-04-24T04_37_28/host-collectors/run-host/boots-logs-info.json 
{"command":"/usr/bin/docker logs boots","exitCode":"0","error":"","outputDir":"","input":"","env":["PATH=/eks-a-tools/binary:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME=largchar-dev","HOME=/root","TS_OUTPUT_DIR=/tmp/boots-logs3949852056/boots-logs"]}

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from charles-large. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 24, 2025
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 85.93750% with 9 lines in your changes missing coverage. Please review.

Project coverage is 69.78%. Comparing base (37f16a8) to head (8c46f42).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pkg/diagnostics/diagnostic_bundle.go 79.54% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9683      +/-   ##
==========================================
+ Coverage   69.76%   69.78%   +0.02%     
==========================================
  Files         672      672              
  Lines       49616    49679      +63     
==========================================
+ Hits        34615    34669      +54     
- Misses      13224    13230       +6     
- Partials     1777     1780       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@charles-large charles-large force-pushed the smee-support-bundle branch 5 times, most recently from cd38606 to 806bac7 Compare April 24, 2025 18:03
if e.hostBundle == nil {
return false
}
return !reflect.DeepEqual(e.hostBundle.Spec, supportBundleSpec{})
Copy link
Member

@2ez4szliu 2ez4szliu Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The supportBundleSpec struct also has Analyzers field, what if the collector is not present but Analyzer is present? In this case it will still return True.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. Right now there are no analyzers that will get added to this hostBundle, but I suppose it could in the future. I'll find a better check here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made a change that makes it a lot more clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants