Skip to content

Search-diagnostics article: fail fast outside the VPC, defuse the VPC-environment step - #27

Merged
sir-sigurd merged 13 commits into
mainfrom
kb-diagnostics-hardening
Aug 3, 2026
Merged

Search-diagnostics article: fail fast outside the VPC, defuse the VPC-environment step#27
sir-sigurd merged 13 commits into
mainfrom
kb-diagnostics-hardening

Conversation

@sir-sigurd

@sir-sigurd sir-sigurd commented Aug 3, 2026

Copy link
Copy Markdown
Member

Field feedback from a support engagement: an operator following this article balked at Step 4 — read "create a VPC environment" as provisioning real infrastructure (a VPC endpoint) and skipped it — then ran the Step 5 script in a standard CloudShell, where it hung indefinitely with no diagnostic, prompting ad-hoc script modifications instead of a return to Step 4.

  • Step 4: state plainly that a CloudShell VPC environment is not new infrastructure (not a VPC endpoint, no cost, fully removed by Cleanup); add a CLI lookup for the accessor security group; rewrite the subnet bullet — the old "in Quilt-created VPCs every subnet typically qualifies" is wrong on newer network layouts, where the domain's own subnets are deliberately isolated from S3 and are exactly the natural-but-wrong pick. Name the subnets that always work (service subnets).
  • Step 5: the script now sets a connect timeout and fails fast with a self-explanatory message pointing back to Step 4. The precondition is also a comment inside the script block so it survives copy-paste — including by AI assistants executing the article on the operator's behalf, which is how it was consumed in practice.
  • Troubleshooting: key the Step 5 entry on the real error strings (cannot reach, ConnectTimeoutError, Max retries exceeded) and say explicitly it's a network-placement problem — rerun the script unmodified.
  • Review pass (independent full read-through): the public-endpoint path is a labelled note and the script's precondition comment/error message name it instead of contradicting it; added the 7.1+ write-rejection metrics (Coordinating/Primary/ReplicaWriteRejected, 12→15 files) with an older-engine caveat; stated the VPC-environment idle timeout (as little as 10 minutes — a floor that holds in GovCloud too); Cleanup now covers a leftover ENI (missing ec2:DeleteNetworkInterface) and deleting the uploaded S3 copies; dropped the unsourced search-accessor name; Step 4 flow split (reassurance vs constraints), subnet bullet leads with the instruction, quota corrected to per-IAM-principal.

Wrong-shell path tested: against an unreachable host the script exits in ~10 s with the new message (exit 1). The happy path is unchanged apart from the timeout/except additions (read=None, so slow responses from a degraded cluster are still never cut off).

🤖 Generated with Claude Code

…ment step

Field feedback: an operator read Step 4's "create a VPC environment" as
provisioning real infrastructure and skipped it, then ran the Step 5
script in a standard CloudShell, where it hung indefinitely with no
diagnostic. Reassure on what Step 4 actually creates, make the script
fail fast with a message pointing back to Step 4, add a CLI
security-group lookup and a no-S3 copy-out fallback, and key
Troubleshooting on the real error strings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Use any bucket you can write to, then download the files from the S3 console.

If no subnet with an S3 route was available in Step 4, skip S3 entirely — the files are small enough to move as text. In the VPC environment run `tar czf - cat_*.txt settings.json | base64`, copy the output from the terminal, and on your machine paste it into `base64 -d | tar xzf -` (finish with Ctrl-D).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Platform-specific extraction fallback

The fallback prescribes a Unix-oriented base64 -d | tar xzf - pipeline and Ctrl-D without identifying the required local environment. On machines whose base64 utility uses different flags or lacks these commands, decoding fails or waits for input, preventing recovery of the diagnostics; please state the platform requirements or provide platform-specific alternatives.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

