Skip to content

[DPE-11604] Added IPv6 integration tests - #2049

Merged
xavipg003 merged 57 commits into
16/edgefrom
dpe-11604
Oct 27, 2026
Merged

xavipg003 merged 57 commits into
16/edgefrom
dpe-11604

Conversation

@xavipg003

@xavipg003 xavipg003 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Issue

There is no integration coverage for deployments where the charm's own networking uses IPv6. Nothing proves the charm works when the peer binding resolves to an IPv6 address, on dual-stack networks, or that IPv4-only deployments keep working.

Solution

Add tests/integration/test_ipv6_deployment.py. The scenario is selected with PG_IP_FAMILY:

  • ipv6: re-discovers subnets (juju reload-spaces), creates an ipv6 space holding only PG_IPV6_SUBNET and sets it as the model default-space, so every endpoint of the charm binds to IPv6.
  • ipv4: IPv6 disabled on the LXD bridge (regression guard).
  • dual: both families on the bridge, Juju picks the binding address.

The tests check that:

  • the charm reaches active/idle;
  • network-get database-peers only returns addresses of the expected family (in PG_IPV6_SUBNET for ipv6);
  • the get-primary action succeeds, which exercises the Patroni REST API URL building.

Add one spread task per scenario. Each task configures lxdbr0 (ipv6.address=fd42:1928:642::1/64 or none) before running the module.

Pass PG_IP_FAMILY and PG_IPV6_SUBNET through tox.ini so the test can read them.

The fix itself is in the single kernel library (canonical/postgresql-single-kernel-library#377).
Also fixes #2073.

marceloneppel and others added 30 commits October 7, 2026 17:46
…dule from the single kernel library

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…e15)

- CharmState now requires s3_requirer (backups stack): build one S3Requirer
  before CharmState (ops permits a single instance per charm) and inject the
  same object into PostgreSQLBackups; switch backups imports to the lib path.
- AsyncReplicationManager ctor grew the status/action bridges
  (set_unit_status, set_primary_status_message, set_app_status,
  create_pgdata, fix_leader_annotation, re_emit_relation_changed) and takes
  the watcher; wire the VM charm accordingly (K8s-only bridges stay no-ops).
- Port tests/unit/test_async_replication.py to the manager-centric API
  (async_relation/unit_ip/get_shared_secret/remote_secret_id/
  update_primary_cluster_data renames; flows moved to the manager) and fix
  the ruff I001 unsorted imports; repoint test_backups patch targets.
…tion stack tip (d98da6a)

The library stack re-based after the AsyncReplicationWatcher Protocol
removal; 8/8 now carries the 16.3.12 bump at d98da6a. Point the async
manager's watcher bridge at the charm's watcher_handler - the lib handler
satisfies the removed seam structurally.
Base automatically changed from sk-bump to 16/edge October 16, 2026 17:11
marceloneppel
marceloneppel previously approved these changes Oct 16, 2026
marceloneppel
marceloneppel previously approved these changes Oct 19, 2026
dragomirp
dragomirp previously approved these changes Oct 19, 2026
@xavipg003
xavipg003 dismissed stale reviews from dragomirp and marceloneppel via 22d37cb October 26, 2026 18:47
dragomirp
dragomirp previously approved these changes Oct 26, 2026
marceloneppel
marceloneppel previously approved these changes Oct 26, 2026
@xavipg003
xavipg003 merged commit f876824 into 16/edge Oct 27, 2026
474 of 490 checks passed
@xavipg003
xavipg003 deleted the dpe-11604 branch October 27, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Libraries: Out of sync The charm libs used are out-of-sync not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add IPv6 tests

4 participants