[RFE] Support compression/decompression for large diagnostic KVP payloads (e.g. dmesg)
- Dominant language
- Rust
- Stars
- 16
- Forks
- 20
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 1
Description
### Summary
Add support for capturing large diagnostic payloads (e.g. `dmesg` / boot logs), compressing them, and writing them to the Hyper-V KVP guest pool and decompressing them on read. Cloud-init already does this (it compresses and chunks `dmesg` into KVPs), and it's proven useful for boot/performance analysis.
### Current state
- `DiagnosticsKvp` (added in #313) already chunks large values across KVP records at UTF-8 boundaries and reassembles them on read but values are stored as plain UTF-8, uncompressed.
- The store validates values as UTF-8 and rejects NUL bytes, so raw compressed bytes can't be stored directly; a text-safe encoding (e.g. base64) is required on top of compression.
### Proposal
1. Write: `compress → base64-encode → chunk`, reusing the existing chunking + `append_multiple`.
2. Read: `reassemble (existing) → base64-decode → decompress` back to the original payload.
3. `diag` CLI: transparently decompress compressed records when displaying (new `compressed` record kind or marker), with a `--raw` option to show the encoded form.
4. Provide the compress/encode/chunk primitive in `libazureinit-kvp`; leave capture of a specific source (e.g. `dmesg`) to the azure-init binary.
### Related
- Diagnostics layer (chunking/reassembly this builds on): #313
Contributor guide
Research direction
Start by reading DiagnosticsKvp and the existing chunking and reassembly path from #313, then inspect the libazureinit-kvp primitive and the diag CLI entry point. Done means large payloads round-trip through compression, text-safe encoding, and chunking, while diag displays decompressed records by default and supports the proposed raw form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100