Skip to content

Mirror node add rerun skips shared Postgres initialization after partial install failure #4649

@JeffreyDallas

Description

@JeffreyDallas

Problem

When solo mirror node add fails after installing the shared resources chart but before mirror-node Postgres initialization completes, a retry can skip the internal Postgres setup tasks.

The retry sees the existing solo-shared-resources Helm release and sets installSharedResources=false. The mirror-node flow currently uses that flag to skip both:

  • Initialize Postgres pod
  • Prime mirror-node postgres secret

That leaves the shared Postgres pod running, but without the mirror-node database roles/users initialized. The later mirror-node pods can then fail readiness because the expected DB users were never created.

Root Cause

installSharedResources means "the shared-resources Helm release needs to be installed in this run". It does not mean "the internal shared Postgres is already initialized for mirror-node".

The Postgres initialization path is already designed to be idempotent through the solo-initialized database comment sentinel, so it should run for internal database deployments even when the shared-resources chart already existed before the current run.

Expected Behavior

For internal database deployments, mirror-node add/upgrade should always prime the mirror password secret and invoke shared Postgres initialization. The initialization code should decide whether work is needed.

For external database deployments, these shared Postgres tasks should still be skipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA error that causes the feature to behave differently than what was expected based on design docsP1-💎Current Milestone & Goals

    Type

    No fields configured for Bug.

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions