Add Recon gap collection script (Kerberos curl)#2
Draft
will-sh wants to merge 6 commits into
Draft
Conversation
Default RECON to node2:9889 and use curl -k --negotiate -u : for SPNEGO auth. Collects cluster state, namespace usage, open keys, pending deletion, and deleted container sample for reconciliation. Co-authored-by: Will Xiao <wxiao@cloudera.com>
Use temp files and jq --slurpfile so large API bodies are not passed on the command line (fixes invalid JSON / --argjson failures). Request namespace/usage with files=false for root aggregate only. Validate each response, print per-endpoint status, and record fetch_failures in output. Co-authored-by: Will Xiao <wxiao@cloudera.com>
Older Recon exposes GET /api/v1/namespace/du; /namespace/usage was added in HDDS-13130. Probe both with URL-encoded path=/. Fall back to storageDistribution globalNamespace when neither works. Co-authored-by: Will Xiao <wxiao@cloudera.com>
Do not count optional endpoint failures (mpu summary, pendingDeletion) as required failures. Write null instead of HTML error blobs. Try /blocks/deletePending when pendingDeletion is missing. Document port 9889. Co-authored-by: Will Xiao <wxiao@cloudera.com>
Use /namespace/du only (no /usage probe). Drop newer endpoints: open/mpu/summary, pendingDeletion, storageDistribution fallback. Co-authored-by: Will Xiao <wxiao@cloudera.com>
Co-authored-by: Will Xiao <wxiao@cloudera.com>
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.
Adds
scripts/collect-recon-gap.shfor reconciling Recon Overview (physicalscmUsed) vs Disk Usage (logical namespace size).Defaults (customer cluster):
RECON=https://node2.ecs1-sy-rf.coelab.cloudera.com:9889curl -k -s --negotiate -u :(SPNEGO; requires valid Kerberos ticket)Collects:
clusterState, namespace usage (logical +replica=true), open keys / MPU summaries, delete-pending summary, SCM/OM pending deletion, deleted containers sample (limit=1000), plus a jq summary on stdout.Usage:
./scripts/collect-recon-gap.sh # writes recon-gap-YYYYMMDD.jsonTested:
bash -nsyntax check only (no live cluster in CI).