Skip to content

feat: use common resources in swarm#406

Merged
jason-lynch merged 9 commits into
mainfrom
fix/PLAT-610/update-global-patroni-params-swarm
Jun 16, 2026
Merged

feat: use common resources in swarm#406
jason-lynch merged 9 commits into
mainfrom
fix/PLAT-610/update-global-patroni-params-swarm

Conversation

@jason-lynch

@jason-lynch jason-lynch commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

When we implemented the systemd orchestrator, we identified several resources that could be shared between orchestrator implementations. For expedience and to avoid conflicts, we added duplicate implementations of those resources to the orchestrator/common package without refactoring the orchestrator/swarm package to use them.

This PR addresses that tech debt by:

  • Removing the duplicate resource implementations from orchestrator/swarm
  • Updating the swarm orchestrator to use the orchestrator/common implementations
  • Adding a state migration for existing databases

Changes

This PR is split into atomic commits. The most notable of these are:

  • feat: use common resources in swarm - switches to the orchestrator/common resources in the orchestrator/swarm package.
  • feat: v1.2.0 state migration - adds the state migration for existing databases
  • test: add heartbeat utility for e2es - adds a heartbeat process to the add node tests
    • This addresses an issue I ran into where the add node process can hit the test timeout if the database is idle. My changes shifted the timing in such a way that I was consistently hitting this condition locally. Adding a small amount of activity to the database makes the test much faster.
    • This issue was already present before my changes, but I didn't hit it as consistently as I did after my changes.

Testing

Our E2Es cover new database sufficiently well. We need to manually test the migration process for existing databases

# this pr mainly affects the swarm orchestrator, so use the default swarm environment

# start on the main branch
git checkout main

# reset the compose environment
make dev-reset

# start the compose environment
make dev-watch


# then in another terminal
# init the cluster
cp-init

# make an empty directory for backups
rm -rf /tmp/PLAT-610 && mkdir -p /tmp/PLAT-610

# create a database with backups enabled
cp1-req create-database <<EOF | cp-follow-task
{
  "id": "storefront",
  "spec": {
    "database_name": "storefront",
    "database_users": [
      {
        "username": "admin",
        "password": "password",
        "db_owner": true,
        "attributes": ["SUPERUSER", "LOGIN"]
      }
    ],
    "orchestrator_opts": {
      "swarm": {
        "extra_volumes": [
          {
            "host_path": "/tmp/PLAT-610",
            "destination_path": "/backups"
          }
        ]
      }
    },
    "backup_config": {
      "repositories": [
        {
          "id": "original",
          "type": "posix",
          "base_path": "/backups"
        }
      ]
    },
    "nodes": [
      { "name": "n1", "host_ids": ["host-1"] },
      { "name": "n2", "host_ids": ["host-2"] }
    ]
  }
}
EOF

# then create a backup to verify that it's working
cp1-req backup-database-node storefront n1 '{ "type": "full" }' | cp-follow-task

# now, in the terminal where you're running the control plane servers, stop them
# by hitting ctrl+c
# then, switch to this branch
git checkout fix/PLAT-610/update-global-patroni-params-swarm

# and start the servers again
make dev-watch

# you should see a message in the logs similar to:
# 'upgraded state component=resource_service database_id=storefront to_version=1.2.0'

# now, back in your other terminal
# try creating a backup again
cp1-req backup-database-node storefront n1 '{ "type": "full" }' | cp-follow-task

# then try performing a 'no-op' update
# note that we expect this will still perform some operations and take time because the
# migration can't add host paths to the pgbackrest config resource. these paths
# aren't used, but they are still present in a property.
cp1-req get-database storefront \
    | jq '{spec}' \
    | cp1-req update-database storefront \
    | cp-follow-task

# perform one final backup to validate that everything is still working
cp1-req backup-database-node storefront n1 '{ "type": "full" }' | cp-follow-task

PLAT-610

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 316417b6-6a43-4b1a-8f98-ec00fbe82ed0

📥 Commits

Reviewing files that changed from the base of the PR and between 6ba8698 and 232e86b.

📒 Files selected for processing (3)
  • changes/unreleased/Fixed-20260611-090000.yaml
  • server/internal/orchestrator/swarm/orchestrator.go
  • server/internal/orchestrator/swarm/spec.go
✅ Files skipped from review due to trivial changes (1)
  • changes/unreleased/Fixed-20260611-090000.yaml

📝 Walkthrough

Walkthrough

Six swarm-local resource types (EtcdCreds, PatroniCluster, PatroniMember, PgBackRestConfig, PgBackRestStanza, PostgresCerts) are deleted and moved to the common orchestrator package. A new state migration v1.2.0 converts persisted resource state to the updated schemas. The StateMigration.Run interface gains a databaseID parameter. Swarm PatroniConfig is refactored to delegate lifecycle logic to common.PatroniConfig. An e2e heartbeat helper is added to keep databases active during add-node tests.

Changes

Resource consolidation from swarm to common and state migration v1.2.0

