Commit 2eb61e9
chore: Import containerdebug (#1233)
* Initial commit
* Add example
* Update dependencies and log user executing the current program
* Add loop mode
Fixes #7
* Fix clippy warnings
* Rename --loop-interval to --loop
* Log on run start/end
Fixes #4
* Add file output option
Fixes #5
* Split SystemInformation into modules, add logging
Fixes #6
* Switch to operator-rs' logging
* Remove duration brackets
* Add CI and github config (#12)
* Add CI and github config
Mostly copied from operator-rs. Would be nice to have this managed by
operator-templating, but that depends on
stackabletech/operator-templating#80.
* Import pre-commit and cargo deny config as well
* pre-commit
* Update cargo-deny to v2.0.4
* Update dependencies
* Update deny.toml from op-rs
* Update .github/workflows/build.yml
Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com>
---------
Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com>
* Drop unmaintained users dependency (#13)
* Add CI and github config
Mostly copied from operator-rs. Would be nice to have this managed by
operator-templating, but that depends on
stackabletech/operator-templating#80.
* Import pre-commit and cargo deny config as well
* pre-commit
* Drop unmaintained users dependency
It's unmaintained, has open vulnerabilities, and is redundant with
sysinfo which we already use.
* Update cargo-deny to v2.0.4
* Update dependencies
* Update deny.toml from op-rs
* Release v0.1.0 (#14)
* Wrap all output in a containerdebug span (#18)
* Wrap all output in a containerdebug span
* Changelog
* Downgrade DNS errors to warnings (#17)
* Downgrade DNS errors to warnings
* Changelog
* Cache sysinfo data, and only query for the data we actually use (#20)
* Cache sysinfo data, and only query for the data we actually use
* Changelog
* Release v0.1.1 (#22)
* Increase default interval from minutely to half-hourly (#23)
* Increase default interval from minutely to half-hourly
* Changelog
* Update documentation a bit (#24)
* Update documentation a bit
* Formatting
* Linebreaks
* Reformat example output as code block
* chore: Bump sysinfo to 0.33; cargo update (#27)
* cargo update
* Bump sysinfo 0.32 -> 0.33
* Various updates (#45)
* Various updates
- Dependency updates
- Log open files limit
- Reduce logging at info slightly
- Add rust-toolchain.toml
- Fix pre-commit warnings
* Various updates
- Dep updates
- Rust toolchain update
- PR template update
* rustfmt
* Update dependencies
* Update operator-rs
* Update dependencies
* better telemetry integration
* rustfmt
* rustfmt
* use our version of cargo-udeps
* pre-commit
* pre-commit
* add markdownlint config
* add markdownlint & yamllint config
* md lint
* address review comment
* fix: Replace long running span with short lived spans (#46)
* fix: Replace long running span with short lived spans
* chore: replace print_startup_string with print_startup_string
Note: this has the added benefit of displaying the correct tracing target (or call-site), instead of displaying stackable_operator
* chore: Update changelog
* Release v0.2.0 (#47)
* chore: Bump Rust dependencies and Rust version (#52)
* chore: Bump Rust dependencies and Rust version
* bump Rust
* Bump cargo-deny
* Use op-rs 0.107.0
* changelog
* chore: Release 0.3.0 (#53)
* fix: Code review bug fixes and cleanup (#55)
* fix: Log GID instead of UID in user GID tracing field
The tracing statement for `user.gid` was reading from `user.uid`
instead of `user.gid`, causing the wrong value to be reported.
* refactor: Use idiomatic empty check for disk collection
Replace `into_iter().next().is_none()` with `list().is_empty()`
for clarity, and use `list().iter()` for the actual collection.
* fix: Remove stale .source() call with unused result
This was likely a debugging leftover — the error source chain is
already captured via the `successors` iterator below.
* fix: Fix typo "proess" -> "process" in error message
* fix: Replace unwrap() calls with error logging in collection loop
JSON serialization and file write can fail at runtime (e.g. disk
full). Log the error and continue the loop instead of crashing,
since this tool may run continuously for hours.
* fix: Use tokio::time::sleep instead of std::thread::sleep
std::thread::sleep blocks the entire tokio worker thread.
Since main is already async, use the non-blocking alternative.
* fix: Handle DNS resolver initialization failure gracefully
In a container debugging tool, broken DNS config (/etc/resolv.conf)
is a likely scenario to diagnose. Log the error and skip DNS lookups
instead of panicking.
* fix: Wrap network collector in ComponentResult for consistent error handling
The network collector silently swallowed interface listing errors by
returning empty data. Now it returns Result so the orchestrator wraps
it in ComponentResult, matching the pattern used by other fallible
collectors. Errors appear in JSON output instead of being silently
lost.
* refactor: Use BTreeMap for deterministic JSON key ordering
HashMap produces non-deterministic JSON output, making it hard to
diff containerdebug output across runs. BTreeMap sorts keys
consistently.
* fix: Bump rustls-webpki to 0.103.10 to negate RUSTSEC-2026-0049
* chore: Remove undetected, ignored advisories
---------
Co-authored-by: Techassi <git@techassi.dev>
* fix: Don't log ANSI escape sequences if stdout is a file (#59)
* fix: Don't log ANSI escape sequences if stdout is a file
* chore: Add changelog entry
* feat: Report open file descriptor count (#58)
Read /proc/self/fd to report the actual number of open file
descriptors alongside the existing limit. Comparing usage vs limit
helps diagnose "too many open files" errors.
* feat: Add disk usage percentage and warn on high usage (#57)
* fix: Log GID instead of UID in user GID tracing field
The tracing statement for `user.gid` was reading from `user.uid`
instead of `user.gid`, causing the wrong value to be reported.
* refactor: Use idiomatic empty check for disk collection
Replace `into_iter().next().is_none()` with `list().is_empty()`
for clarity, and use `list().iter()` for the actual collection.
* fix: Remove stale .source() call with unused result
This was likely a debugging leftover — the error source chain is
already captured via the `successors` iterator below.
* fix: Fix typo "proess" -> "process" in error message
* fix: Replace unwrap() calls with error logging in collection loop
JSON serialization and file write can fail at runtime (e.g. disk
full). Log the error and continue the loop instead of crashing,
since this tool may run continuously for hours.
* fix: Use tokio::time::sleep instead of std::thread::sleep
std::thread::sleep blocks the entire tokio worker thread.
Since main is already async, use the non-blocking alternative.
* fix: Handle DNS resolver initialization failure gracefully
In a container debugging tool, broken DNS config (/etc/resolv.conf)
is a likely scenario to diagnose. Log the error and skip DNS lookups
instead of panicking.
* fix: Wrap network collector in ComponentResult for consistent error handling
The network collector silently swallowed interface listing errors by
returning empty data. Now it returns Result so the orchestrator wraps
it in ComponentResult, matching the pattern used by other fallible
collectors. Errors appear in JSON output instead of being silently
lost.
* refactor: Use BTreeMap for deterministic JSON key ordering
HashMap produces non-deterministic JSON output, making it hard to
diff containerdebug output across runs. BTreeMap sorts keys
consistently.
* feat: Add disk usage percentage and warn on high usage
Add `usage_percent` field to disk collection output. When a disk
exceeds 85% usage, log at WARN level instead of INFO so it stands
out in log aggregation systems.
* Apply review suggestion
* Update dependencies (#60)
* chore: Dependecy bumps (#63)
* chore: Dependecy bumps
* Bump to 0.4.0
* Use new op-rs tags
* chore: Finalize import
* chore: Fix clippy lints
* chore(containerdebug): Add rustfmt changes
---------
Co-authored-by: Lars Francke <git@lars-francke.de>
Co-authored-by: Natalie Klestrup Röijezon <nat@nullable.se>
Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com>
Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.tech>
Co-authored-by: Lars Francke <lars.francke@stackable.tech>
Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com>1 parent 39511c7 commit 2eb61e9
19 files changed
Lines changed: 1980 additions & 18 deletions
File tree
- crates
- containerdebug
- src
- system_information
- stackable-operator/src
- product_logging
- status/condition
- stackable-versioned-macros/src/attrs
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
0 commit comments