fix(sos): refactor Azure IMDS collection with pretty-printed JSON#17345
Open
jonathanbrenes wants to merge 1 commit into
Open
fix(sos): refactor Azure IMDS collection with pretty-printed JSON#17345jonathanbrenes wants to merge 1 commit into
jonathanbrenes wants to merge 1 commit into
Conversation
Backport upstream PR sosreport/sos#4322 (merged) to the AZL sos 4.11.0 build. Replaces the curl-based IMDS collection with a Python urllib approach that emits pretty-printed JSON, bumps the IMDS API version from 2023-07-01 to 2025-04-07, and collects the full /metadata/instance payload (now including network info). Signed-off-by: Jonathan Brenes <jonathan.brenes@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Backports upstream sosreport/sos#4322 to the Azure Linux sos 4.11.0 build, replacing the curl-based Azure IMDS metadata collection with a Python urllib implementation that emits pretty-printed JSON, bumps the IMDS API version to 2025-04-07, and collects the full /metadata/instance payload.
Changes:
- Add backport patch
azure-refactor-IMDS-collection-with-pretty-printed-JSON.patchunderbase/comps/sos/. - Wire the patch into
sos.comp.tomlvia apatch-addoverlay. - Refresh
locks/sos.lockand re-renderspecs/s/sos/sos.spec(Release bumped to 4.11.0-6).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| base/comps/sos/azure-refactor-IMDS-collection-with-pretty-printed-JSON.patch | New backport patch source. |
| base/comps/sos/sos.comp.toml | Adds patch-add overlay for the new patch. |
| locks/sos.lock | Updated input-fingerprint after overlay change. |
| specs/s/sos/sos.spec | Re-rendered: Patch4 registered, Release bumped to 6, changelog entry added. |
| specs/s/sos/azure-refactor-IMDS-collection-with-pretty-printed-JSON.patch | Patch file copied into rendered specs dir. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport upstream PR sosreport/sos#4322 (merged) to the AZL sos 4.11.0 build.
Replaces the curl-based IMDS collection with a Python urllib approach that emits pretty-printed JSON, bumps the IMDS API version from 2023-07-01 to 2025-04-07, and collects the full /metadata/instance payload (now including network info).
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented.*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Backports upstream sosreport/sos#4322 (merged) into the Azure Linux
sos4.11.0 build. The Azure plugin's IMDS metadata collection now uses Pythonurllibinstead of shelling out tocurl, producing pretty-printed JSON (4-space indented) for improved readability in the sos report. The IMDS API version is bumped to the latest supported (2025-04-07), and the collected payload is the full/metadata/instance(which now includes network information) instead of only/metadata/instance/compute.Change Log
azure-refactor-IMDS-collection-with-pretty-printed-JSON.patchto thesoscomponent, backporting upstream PR [azure] Refactor IMDS collection with pretty-printed JSON sosreport/sos#4322 to sos 4.11.0 (Fedora 43 dist-git base, which does notimport glob— hunk 1 line numbers adjusted accordingly).base/comps/sos/sos.comp.tomlas apatch-addoverlay.locks/sos.lockand re-renderspecs/s/sos/sos.spec(Release bumped to4.11.0-6).Affected package:
sos.Does this affect the toolchain?
NO
Associated issues
Links to CVEs
Test Methodology
azldev comp build -p sosagainsttomls/base/main(builtsos-4.11.0-6.azl4.noarch.rpm).azldev adv mock shell --add-package …) verified:from sos.report.plugins.azure import Azure, IMDS_URLimports cleanly.IMDS_URL == "http://169.254.169.254/metadata/instance?api-version=2025-04-07&format=json".Azure.collectandAzure._get_imds_metadataare present and callable.azldev comp render -p sosandazldev comp update -p sosboth clean after the finalize-and-amend step (no drift).