GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Resend gateway config before re-registering services by vitostrokov · Pull Request #4388 · dstackai/dstack

Conversation

@vitostrokov

@vitostrokov vitostrokov commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #4385

When a gateway loses its state, for example after a Kubernetes gateway container restarts on a
fresh filesystem, the running-replica sync registers its services again but never resends the
global config. certbot then requests their certificates from its default ACME server instead of
DSTACK_ACME_SERVER, without the EAB credentials.

The sync now calls submit_gateway_config() before registering services, only on ticks that
register something. If the call fails, the tick skips the sync and retries on the next one,
rather than request a certificate from the wrong server.

Testing:

  • uv run pytest src/tests/_internal/server/background/pipeline_tasks/test_gateway_replicas.py:
    74 passed, 74 skipped (the skipped ones are the Postgres variants, run with --runpostgres).
  • test_registers_new_service_and_replica now checks that the config is submitted before
    register_service.
  • test_no_gateway_calls_when_state_already_in_sync now checks that no config is submitted
    when there is nothing to register.
  • The new test_skips_registration_if_gateway_config_not_submitted covers the failure path.
  • Without the fix, 2 of these fail.
  • uv run ruff check and uv run ruff format --check on the changed files: clean.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vitostrokov @claude
Resend gateway config before re-registering services
36c4506
The running gateway replica pipeline re-registers services after a
gateway loses its state, e.g. when the gateway is reinstalled, but it
never resends the global config. Certificates for the re-registered
services are then requested from certbot's default ACME server instead
of the configured one (staging, or an EAB CA). Only a server restart
resent the config, through init_gateways.

Submit the config before any service registration. The call is
idempotent and happens only on ticks that register services. If it
fails, skip the sync until the next tick rather than issue a
certificate from the wrong server.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@peterschmidt85
peterschmidt85 requested a review from jvstme October 18, 2026 08:15
jvstme
jvstme approved these changes Oct 21, 2026
View reviewed changes

@jvstme jvstme left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thank you!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jvstme
jvstme merged commit e59a6ca into dstackai:master Oct 21, 2026
26 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jvstme jvstme jvstme approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Re-registered services ignore DSTACK_ACME_SERVER after a gateway loses its state

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@vitostrokov @jvstme
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.