Skip to content

Add Recon gap collection script (Kerberos curl)#2

Draft
will-sh wants to merge 6 commits into
masterfrom
cursor/collect-recon-gap-script-5e99
Draft

Add Recon gap collection script (Kerberos curl)#2
will-sh wants to merge 6 commits into
masterfrom
cursor/collect-recon-gap-script-5e99

Conversation

@will-sh
Copy link
Copy Markdown
Owner

@will-sh will-sh commented Jun 2, 2026

Adds scripts/collect-recon-gap.sh for reconciling Recon Overview (physical scmUsed) vs Disk Usage (logical namespace size).

Defaults (customer cluster):

  • RECON=https://node2.ecs1-sy-rf.coelab.cloudera.com:9889
  • curl -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.json

Tested: bash -n syntax check only (no live cluster in CI).

Open in Web Open in Cursor 

cursoragent and others added 6 commits June 2, 2026 15:47
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants