Skip to content

feat(object-storage): Publish gateway proxy routes - #30

Merged
tanmoysrt merged 5 commits into
developfrom
object-storage-proxy-routes
Sep 11, 2026
Merged

feat(object-storage): Publish gateway proxy routes#30
tanmoysrt merged 5 commits into
developfrom
object-storage-proxy-routes

Conversation

@tanmoysrt

Copy link
Copy Markdown
Member

Summary

Cargo publishes the regional S3 and S3 administration domains through the Proxy before an object storage cluster becomes Active.

What changed

  • Store the wildcard domain supplied during Cargo setup.
  • Map s3-svc.<wildcard-domain> and s3-admin-svc.<wildcard-domain> to the Garage gateway mesh address.
  • Restrict Proxy calls to one-label site names with the -svc suffix.
  • Mark the cluster Failed when Proxy publication fails.
  • Prevent more than one Object Storage Cluster from becoming Active.

Why

The regional S3 services need stable public domains without exposing arbitrary Proxy site-map authority.

Validation

  • Ruff formatting and lint passed.
  • Python compilation passed.
  • Shell and JSON syntax checks passed.
  • 10 focused Proxy client and installation tests passed on test.local.
  • Object Storage Cluster integration cases are included for CI. This Cargo checkout is not installed on the available local test site.

Related issues

None.

@tanmoysrt
tanmoysrt force-pushed the object-storage-proxy-routes branch from 3806ccb to 2257831 Compare September 11, 2026 12:50
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR is not yet safe to merge because a failure publishing the second Proxy route can leave the first route publicly mapped to a cluster marked Failed.

Reviews (2) · Last reviewed commit: "fix(object-storage): Stringify the proxy..."

tanmoysrt and others added 4 commits September 11, 2026 18:33
The failure path of publish_proxy_routes passed ":str" as a format spec,
so ProxyError.__format__ raised a TypeError instead of marking the
cluster Failed.

IntegrationTestLiveClusterRelease activates a cluster per test and the
suite does not roll back between tests, so the new single-Active-cluster
rule rejected the save inside release_machines.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Writing the same site mapping twice is the same mapping, so a connection
failure or a 429, 500, 502, 503 or 504 is asked again with a growing
backoff. A refusal is the Proxy's answer and raises on the first attempt.

This narrows the window where one of the two service domains is
published and the other is not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ObjectStorageCluster interpolated the stored value while ProxyClient
normalised its own copy, so a value such as ".example.com" built a
service domain that the Proxy then refused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Frappe Semgrep security rules block an exception object passed
straight to .format() on a translated string.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tanmoysrt
tanmoysrt force-pushed the object-storage-proxy-routes branch from 355bc15 to e5dec47 Compare September 11, 2026 13:05
@tanmoysrt
tanmoysrt merged commit 1228483 into develop Sep 11, 2026
4 checks passed
Aradhya-Tripathi added a commit that referenced this pull request Sep 11, 2026
Brings in the proxy route publishing from #30 alongside the gateway nginx step.

The setup flow now runs nginx on the gateway, verifies the nodes, then publishes
proxy routes, and marks the cluster Active only once all three succeed. nginx comes
first so the proxy is never given routes to a gateway that cannot take them.

setup() keeps this branch's behaviour of always running the full flow: develop's
"every node joined" shortcut re-published proxy routes but skipped nginx, so a failed
nginx step could never be retried.

install.py and setup.sh each carried WILDCARD_DOMAIN twice after the merge; one of
each is kept.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GhqFzS8Bq8s8qK9r5x6bXr
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