Skip to content

Misc fixes#398

Open
graydon wants to merge 2 commits into
stellar:mainfrom
graydon:misc-fixes
Open

Misc fixes#398
graydon wants to merge 2 commits into
stellar:mainfrom
graydon:misc-fixes

Conversation

@graydon

@graydon graydon commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Two separate fixes here:

  1. Add support for passing env vars through from ssc command line all the way to the core instances, in case you want to adjust a configuration setting on a run-by-run basis, this is a very lightweight way to do it.
  2. Add publishNotReadyAddresses=true to the headless service configuration for each statefulset that wires it into DNS. this will get DNS entries into k8s' managed DNS as soon as possible -- before k8s has successfully completed a readiness probe -- which in turn means that other core nodes that try to resolve their names are going to at least get DNS answers regardless of the pod being ready. I believe (though it's hard to test) that this narrows startup races that might cause failed connection-establishments due to cached negative DNS lookups. Fairly hypothetical change, but it doesn't seem to do any harm in my testing and I think it might improve things a bit.

Copilot AI review requested due to automatic review settings June 17, 2026 18:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1b15cd6bfd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

// requires that you install the DNS server component on your k8s cluster.
member self.ToService() : V1Service =
let serviceSpec = V1ServiceSpec(clusterIP = "None", selector = CfgVal.labels)
let serviceSpec = V1ServiceSpec(clusterIP = "None", selector = CfgVal.labels, publishNotReadyAddresses = true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply publishNotReadyAddresses to Helm workers

This only updates the NetworkCfg-generated headless service; the ParallelCatchupV2 Helm chart still defines its own headless Service with clusterIP: None and wires the StatefulSet to it in src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml:1-31, but that Service still lacks publishNotReadyAddresses. When running the pubnet parallel catchup V2 mission, worker pod DNS records are still withheld until readiness, so the startup DNS race this change is meant to remove remains for that mission.

Useful? React with 👍 / 👎.

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

This PR adds a mechanism to pass arbitrary environment variables from the ssc CLI through to deployed stellar-core containers (both in generated Kubernetes specs and the parallel-catchup Helm chart), and adjusts headless Service behavior to publish DNS entries before readiness.

Changes:

  • Add coreEnv to MissionContext, plumb it from CLI parsing, and apply it to generated stellar-core container specs.
  • Expose worker.coreEnv in the parallel catchup Helm chart (values + template) and wire it from the mission installer via helm --set.
  • Set publishNotReadyAddresses=true on the headless Service produced by NetworkCfg.ToService().

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/MissionParallelCatchup/parallel_catchup_helm/values.yaml Adds worker.coreEnv values entry for env passthrough configuration.
src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml Renders worker.coreEnv entries into the StatefulSet container env list.
src/FSLibrary/StellarMissionContext.fs Extends MissionContext with a coreEnv field.
src/FSLibrary/StellarKubeSpecs.fs Passes coreEnv into core containers and sets publishNotReadyAddresses on the headless Service.
src/FSLibrary/MissionHistoryPubnetParallelCatchupV2.fs Converts coreEnv into Helm --set overrides for the parallel catchup chart.
src/FSLibrary.Tests/Tests.fs Updates test MissionContext initialization to include coreEnv.
src/App/Program.fs Adds --core-env option and parsing to populate MissionContext.coreEnv.

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

Comment on lines 339 to 345
V1Container(
name = containerName,
image = imageName,
command = [| "/bin/sh" |],
args = [| "-x"; "-c"; allCmdsAndCleanup.ToString() |],
env = [| peerNameEnvVar; asanOptionsEnvVar |],
env = Array.concat [ [| peerNameEnvVar; asanOptionsEnvVar |]; coreEnvVars ],
resources = res,
Comment on lines 824 to 826
member self.ToService() : V1Service =
let serviceSpec = V1ServiceSpec(clusterIP = "None", selector = CfgVal.labels)
let serviceSpec = V1ServiceSpec(clusterIP = "None", selector = CfgVal.labels, publishNotReadyAddresses = true)
V1Service(spec = serviceSpec, metadata = self.NamespacedMeta self.ServiceName)
@anupsdf anupsdf requested review from jayz22 and sisuresh June 17, 2026 22:42
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