Skip to content

fix(scripts): M5a — --host 127.0.0.1 for --local mode#926

Open
bootjp wants to merge 2 commits into
mainfrom
fix/m5a-local-host
Open

fix(scripts): M5a — --host 127.0.0.1 for --local mode#926
bootjp wants to merge 2 commits into
mainfrom
fix/m5a-local-host

Conversation

@bootjp
Copy link
Copy Markdown
Owner

@bootjp bootjp commented Jun 4, 2026

Bug fix discovered during the M5a E2E run of scripts/run-jepsen-m5-local.sh after PR #924 + #925 merge.

症状

./scripts/run-jepsen-m5-local.sh 実行時、最初の workload setup! が以下で失敗:

DynamoDB :cognitect.anomalies/not-found: n5: nodename nor servname provided, or not known

根本原因

dynamodb_multi_table_workload.cljopen! で:

host (or (:dynamo-host test) (name node))

--local 設定時、:dynamo-host は nil なので (name node) (default-nodes"n1".."n5") を hostname として使用 → DNS 解決失敗。

Fix

lein run--host 127.0.0.1 を追加。cli/common-cli-opts 経由で :host:dynamo-hostmake-ddb-client に thread されて、全 5 nodes の client が同じループバック endpoint を dial する。

関連する未解決問題 (本 PR スコープ外)

この修正後、setup! は n5 DNS failure を回避できるが、新たに workers が全 txn で ResourceNotFoundException: table not found を返す問題が surface した。:

  • create-all-tables! は (5 並列 client で) 5 回成功 report
  • ListRoutes は期待通りの 2 group catalog を返す
  • 直接 curl で CreateTable を投げると HTTP 200 + "TableStatus":"ACTIVE"
  • それでも GetItem / TransactGetItemsResourceNotFoundException

5 client 並列での CreateTable race か、adapter/dynamodb.go の internal sync 問題か。別 issue で調査予定。

Test plan

  • bash -n scripts/run-jepsen-m5-local.sh 構文OK
  • 実行時 n5: nodename nor servname provided エラーは出ない
  • E2E zero G1c — 上記 ResourceNotFoundException 別件解決後

E2E run of scripts/run-jepsen-m5-local.sh after PR #924 + #925 merge
revealed a DNS-resolution failure during the workload's first setup!:

  DynamoDB :cognitect.anomalies/not-found: n5: nodename nor servname
  provided, or not known

Root cause: the workload's open! resolves the DynamoDB client hostname
via (or (:dynamo-host test) (name node)).  When --local is set,
:dynamo-host is nil (the cluster is local), so it falls through to
(name node) where node is one of default-nodes ["n1" "n2" "n3"
"n4" "n5"] — virtual labels, not real hostnames.  DNS resolution
fails.

Fix: thread --host 127.0.0.1 through lein run.  cli/common-cli-opts
maps it to :host -> prepare-dynamo-opts copies to :dynamo-host ->
make-ddb-client uses it as the endpoint hostname.  All five nodes'
clients now correctly dial the single-process loopback DynamoDB
endpoint (PROC_ADDR=127.0.0.1:50051 / 63801).

Verification: post-fix run no longer hits the n5 DNS failure.  setup!
now proceeds to verify-multi-group-routing! and create-all-tables!.

Note: a separate issue surfaces after this fix — workers report
ResourceNotFoundException for every txn, even though create-all-tables!
reports success and ListRoutes shows the expected two-group catalog.
The 5-parallel client setup may be racing on CreateTable in a way the
server reports as ACTIVE but the table-meta key is not actually
durably visible to the subsequent invoke!.  That's a separate
investigation outside this fix.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Warning

Review limit reached

@bootjp, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 15 minutes and 51 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f83f93de-26fe-4fe5-b054-5f368b7aeab4

📥 Commits

Reviewing files that changed from the base of the PR and between 0ece726 and 83d44c0.

📒 Files selected for processing (1)
  • scripts/run-jepsen-m5-local.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/m5a-local-host

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the scripts/run-jepsen-m5-local.sh script to explicitly pass the --host 127.0.0.1 argument to the Jepsen workload command. This prevents DNS resolution failures that occur when the workload attempts to resolve virtual node labels (e.g., 'n1', 'n2') as real hostnames, ensuring all node clients correctly connect to the local loopback DynamoDB endpoint. A detailed comment explaining this change has also been added. There are no review comments to address, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

…#930 partial)

Adding default range coverage for routing keys lexicographically
smaller than T1_KEY.  Without this, any table whose base64-encoded
name sorts before 'amVwc2VuX2FwcGVuZF90MQ' (= base64('jepsen_append_t1'))
returns 'no route for key' from ShardedCoordinator.dispatchTxn, which
createTableWithRetry silently swallows as ACTIVE (issue #930 root
cause #1).

Topology consequence: the default range goes to group 1.  Tables 1-2
share that group; tables 3-4 use group 2.

NOTE — partial fix.  E2E run after this commit STILL shows all
workers reporting ResourceNotFoundException.  The jepsen_append_t1..4
routing keys are inside the original [T1_KEY, +inf) coverage, so
those should not benefit from this change — yet they're still failing.
A second bug is present beyond the routing-coverage gap and needs
separate investigation.  See issue #930 for the next-step plan.
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.

1 participant