sir-sigurd and others added 11 commits August 3, 2026 13:39
The fallback's premise (a VPC with no S3-routed subnet) can't occur in a
working deployment - service subnets must reach S3. The realistic trap
is the opposite: on newer network layouts the domain's own subnets are
deliberately isolated, so the natural subnet choice breaks Step 6.
Name the subnets that always work and how to verify a candidate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The named service subnets are authoritative already, and asking the
reader to hunt for an S3 gateway endpoint re-arms the very
"I'd have to create a VPC endpoint" misreading Step 4 defuses.
A wrong pick is cheap: Step 6 hangs, recreate with another subnet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Nothing in the bullet suggests creating anything anymore, so the
prohibition only re-plants the "endpoints" idea it guards against.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The <stack>-a/-b naming only helps on a Quilt-created network-1.0 VPC
with an in-VPC domain: no such build exists (all current 1.0 variants
leave the ES domain public), and that layout would not need the hint
anyway - its two service subnets share the S3-gateway route table, so
any pick works.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
From a full read-through review: the public-endpoint path is a labelled
note and the script's precondition comment/error name it instead of
contradicting it; add the 7.1+ write-rejection metrics (12->15 files)
with an older-engine caveat; state the VPC-environment idle timeout;
Cleanup covers a leftover ENI and the uploaded S3 copies; drop the
unsourced search-accessor name and use "accessor security group"
consistently; split Step 4's reassurance from its constraints; lead the
subnet bullet with the instruction; quota is per IAM principal; soften
the now-overbroad CloudWatch-route claim; correct the datapoint count.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wrong DOMAIN/ACCOUNT/region empties every file; engine-version gaps
empty only a few - the all-vs-some split makes the exception
self-evident without naming metrics or versions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The section was an inventory repeating the steps: the cluster-state
filenames appear in the script, its expected output, and Step 6; the
metric list is the loop itself. Only the two-shells roadmap and the
disclosure note were load-bearing - both now close the Summary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
It forward-references an environment that doesn't exist yet at that
point, and Step 4's subnet guidance now steers to NAT'd subnets that
usually do reach CloudWatch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The allowlist explanation lives in Troubleshooting's 401 entry, at the
point of need. "As little as 10 minutes" is true in both partitions
without the GovCloud parenthetical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the “collect search-cluster diagnostics” support article to prevent operators from running the cluster-state script outside the VPC, by clarifying CloudShell VPC environments and adding faster failure behavior and troubleshooting guidance.

Changes:

  • Clarifies Step 4 (CloudShell VPC environment) to reduce confusion about “creating” infrastructure and improve guidance on picking the right subnet / security group.
  • Updates the Step 5 script to fail fast when the endpoint is unreachable (connect timeout + clearer error) and adds copy-paste-surviving precondition guidance inside the script.
  • Expands Step 3 CloudWatch metrics (adds write-rejection metrics) and refreshes troubleshooting/cleanup guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +102 to +103
# A VPC-internal domain is reachable ONLY from the CloudShell VPC environment
# from Step 4 — anywhere else, every request fails. (Public endpoint: any shell.)
Note all three — the endpoint and VPC are used below; include the engine version in what you send to support. If you run several Quilt stacks, the `vpc` value tells you which stack's VPC a domain belongs to.

(A null `endpoint` means the domain has a public endpoint instead — `DomainStatus.Endpoint`. Then skip Step 4, run the Step 5 script from any shell with that endpoint as `HOST`, and skip Step 6 — the files land wherever you ran the script.)
**If `endpoint` is null**, your domain has a public endpoint instead — read it from `DomainStatus.Endpoint`. Public-endpoint deployments skip Steps 4 and 6: run the Step 5 script from any shell, with the public endpoint as `HOST` — the files land wherever you run it.
## Step 6 — Copy the cluster-state files out

CloudShell VPC environments can't use the console's upload/download menu, and their storage is **deleted when the session ends** — so move the files to S3 right away:
CloudShell VPC environments can't use the console's upload/download menu, and their storage is **deleted when the session ends** (an idle session can end in as little as 10 minutes) — so move the files to S3 right away:
Script precondition scoped to the VPC (not just the CloudShell
environment); public-endpoint note names the Python+boto3 requirement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@sir-sigurd
sir-sigurd merged commit 741bcb2 into main Aug 3, 2026
1 check passed
@sir-sigurd
sir-sigurd deleted the kb-diagnostics-hardening branch August 3, 2026 12:59
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