Layer / File(s) Summary
Migration interface contract, state versioning, and utility
server/internal/resource/service.go, server/internal/resource/state.go, server/internal/utils/utils.go
StateMigration.Run and StateMigrations.Run accept a new databaseID string parameter; Service.Start and Service.GetState forward it; StateVersion_1_2_0 is introduced as CurrentVersion; TypedFromMap[T] generic utility and BuildOptionArgs determinism improvements are added.
v_1_1_0 source schemas
server/internal/resource/migrations/schemas/v1_1_0/database.go, .../filesystem.go, .../swarm.go
Snapshot schemas for all v1_1_0 resource types (node, instance, directory, PatroniConfig, EtcdCreds, PatroniCluster, PatroniMember, PgBackRestConfig, PgBackRestStanza, PostgresCerts, Network) with identifier helpers and JSON-tagged structs used as source input for migration.
v_1_2_0 target schemas
server/internal/resource/migrations/schemas/v1_2_0/common.go, .../database.go, .../filesystem.go, .../swarm.go
Target schemas for the post-migration state: common resource types (EtcdCreds, PatroniCluster, PatroniMember, PgBackRestConfig, PgBackRestStanza, PostgresCerts), plus database node, filesystem dir, swarm PatroniConfig with nested Base/generator, and Network.
Common PatroniConfig dependency and auth method improvements
server/internal/orchestrator/common/patroni_config.go, .../patroni_config_generator.go
PatroniConfig.Dependencies() conditionally appends pgBackRest backup/restore config identifiers. PatroniConfigGenerator.AuthMethod() centralizes pg_hba auth method selection defaulting to ScramSHA256; postgreSQL() calls it instead of inline MD5 logic.
Migration v1.2.0 implementation
server/internal/resource/migrations/1_2_0.go
Version_1_2_0.Run dispatches seven per-type migrations and then rewrites dependency type references. PatroniConfig migration derives archive/restore commands, defaults CPU/memory from host fields, computes paths via swarmInstancePaths(), and wires conditional pgBackRest dependencies.
Test harness, legacy migration signatures, and registration
server/internal/resource/migrations/main_test.go, .../1_0_0.go, .../1_0_0_test.go, .../1_1_0.go, .../1_1_0_test.go, .../provide.go
A JSON round-trip Compare harness is added for golden state validation. Migration signatures for v1_0_0 and v1_1_0 are updated to accept databaseID, and call sites are updated. Version_1_2_0 is registered in provideStateMigrations.
Migration v1.2.0 test scenarios and golden fixtures
server/internal/resource/migrations/1_2_0_test.go, .../golden_test/TestVersion_1_2_0/*
TestVersion_1_2_0 covers five scenarios (simple, backup, restore, in-place restore, backup+restore) with v1_1_0 resource helpers; validated via golden.Run and dependency-graph planning. Golden JSON fixtures define the expected post-migration state for each scenario.
Swarm resource removal and PatroniConfig refactor
server/internal/orchestrator/swarm/patroni_config.go, .../orchestrator.go, .../pgbackrest_restore.go, .../postgres_service_spec.go, .../postgrest_config_resource.go, .../rag_config_resource.go, .../mcp_config_resource.go, .../resources.go, .../spec.go, server/internal/docker/docker.go, server/internal/database/instance_resource.go
Six swarm-local resource files are deleted. PatroniConfig is refactored to delegate lifecycle operations to common.PatroniConfig via a Base field with caller-provided signalReload wait. orchestrator.go builds all resources using common.* types with updated Paths/Port fields and new PostgresContainerPort/PatroniContainerPort constants. Config resources and pgbackrest_restore switch to common.* identifiers and ReadResourceFile. spec.go uses port constants in healthcheck and port config. RegisterResourceTypes is simplified. initializeInstance no longer patches Patroni failsafe mode. NetworkInfo gains JSON tags.

E2e heartbeat helper for add-node test

Layer / File(s) Summary
HeartBeat type and lifecycle
e2e/heartbeat_test.go
HeartBeat starts a background goroutine that upserts a timestamp row into the primary node every 500 ms; RunHeartBeat wires cleanup into testing.T. Methods include Start, Stop, connOpts, createTable, and the periodic heartbeat upsert loop.
Add-node test integration and DatabaseFixture method
e2e/db_update_add_node_test.go, e2e/database_test.go
The add-node test calls RunHeartBeat after fixture creation and increases its context timeout from 5 to 8 minutes. DatabaseFixture.HeartBeat method runs the helper for all nodes or specified node names with provided credentials.

Poem

🐇 Hop, hop, the swarm types fly,
Into common they leap up high!
Migration v1.2.0 rewrites the store,
No stale resource identifiers anymore.
A heartbeat ticks while nodes align—
This rabbit's diff is looking fine! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.77% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: use common resources in swarm' accurately and concisely describes the main objective of the changeset—consolidating duplicate resources from swarm to use the common implementations.
Description check ✅ Passed The PR description comprehensively covers all template sections: a clear summary explaining the tech debt resolution, detailed changes with atomic commits, thorough testing instructions with manual reproduction steps, and a complete checklist with linked issue (PLAT-610).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/PLAT-610/update-global-patroni-params-swarm

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.

@codacy-production

codacy-production Bot commented Jun 15, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 6 medium

Results:
6 new issues

Category Results
Complexity 6 medium

View in Codacy

🟢 Metrics 72 complexity · 64 duplication

Metric Results
Complexity 72
Duplication 64

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai 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.

Actionable comments posted: 7

🧹 Nitpick comments (1)
e2e/heartbeat_test.go (1)

1-2: ⚡ Quick win

E2E test build tag is correct, but -debug flag support is missing.

The //go:build e2e_test build tag follows the coding guideline. However, as per coding guidelines, E2E tests should also support debug mode with a -debug flag to preserve failed test environments for inspection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@e2e/heartbeat_test.go` around lines 1 - 2, Add support for a `-debug` flag to
the E2E test file heartbeat_test.go to preserve failed test environments for
inspection. Define a package-level boolean flag variable for debug mode using
the flag package, then implement logic in the test functions to skip cleanup or
preserve resources when the debug flag is enabled. This allows engineers to
inspect the test environment after failures for debugging purposes.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@e2e/heartbeat_test.go`:
- Around line 63-68: The Stop() method in the HeartBeat type closes the done
channel and waits for the goroutine to finish, but it never cancels the context
by calling l.cancel(). This can cause the goroutine to hang indefinitely if any
context-aware operation (such as database calls or the WithConnection call) is
blocking at the time Stop() is called. Add a call to l.cancel() in the Stop()
method before or after closing the done channel to ensure the context is
properly cancelled and the goroutine can exit cleanly.
- Around line 44-61: The sync.WaitGroup type does not have a Go method, only
Add, Done, and Wait. In the Start method where l.wg.Go is called on line 50, you
need to either replace l.wg with an errgroup.Group (from
golang.org/x/sync/errgroup) which provides the Go method, or manually manage the
WaitGroup by calling l.wg.Add(1) before launching the goroutine and l.wg.Done()
at the end of the goroutine function (replacing the current defer l.cancel()
with both defer l.wg.Done() and defer l.cancel() or combining them
appropriately).

In `@server/internal/resource/migrations/1_2_0.go`:
- Line 269: The error message in the fmt.Errorf call at line 269 contains a
copy/paste error where it says "patroni member resource" but should say
"pgBackRest config" to correctly reflect the actual resource type being migrated
in this section. Update the error message string to replace "patroni member"
with "pgBackRest config" while keeping the rest of the error message structure
intact.
- Line 234: The error message in the fmt.Errorf call contains a copy/paste error
where it refers to "patroni member resource" but should refer to "pgBackRest
config" to accurately describe the actual resource type being unmarshaled in
this migration. Update the error message string to use the correct resource type
name.
- Line 477: In the migration file at line 477, the OwnerUID field is incorrectly
being assigned from old.OwnerGID instead of old.OwnerUID. Fix this by changing
the assignment from OwnerUID: old.OwnerGID to OwnerUID: old.OwnerUID to prevent
file ownership metadata corruption during the migration.

In
`@server/internal/resource/migrations/golden_test/TestVersion_1_2_0/simple_instance.json`:
- Line 2: The golden fixture file currently shows version "1.1.0" (the
pre-migration state) when it should reflect the post-migration state with
version "1.2.0". Update the test code that sets up the state before calling
golden.Run to explicitly set state.Version to the target migration version
(1.2.0), matching the production behavior in service.go line 166 where
state.Version is set after migration.Run succeeds. This ensures the golden
fixture captures the correct final state after migration.

In `@server/internal/resource/migrations/schemas/v1_2_0/swarm.go`:
- Around line 53-58: The nested fields `Name`, `ID`, `Subnet`, and `Gateway`
within the `BridgeNetworkInfo` struct are missing JSON tags, causing them to
serialize with uppercase names instead of the lowercase convention used
throughout the schema. Add lowercase JSON tags to each of these four fields in
the nested struct (e.g., `json:"name"`, `json:"id"`, `json:"subnet"`,
`json:"gateway"`) to maintain consistency with the established naming
convention.

---

Nitpick comments:
In `@e2e/heartbeat_test.go`:
- Around line 1-2: Add support for a `-debug` flag to the E2E test file
heartbeat_test.go to preserve failed test environments for inspection. Define a
package-level boolean flag variable for debug mode using the flag package, then
implement logic in the test functions to skip cleanup or preserve resources when
the debug flag is enabled. This allows engineers to inspect the test environment
after failures for debugging purposes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f056246-5621-4d87-82e5-a14fe275f461

📥 Commits

Reviewing files that changed from the base of the PR and between 93347ff and 26a3bd1.

📒 Files selected for processing (43)
  • e2e/db_update_add_node_test.go
  • e2e/heartbeat_test.go
  • server/internal/database/instance_resource.go
  • server/internal/orchestrator/common/patroni_config.go
  • server/internal/orchestrator/common/patroni_config_generator.go
  • server/internal/orchestrator/swarm/etcd_creds.go
  • server/internal/orchestrator/swarm/mcp_config_resource.go
  • server/internal/orchestrator/swarm/orchestrator.go
  • server/internal/orchestrator/swarm/patroni_cluster.go
  • server/internal/orchestrator/swarm/patroni_config.go
  • server/internal/orchestrator/swarm/patroni_config_golden_test.go
  • server/internal/orchestrator/swarm/patroni_member.go
  • server/internal/orchestrator/swarm/pgbackrest_config.go
  • server/internal/orchestrator/swarm/pgbackrest_restore.go
  • server/internal/orchestrator/swarm/pgbackrest_stanza.go
  • server/internal/orchestrator/swarm/postgres_certs.go
  • server/internal/orchestrator/swarm/postgres_service_spec.go
  • server/internal/orchestrator/swarm/postgrest_config_resource.go
  • server/internal/orchestrator/swarm/rag_config_resource.go
  • server/internal/orchestrator/swarm/resources.go
  • server/internal/resource/migrations/1_0_0.go
  • server/internal/resource/migrations/1_0_0_test.go
  • server/internal/resource/migrations/1_1_0.go
  • server/internal/resource/migrations/1_1_0_test.go
  • server/internal/resource/migrations/1_2_0.go
  • server/internal/resource/migrations/1_2_0_test.go
  • server/internal/resource/migrations/golden_test/TestVersion_1_2_0/simple_instance.json
  • server/internal/resource/migrations/golden_test/TestVersion_1_2_0/with_backup_and_restore_configs.json
  • server/internal/resource/migrations/golden_test/TestVersion_1_2_0/with_backup_config.json
  • server/internal/resource/migrations/golden_test/TestVersion_1_2_0/with_in-place_restore_config.json
  • server/internal/resource/migrations/golden_test/TestVersion_1_2_0/with_restore_config.json
  • server/internal/resource/migrations/main_test.go
  • server/internal/resource/migrations/provide.go
  • server/internal/resource/migrations/schemas/v1_1_0/database.go
  • server/internal/resource/migrations/schemas/v1_1_0/filesystem.go
  • server/internal/resource/migrations/schemas/v1_1_0/swarm.go
  • server/internal/resource/migrations/schemas/v1_2_0/common.go
  • server/internal/resource/migrations/schemas/v1_2_0/database.go
  • server/internal/resource/migrations/schemas/v1_2_0/filesystem.go
  • server/internal/resource/migrations/schemas/v1_2_0/swarm.go
  • server/internal/resource/service.go
  • server/internal/resource/state.go
  • server/internal/utils/utils.go
💤 Files with no reviewable changes (9)
  • server/internal/orchestrator/swarm/resources.go
  • server/internal/orchestrator/swarm/pgbackrest_config.go
  • server/internal/orchestrator/swarm/pgbackrest_stanza.go
  • server/internal/orchestrator/swarm/patroni_config_golden_test.go
  • server/internal/orchestrator/swarm/patroni_cluster.go
  • server/internal/database/instance_resource.go
  • server/internal/orchestrator/swarm/patroni_member.go
  • server/internal/orchestrator/swarm/postgres_certs.go
  • server/internal/orchestrator/swarm/etcd_creds.go

Comment thread e2e/heartbeat_test.go
Comment thread e2e/heartbeat_test.go
Comment thread server/internal/resource/migrations/1_2_0.go Outdated
Comment thread server/internal/resource/migrations/1_2_0.go Outdated
Comment thread server/internal/resource/migrations/1_2_0.go Outdated
Comment thread server/internal/resource/migrations/schemas/v1_2_0/swarm.go
@jason-lynch jason-lynch force-pushed the fix/PLAT-610/update-global-patroni-params-swarm branch from 26a3bd1 to 4c84cb3 Compare June 16, 2026 12:47
Removes duplicated resources from the `swarm` package and adopts the
newer resources from the `common` package. This deduplicates our code
and enables us to take advantage of recently-added improvements in the
`common` package, such as global parameter updates for Patroni.

PLAT-610
Adds the pgBackRest backup and restore config resources to the common
Patroni config dependencies. The pgBackRest configs are already being
created before the Patroni config, but only because of happenstance.
This change codifies that dependency to ensure these resources exist
before we create the Patroni config.

PLAT-610
Passing the database ID in as an argument is more convenient than
extracting the ID from one of the resources in the state.

PLAT-610
Refactors the migration tests so that tests can share an instance of the
golden test helper.

PLAT-610
Adds a migration for state v1.2.0 to migrate old swarm resources to the
new common resources.

PLAT-610
We're consistently setting failsafe mode in the patroni config resources
now, so we no longer need to set it in the instance resource.

PLAT-610
Adds a helper to provide a consistent volume of activity on a database
to avoid the replication stalls and waits that can happen in an idle
database.

This became necessary for the add node tests after the swarm common
resource refactor because they shifted the timing so that these stalls
became much more likely.

PLAT-610
@jason-lynch jason-lynch force-pushed the fix/PLAT-610/update-global-patroni-params-swarm branch from 4c84cb3 to 6ba8698 Compare June 16, 2026 14:11
@jason-lynch jason-lynch marked this pull request as ready for review June 16, 2026 14:58
@jason-lynch jason-lynch requested a review from tsivaprasad June 16, 2026 17:43

@tsivaprasad tsivaprasad 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.

Awesome...!

control-plane git:(main) cp-init
checking if host-1 is initialized
checking if host-2 is initialized
checking if host-3 is initialized
checking if host-4 is initialized
checking if host-5 is initialized
checking if host-6 is initialized
initializing cluster from host-1
joining host-2 to the cluster
joining host-3 to the cluster
joining host-4 to the cluster
joining host-5 to the cluster
joining host-6 to the cluster
➜  control-plane git:(main) rm -rf /tmp/PLAT-610 && mkdir -p /tmp/PLAT-610
➜  control-plane git:(main) cp1-req create-database <<EOF | cp-follow-task
{
  "id": "storefront",
  "spec": {
    "database_name": "storefront",
    "database_users": [
      {
        "username": "admin",
        "password": "password",
        "db_owner": true,
        "attributes": ["SUPERUSER", "LOGIN"]
      }
    ],
    "orchestrator_opts": {
      "swarm": {
        "extra_volumes": [
          {
            "host_path": "/tmp/PLAT-610",
            "destination_path": "/backups"
          }
        ]
      }
    },
    "backup_config": {
      "repositories": [
        {
          "id": "original",
          "type": "posix",
          "base_path": "/backups"
        }
      ]
    },
    "nodes": [
      { "name": "n1", "host_ids": ["host-1"] },
      { "name": "n2", "host_ids": ["host-2"] }
    ]
  }
}
EOF

{
  "message": "validation error for node n1, host host-1: volumes: failed to start container: failed to ensure docker image \"ghcr.io/pgedge/pgedge-postgres:18.4-spock5.0.9-standard-1\": failed to pull image \"ghcr.io/pgedge/pgedge-postgres:18.4-spock5.0.9-standard-1\": Error response from daemon: Get \"https://ghcr.io/v2/\": dialing ghcr.io:443 container via direct connection because Docker Desktop has no HTTPS proxy: connecting to ghcr.io:443: dial tcp: lookup ghcr.io: no such host
validation error for node n2, host host-2: volumes: failed to start container: failed to ensure docker image \"ghcr.io/pgedge/pgedge-postgres:18.4-spock5.0.9-standard-1\": failed to pull image \"ghcr.io/pgedge/pgedge-postgres:18.4-spock5.0.9-standard-1\": Error response from daemon: Get \"https://ghcr.io/v2/\": dialing ghcr.io:443 container via direct connection because Docker Desktop has no HTTPS proxy: connecting to ghcr.io:443: dial tcp: lookup ghcr.io: no such host",
  "name": "invalid_input"
}
no task object found on stdin
➜  control-plane git:(main) cp1-req create-database <<EOF | cp-follow-task
{
  "id": "storefront",
  "spec": {
    "database_name": "storefront",
    "postgres_version": "17.9",
    "spock_version": "5",
    "database_users": [
      {
        "username": "admin",
        "password": "password",
        "db_owner": true,
        "attributes": ["SUPERUSER", "LOGIN"]
      }
    ],
    "orchestrator_opts": {
      "swarm": {
        "extra_volumes": [
          {
            "host_path": "/tmp/PLAT-610",
            "destination_path": "/backups"
          }
        ]
      }
    },
    "backup_config": {
      "repositories": [
        {
          "id": "original",
          "type": "posix",
          "base_path": "/backups"
        }
      ]
    },
    "nodes": [
      { "name": "n1", "host_ids": ["host-1"] },
      { "name": "n2", "host_ids": ["host-2"] }
    ]
  }
}
EOF

{
  "database": {
    "created_at": "2026-06-16T17:37:44Z",
    "id": "storefront",
    "spec": {
      "backup_config": {
        "repositories": [
          {
            "base_path": "/backups",
            "id": "original",
            "type": "posix"
          }
        ]
      },
      "database_name": "storefront",
      "database_users": [
        {
          "attributes": [
            "SUPERUSER",
            "LOGIN"
          ],
          "db_owner": true,
          "username": "admin"
        }
      ],
      "nodes": [
        {
          "host_ids": [
            "host-1"
          ],
          "name": "n1"
        },
        {
          "host_ids": [
            "host-2"
          ],
          "name": "n2"
        }
      ],
      "orchestrator_opts": {
        "swarm": {
          "extra_volumes": [
            {
              "destination_path": "/backups",
              "host_path": "/tmp/PLAT-610"
            }
          ]
        }
      },
      "postgres_version": "17.9",
      "spock_version": "5"
    },
    "state": "creating",
    "updated_at": "2026-06-16T17:37:44Z"
  },
  "task": {
    "created_at": "2026-06-16T17:37:44Z",
    "database_id": "storefront",
    "entity_id": "storefront",
    "scope": "database",
    "status": "pending",
    "task_id": "019ed182-b273-7f09-b9e9-3600ad15b629",
    "type": "create"
  }
}
[2026-06-16T17:37:45Z] refreshing current state
[2026-06-16T17:37:45Z] finished refreshing current state (took 202.786126ms)
[2026-06-16T17:37:47Z] creating resource swarm.patroni_cluster::n2
[2026-06-16T17:37:47Z] finished creating resource swarm.patroni_cluster::n2 (took 38.042µs)
[2026-06-16T17:37:47Z] creating resource swarm.patroni_cluster::n1
[2026-06-16T17:37:47Z] finished creating resource swarm.patroni_cluster::n1 (took 9.416µs)
[2026-06-16T17:37:47Z] creating resource swarm.network::storefront-database
[2026-06-16T17:37:47Z] finished creating resource swarm.network::storefront-database (took 6.33ms)
[2026-06-16T17:37:47Z] creating resource filesystem.dir::storefront-n2-9ptayhma-instance
[2026-06-16T17:37:47Z] finished creating resource filesystem.dir::storefront-n2-9ptayhma-instance (took 521.583µs)
[2026-06-16T17:37:47Z] creating resource filesystem.dir::storefront-n1-689qacsi-instance
[2026-06-16T17:37:47Z] finished creating resource filesystem.dir::storefront-n1-689qacsi-instance (took 626.791µs)
[2026-06-16T17:37:47Z] creating resource swarm.patroni_member::storefront-n2-9ptayhma
[2026-06-16T17:37:47Z] finished creating resource swarm.patroni_member::storefront-n2-9ptayhma (took 22.791µs)
[2026-06-16T17:37:47Z] creating resource swarm.patroni_member::storefront-n1-689qacsi
[2026-06-16T17:37:47Z] finished creating resource swarm.patroni_member::storefront-n1-689qacsi (took 6µs)
[2026-06-16T17:37:47Z] creating resource filesystem.dir::storefront-n2-9ptayhma-configs
[2026-06-16T17:37:47Z] finished creating resource filesystem.dir::storefront-n2-9ptayhma-configs (took 529.125µs)
[2026-06-16T17:37:47Z] creating resource filesystem.dir::storefront-n2-9ptayhma-data
[2026-06-16T17:37:47Z] finished creating resource filesystem.dir::storefront-n2-9ptayhma-data (took 570.917µs)
[2026-06-16T17:37:47Z] creating resource filesystem.dir::storefront-n2-9ptayhma-certificates
[2026-06-16T17:37:47Z] finished creating resource filesystem.dir::storefront-n2-9ptayhma-certificates (took 502.792µs)
[2026-06-16T17:37:47Z] creating resource filesystem.dir::storefront-n1-689qacsi-certificates
[2026-06-16T17:37:47Z] finished creating resource filesystem.dir::storefront-n1-689qacsi-certificates (took 623.667µs)
[2026-06-16T17:37:47Z] creating resource filesystem.dir::storefront-n1-689qacsi-data
[2026-06-16T17:37:47Z] finished creating resource filesystem.dir::storefront-n1-689qacsi-data (took 780.083µs)
[2026-06-16T17:37:47Z] creating resource filesystem.dir::storefront-n1-689qacsi-configs
[2026-06-16T17:37:47Z] finished creating resource filesystem.dir::storefront-n1-689qacsi-configs (took 326.709µs)
[2026-06-16T17:37:48Z] creating resource swarm.pgbackrest_config::storefront-n2-9ptayhma-backup
[2026-06-16T17:37:48Z] finished creating resource swarm.pgbackrest_config::storefront-n2-9ptayhma-backup (took 1.094833ms)
[2026-06-16T17:37:48Z] creating resource swarm.etcd_creds::storefront-n2-9ptayhma
[2026-06-16T17:37:48Z] creating resource swarm.postgres_certs::storefront-n1-689qacsi
[2026-06-16T17:37:48Z] creating resource swarm.etcd_creds::storefront-n1-689qacsi
[2026-06-16T17:37:48Z] finished creating resource swarm.postgres_certs::storefront-n1-689qacsi (took 10.605375ms)
[2026-06-16T17:37:48Z] finished creating resource swarm.etcd_creds::storefront-n2-9ptayhma (took 77.757333ms)
[2026-06-16T17:37:48Z] finished creating resource swarm.etcd_creds::storefront-n1-689qacsi (took 66.198917ms)
[2026-06-16T17:37:48Z] creating resource swarm.postgres_certs::storefront-n2-9ptayhma
[2026-06-16T17:37:48Z] finished creating resource swarm.postgres_certs::storefront-n2-9ptayhma (took 6.652292ms)
[2026-06-16T17:37:48Z] creating resource swarm.pgbackrest_config::storefront-n1-689qacsi-backup
[2026-06-16T17:37:48Z] finished creating resource swarm.pgbackrest_config::storefront-n1-689qacsi-backup (took 550.167µs)
[2026-06-16T17:37:48Z] creating resource swarm.patroni_config::storefront-n2-9ptayhma
[2026-06-16T17:37:48Z] finished creating resource swarm.patroni_config::storefront-n2-9ptayhma (took 2.413959ms)
[2026-06-16T17:37:48Z] creating resource swarm.patroni_config::storefront-n1-689qacsi
[2026-06-16T17:37:48Z] finished creating resource swarm.patroni_config::storefront-n1-689qacsi (took 4.0715ms)
[2026-06-16T17:37:49Z] creating resource swarm.postgres_service_spec::storefront-n2-9ptayhma
[2026-06-16T17:37:49Z] finished creating resource swarm.postgres_service_spec::storefront-n2-9ptayhma (took 163.542µs)
[2026-06-16T17:37:49Z] creating resource swarm.postgres_service_spec::storefront-n1-689qacsi
[2026-06-16T17:37:49Z] finished creating resource swarm.postgres_service_spec::storefront-n1-689qacsi (took 156.5µs)
[2026-06-16T17:37:49Z] creating resource swarm.check_will_restart::storefront-n2-9ptayhma
[2026-06-16T17:37:49Z] finished creating resource swarm.check_will_restart::storefront-n2-9ptayhma (took 2.011083ms)
[2026-06-16T17:37:49Z] creating resource swarm.check_will_restart::storefront-n1-689qacsi
[2026-06-16T17:37:49Z] finished creating resource swarm.check_will_restart::storefront-n1-689qacsi (took 1.995458ms)
[2026-06-16T17:37:49Z] creating resource swarm.switchover::storefront-n2-9ptayhma
[2026-06-16T17:37:49Z] finished creating resource swarm.switchover::storefront-n2-9ptayhma (took 18.667µs)
[2026-06-16T17:37:49Z] creating resource swarm.switchover::storefront-n1-689qacsi
[2026-06-16T17:37:49Z] finished creating resource swarm.switchover::storefront-n1-689qacsi (took 14.375µs)
[2026-06-16T17:37:50Z] creating resource swarm.postgres_service::storefront-n2-9ptayhma
[2026-06-16T17:37:50Z] creating resource swarm.postgres_service::storefront-n1-689qacsi
[2026-06-16T17:38:10Z] finished creating resource swarm.postgres_service::storefront-n2-9ptayhma (took 20.01505705s)
[2026-06-16T17:38:10Z] finished creating resource swarm.postgres_service::storefront-n1-689qacsi (took 20.01015455s)
[2026-06-16T17:38:10Z] creating resource database.instance::storefront-n2-9ptayhma
[2026-06-16T17:38:10Z] creating resource database.instance::storefront-n1-689qacsi
[2026-06-16T17:38:20Z] finished creating resource database.instance::storefront-n2-9ptayhma (took 10.083895005s)
[2026-06-16T17:38:20Z] finished creating resource database.instance::storefront-n1-689qacsi (took 10.075291838s)
[2026-06-16T17:38:20Z] creating resource database.node::n1
[2026-06-16T17:38:20Z] finished creating resource database.node::n1 (took 71.083µs)
[2026-06-16T17:38:20Z] creating resource database.node::n2
[2026-06-16T17:38:20Z] finished creating resource database.node::n2 (took 47µs)
[2026-06-16T17:38:21Z] creating resource swarm.pgbackrest_stanza::n2
[2026-06-16T17:38:21Z] creating resource swarm.pgbackrest_stanza::n1
[2026-06-16T17:38:21Z] finished creating resource swarm.pgbackrest_stanza::n1 (took 396.027042ms)
[2026-06-16T17:38:21Z] finished creating resource swarm.pgbackrest_stanza::n2 (took 425.849416ms)
[2026-06-16T17:38:21Z] creating resource monitor.instance::storefront-n2-9ptayhma
[2026-06-16T17:38:21Z] finished creating resource monitor.instance::storefront-n2-9ptayhma (took 15.692083ms)
[2026-06-16T17:38:21Z] creating resource monitor.instance::storefront-n1-689qacsi
[2026-06-16T17:38:21Z] finished creating resource monitor.instance::storefront-n1-689qacsi (took 11.961959ms)
[2026-06-16T17:38:22Z] creating resource database.postgres_database::n2:storefront
[2026-06-16T17:38:22Z] creating resource database.postgres_database::n1:storefront
[2026-06-16T17:38:22Z] finished creating resource database.postgres_database::n2:storefront (took 313.239625ms)
[2026-06-16T17:38:22Z] finished creating resource database.postgres_database::n1:storefront (took 301.758292ms)
[2026-06-16T17:38:22Z] creating resource database.replication_slot::n2:n1:storefront
[2026-06-16T17:38:22Z] finished creating resource database.replication_slot::n2:n1:storefront (took 40.084µs)
[2026-06-16T17:38:22Z] creating resource database.replication_slot::n1:n2:storefront
[2026-06-16T17:38:22Z] finished creating resource database.replication_slot::n1:n2:storefront (took 10.333µs)
[2026-06-16T17:38:23Z] creating resource database.subscription::n1:n2:storefront
[2026-06-16T17:38:23Z] creating resource database.subscription::n2:n1:storefront
[2026-06-16T17:38:23Z] finished creating resource database.subscription::n1:n2:storefront (took 39.227125ms)
[2026-06-16T17:38:23Z] finished creating resource database.subscription::n2:n1:storefront (took 20.928417ms)

database entity storefront task 019ed182-b273-7f09-b9e9-3600ad15b629 completed
➜  control-plane git:(main)         
➜  control-plane git:(main) 
➜  control-plane git:(main) 
➜  control-plane git:(main) cp1-req backup-database-node storefront n1 '{ "type": "full" }' | cp-follow-task
{
  "task": {
    "created_at": "2026-06-16T17:41:30Z",
    "database_id": "storefront",
    "entity_id": "storefront",
    "scope": "database",
    "status": "pending",
    "task_id": "019ed186-2693-759a-a1bc-60bb5628e8a5",
    "type": "node_backup"
  }
}
[2026-06-16T17:41:36Z] P00   INFO: backup command begin 2.58.0: --config=/opt/pgedge/configs/pgbackrest.backup.conf --exec-id=512-6e85dfdc --lock-path=/tmp/pgbackrest/storefront-n1-689qacsi --log-level-console=info --no-log-timestamp --pg1-path=/opt/pgedge/data/pgdata --pg1-user=pgedge --repo1-cipher-type=none --repo1-path=/backups/databases/storefront/original/n1 --repo1-retention-full=7 --repo1-retention-full-type=time --repo1-type=posix --stanza=db --start-fast --type=full
[2026-06-16T17:41:36Z] P00   INFO: execute backup start: backup begins after the requested immediate checkpoint completes
[2026-06-16T17:41:36Z] P00   INFO: backup start archive = 000000010000000000000003, lsn = 0/3000028
[2026-06-16T17:41:36Z] P00   INFO: check archive for prior segment 000000010000000000000002
[2026-06-16T17:41:37Z] P00   INFO: execute backup stop and wait for all WAL segments to archive
[2026-06-16T17:41:38Z] P00   INFO: backup stop archive = 000000010000000000000003, lsn = 0/3000120
[2026-06-16T17:41:38Z] P00   INFO: check archive for segment(s) 000000010000000000000003:000000010000000000000003
[2026-06-16T17:41:38Z] P00   INFO: new backup label = 20260616-174136F
[2026-06-16T17:41:38Z] P00   INFO: full backup size = 30.3MB, file total = 1334
[2026-06-16T17:41:38Z] P00   INFO: backup command end: completed successfully
[2026-06-16T17:41:38Z] P00   INFO: expire command begin 2.58.0: --config=/opt/pgedge/configs/pgbackrest.backup.conf --exec-id=512-6e85dfdc --lock-path=/tmp/pgbackrest/storefront-n1-689qacsi --log-level-console=info --no-log-timestamp --repo1-cipher-type=none --repo1-path=/backups/databases/storefront/original/n1 --repo1-retention-full=7 --repo1-retention-full-type=time --repo1-type=posix --stanza=db
[2026-06-16T17:41:38Z] P00   INFO: repo1: time-based archive retention not met - archive logs will not be expired
[2026-06-16T17:41:38Z] P00   INFO: expire command end: completed successfully

database entity storefront task 019ed186-2693-759a-a1bc-60bb5628e8a5 completed
➜  control-plane git:(main) 
➜  control-plane git:(fix/PLAT-610/update-global-patroni-params-swarm) cp1-req backup-database-node storefront n1 '{ "type": "full" }' | cp-follow-task

{
  "task": {
    "created_at": "2026-06-16T17:43:24Z",
    "database_id": "storefront",
    "entity_id": "storefront",
    "scope": "database",
    "status": "pending",
    "task_id": "019ed187-e42d-7544-8941-1060dbce11e1",
    "type": "node_backup"
  }
}
[2026-06-16T17:43:30Z] P00   INFO: backup command begin 2.58.0: --config=/opt/pgedge/configs/pgbackrest.backup.conf --exec-id=755-aa0a6924 --lock-path=/tmp/pgbackrest/storefront-n1-689qacsi --log-level-console=info --no-log-timestamp --pg1-path=/opt/pgedge/data/pgdata --pg1-user=pgedge --repo1-cipher-type=none --repo1-path=/backups/databases/storefront/original/n1 --repo1-retention-full=7 --repo1-retention-full-type=time --repo1-type=posix --stanza=db --start-fast --type=full
[2026-06-16T17:43:30Z] P00   INFO: execute backup start: backup begins after the requested immediate checkpoint completes
[2026-06-16T17:43:30Z] P00   INFO: backup start archive = 000000010000000000000005, lsn = 0/5000028
[2026-06-16T17:43:30Z] P00   INFO: check archive for prior segment 000000010000000000000004
[2026-06-16T17:43:32Z] P00   INFO: execute backup stop and wait for all WAL segments to archive
[2026-06-16T17:43:32Z] P00   INFO: backup stop archive = 000000010000000000000005, lsn = 0/5000120
[2026-06-16T17:43:32Z] P00   INFO: check archive for segment(s) 000000010000000000000005:000000010000000000000005
[2026-06-16T17:43:32Z] P00   INFO: new backup label = 20260616-174330F
[2026-06-16T17:43:32Z] P00   INFO: full backup size = 30.3MB, file total = 1334
[2026-06-16T17:43:32Z] P00   INFO: backup command end: completed successfully
[2026-06-16T17:43:32Z] P00   INFO: expire command begin 2.58.0: --config=/opt/pgedge/configs/pgbackrest.backup.conf --exec-id=755-aa0a6924 --lock-path=/tmp/pgbackrest/storefront-n1-689qacsi --log-level-console=info --no-log-timestamp --repo1-cipher-type=none --repo1-path=/backups/databases/storefront/original/n1 --repo1-retention-full=7 --repo1-retention-full-type=time --repo1-type=posix --stanza=db
[2026-06-16T17:43:32Z] P00   INFO: repo1: time-based archive retention not met - archive logs will not be expired
[2026-06-16T17:43:32Z] P00   INFO: expire command end: completed successfully

database entity storefront task 019ed187-e42d-7544-8941-1060dbce11e1 completed
➜  control-plane git:(fix/PLAT-610/update-global-patroni-params-swarm) cp1-req get-database storefront \
    | jq '{spec}' \
    | cp1-req update-database storefront \
    | cp-follow-task
{
  "database": {
    "created_at": "2026-06-16T17:37:44Z",
    "id": "storefront",
    "instances": [
      {
        "created_at": "2026-06-16T17:37:47Z",
        "host_id": "host-1",
        "id": "storefront-n1-689qacsi",
        "node_name": "n1",
        "postgres": {
          "patroni_state": "running",
          "role": "primary",
          "version": "17.9"
        },
        "spock": {
          "read_only": "off",
          "subscriptions": [
            {
              "name": "sub_n2_n1",
              "provider_node": "n2",
              "status": "replicating"
            }
          ],
          "version": "5.0.6"
        },
        "state": "available",
        "status_updated_at": "2026-06-16T17:44:25Z",
        "updated_at": "2026-06-16T17:43:32Z"
      },
      {
        "created_at": "2026-06-16T17:37:47Z",
        "host_id": "host-2",
        "id": "storefront-n2-9ptayhma",
        "node_name": "n2",
        "postgres": {
          "patroni_state": "running",
          "role": "primary",
          "version": "17.9"
        },
        "spock": {
          "read_only": "off",
          "subscriptions": [
            {
              "name": "sub_n1_n2",
              "provider_node": "n1",
              "status": "replicating"
            }
          ],
          "version": "5.0.6"
        },
        "state": "available",
        "status_updated_at": "2026-06-16T17:44:25Z",
        "updated_at": "2026-06-16T17:42:15Z"
      }
    ],
    "spec": {
      "backup_config": {
        "repositories": [
          {
            "base_path": "/backups",
            "id": "original",
            "type": "posix"
          }
        ]
      },
      "database_name": "storefront",
      "database_users": [
        {
          "attributes": [
            "SUPERUSER",
            "LOGIN"
          ],
          "db_owner": true,
          "username": "admin"
        }
      ],
      "nodes": [
        {
          "host_ids": [
            "host-1"
          ],
          "name": "n1"
        },
        {
          "host_ids": [
            "host-2"
          ],
          "name": "n2"
        }
      ],
      "orchestrator_opts": {
        "swarm": {
          "extra_volumes": [
            {
              "destination_path": "/backups",
              "host_path": "/tmp/PLAT-610"
            }
          ]
        }
      },
      "postgres_version": "17.9",
      "spock_version": "5"
    },
    "state": "modifying",
    "updated_at": "2026-06-16T17:44:27Z"
  },
  "task": {
    "created_at": "2026-06-16T17:44:27Z",
    "database_id": "storefront",
    "entity_id": "storefront",
    "scope": "database",
    "status": "pending",
    "task_id": "019ed188-da66-7e75-8d18-2312d20346c9",
    "type": "update"
  }
}
[2026-06-16T17:44:29Z] refreshing current state
[2026-06-16T17:44:38Z] finished refreshing current state (took 9.594426547s)
[2026-06-16T17:44:40Z] updating resource common.pgbackrest_config::storefront-n1-689qacsi-backup
[2026-06-16T17:44:40Z] finished updating resource common.pgbackrest_config::storefront-n1-689qacsi-backup (took 760.542µs)
[2026-06-16T17:44:41Z] updating resource swarm.patroni_config::storefront-n1-689qacsi
[2026-06-16T17:44:50Z] finished updating resource swarm.patroni_config::storefront-n1-689qacsi (took 8.862926254s)
[2026-06-16T17:44:50Z] updating resource swarm.postgres_service_spec::storefront-n1-689qacsi
[2026-06-16T17:44:50Z] finished updating resource swarm.postgres_service_spec::storefront-n1-689qacsi (took 157.208µs)
[2026-06-16T17:44:50Z] updating resource swarm.check_will_restart::storefront-n1-689qacsi
[2026-06-16T17:44:50Z] finished updating resource swarm.check_will_restart::storefront-n1-689qacsi (took 4.541625ms)
[2026-06-16T17:44:50Z] updating resource swarm.switchover::storefront-n1-689qacsi
[2026-06-16T17:44:50Z] finished updating resource swarm.switchover::storefront-n1-689qacsi (took 139.25µs)
[2026-06-16T17:44:51Z] updating resource swarm.postgres_service::storefront-n1-689qacsi
[2026-06-16T17:44:56Z] finished updating resource swarm.postgres_service::storefront-n1-689qacsi (took 5.017397169s)
[2026-06-16T17:44:56Z] updating resource database.instance::storefront-n1-689qacsi
[2026-06-16T17:45:12Z] finished updating resource database.instance::storefront-n1-689qacsi (took 16.341339632s)
[2026-06-16T17:45:13Z] updating resource database.node::n1
[2026-06-16T17:45:13Z] finished updating resource database.node::n1 (took 61.75µs)
[2026-06-16T17:45:13Z] updating resource monitor.instance::storefront-n1-689qacsi
[2026-06-16T17:45:13Z] finished updating resource monitor.instance::storefront-n1-689qacsi (took 16.260667ms)
[2026-06-16T17:45:13Z] updating resource common.pgbackrest_stanza::n1
[2026-06-16T17:45:13Z] updating resource database.postgres_database::n1:storefront
[2026-06-16T17:45:13Z] finished updating resource database.postgres_database::n1:storefront (took 28.9685ms)
[2026-06-16T17:45:13Z] finished updating resource common.pgbackrest_stanza::n1 (took 212.427625ms)
[2026-06-16T17:45:14Z] updating resource database.replication_slot::n1:n2:storefront
[2026-06-16T17:45:14Z] finished updating resource database.replication_slot::n1:n2:storefront (took 17.041µs)
[2026-06-16T17:45:14Z] updating resource database.subscription::n2:n1:storefront
[2026-06-16T17:45:14Z] updating resource database.subscription::n1:n2:storefront
[2026-06-16T17:45:14Z] finished updating resource database.subscription::n1:n2:storefront (took 7.1165ms)
[2026-06-16T17:45:14Z] finished updating resource database.subscription::n2:n1:storefront (took 12.722084ms)
[2026-06-16T17:45:15Z] updating resource common.pgbackrest_config::storefront-n2-9ptayhma-backup
[2026-06-16T17:45:15Z] finished updating resource common.pgbackrest_config::storefront-n2-9ptayhma-backup (took 602.292µs)
[2026-06-16T17:45:15Z] updating resource swarm.patroni_config::storefront-n2-9ptayhma
[2026-06-16T17:45:20Z] finished updating resource swarm.patroni_config::storefront-n2-9ptayhma (took 4.465855918s)
[2026-06-16T17:45:20Z] updating resource swarm.postgres_service_spec::storefront-n2-9ptayhma
[2026-06-16T17:45:20Z] finished updating resource swarm.postgres_service_spec::storefront-n2-9ptayhma (took 184.208µs)
[2026-06-16T17:45:20Z] updating resource swarm.check_will_restart::storefront-n2-9ptayhma
[2026-06-16T17:45:20Z] finished updating resource swarm.check_will_restart::storefront-n2-9ptayhma (took 4.197291ms)
[2026-06-16T17:45:20Z] updating resource swarm.switchover::storefront-n2-9ptayhma
[2026-06-16T17:45:20Z] finished updating resource swarm.switchover::storefront-n2-9ptayhma (took 101.417µs)
[2026-06-16T17:45:21Z] updating resource swarm.postgres_service::storefront-n2-9ptayhma
[2026-06-16T17:45:26Z] finished updating resource swarm.postgres_service::storefront-n2-9ptayhma (took 5.017264586s)
[2026-06-16T17:45:26Z] updating resource database.instance::storefront-n2-9ptayhma
[2026-06-16T17:45:43Z] finished updating resource database.instance::storefront-n2-9ptayhma (took 16.52490459s)
[2026-06-16T17:45:43Z] updating resource database.node::n2
[2026-06-16T17:45:43Z] finished updating resource database.node::n2 (took 323.291µs)
[2026-06-16T17:45:43Z] updating resource monitor.instance::storefront-n2-9ptayhma
[2026-06-16T17:45:43Z] finished updating resource monitor.instance::storefront-n2-9ptayhma (took 14.51175ms)
[2026-06-16T17:45:43Z] updating resource database.postgres_database::n2:storefront
[2026-06-16T17:45:43Z] updating resource common.pgbackrest_stanza::n2
[2026-06-16T17:45:43Z] finished updating resource database.postgres_database::n2:storefront (took 35.02925ms)
[2026-06-16T17:45:43Z] finished updating resource common.pgbackrest_stanza::n2 (took 205.802959ms)
[2026-06-16T17:45:44Z] updating resource database.replication_slot::n2:n1:storefront
[2026-06-16T17:45:44Z] finished updating resource database.replication_slot::n2:n1:storefront (took 14.417µs)
[2026-06-16T17:45:44Z] updating resource database.subscription::n2:n1:storefront
[2026-06-16T17:45:44Z] updating resource database.subscription::n1:n2:storefront
[2026-06-16T17:45:44Z] finished updating resource database.subscription::n2:n1:storefront (took 9.080042ms)
[2026-06-16T17:45:44Z] finished updating resource database.subscription::n1:n2:storefront (took 12.552083ms)

database entity storefront task 019ed188-da66-7e75-8d18-2312d20346c9 completed
➜  control-plane git:(fix/PLAT-610/update-global-patroni-params-swarm) cp1-req backup-database-node storefront n1 '{ "type": "full" }' | cp-follow-task
{
  "task": {
    "created_at": "2026-06-16T17:46:14Z",
    "database_id": "storefront",
    "entity_id": "storefront",
    "scope": "database",
    "status": "pending",
    "task_id": "019ed18a-7bf7-77ca-8fb3-45c4dbe60169",
    "type": "node_backup"
  }
}
[2026-06-16T17:46:20Z] P00   INFO: backup command begin 2.58.0: --config=/opt/pgedge/configs/pgbackrest.backup.conf --exec-id=1180-883ded32 --lock-path=/tmp/pgbackrest/storefront-n1-689qacsi --log-level-console=info --no-log-timestamp --pg1-path=/opt/pgedge/data/pgdata --pg1-port=5432 --pg1-user=pgedge --repo1-cipher-type=none --repo1-path=/backups/databases/storefront/original/n1 --repo1-retention-full=7 --repo1-retention-full-type=time --repo1-type=posix --stanza=db --start-fast --type=full
[2026-06-16T17:46:20Z] P00   INFO: execute backup start: backup begins after the requested immediate checkpoint completes
[2026-06-16T17:46:20Z] P00   INFO: backup start archive = 000000010000000000000009, lsn = 0/9000028
[2026-06-16T17:46:20Z] P00   INFO: check archive for prior segment 000000010000000000000008
[2026-06-16T17:46:22Z] P00   INFO: execute backup stop and wait for all WAL segments to archive
[2026-06-16T17:46:22Z] P00   INFO: backup stop archive = 000000010000000000000009, lsn = 0/9000810
[2026-06-16T17:46:22Z] P00   INFO: check archive for segment(s) 000000010000000000000009:000000010000000000000009
[2026-06-16T17:46:22Z] P00   INFO: new backup label = 20260616-174620F
[2026-06-16T17:46:22Z] P00   INFO: full backup size = 30.3MB, file total = 1334
[2026-06-16T17:46:22Z] P00   INFO: backup command end: completed successfully
[2026-06-16T17:46:22Z] P00   INFO: expire command begin 2.58.0: --config=/opt/pgedge/configs/pgbackrest.backup.conf --exec-id=1180-883ded32 --lock-path=/tmp/pgbackrest/storefront-n1-689qacsi --log-level-console=info --no-log-timestamp --repo1-cipher-type=none --repo1-path=/backups/databases/storefront/original/n1 --repo1-retention-full=7 --repo1-retention-full-type=time --repo1-type=posix --stanza=db
[2026-06-16T17:46:22Z] P00   INFO: repo1: time-based archive retention not met - archive logs will not be expired
[2026-06-16T17:46:22Z] P00   INFO: expire command end: completed successfully

database entity storefront task 019ed18a-7bf7-77ca-8fb3-45c4dbe60169 completed
➜  control-plane git:(fix/PLAT-610/update-global-patroni-params-swarm) 

Comment thread server/internal/orchestrator/swarm/orchestrator.go Outdated
Extracts the Postgres and Patroni container ports into constants. These
represent the ports exposed on the container. These are separate from
the published ports, which are user-specified and optional.

PLAT-610
This change now applies to all running database clusters.

PLAT-610
@jason-lynch jason-lynch merged commit c12d12f into main Jun 16, 2026
3 checks passed
@jason-lynch jason-lynch deleted the fix/PLAT-610/update-global-patroni-params-swarm branch June 16, 2026 20:17
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