Skip to content

[DPE-10203] test(async-replication): cover the ticket's full teardown sequence - #1912

Closed
marceloneppel wants to merge 2 commits into
dpe-10203-async-replication-fixesfrom
dpe-10203-dead-dc-ticket-sequence
Closed

[DPE-10203] test(async-replication): cover the ticket's full teardown sequence#1912
marceloneppel wants to merge 2 commits into
dpe-10203-async-replication-fixesfrom
dpe-10203-dead-dc-ticket-sequence

Conversation

@marceloneppel

@marceloneppel marceloneppel commented Aug 21, 2026

Copy link
Copy Markdown
Member

Issue

DPE-10203 (stacked on #1837, like #1838): the dead-DC recovery regression test covered the core ordering but skipped two steps of the reported sequence: the watcher's machine goes down with the dead datacenter ("all Rome units"), and the dead relation is first attacked with remove-relation --force — the ticket's Issue 1, for which Juju delivers no events — before the remove-saas --force workaround clears the offer.

Solution

Extend test_async_replication_dead_dc_recovery.py to replicate the ticket's full teardown sequence: the whole datacenter dies (cluster units and Raft-witness watcher alike), and the dead relation is attacked with remove-relation --force before the remove-saas --force workaround. The workaround tolerates "not found" (the _consumer_alias_exists idiom), so the test stays valid if Juju ever honors remove-relation --force — the current behavior keeps exercising the exact ordering that orphaned the consumer label and promotion counter.

The test's consumer-side assertions need #1838's changes, so the full sequence passes at the stack tip.

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

The dead-DC recovery test stopped db1's machines, force-promoted db2 and
went straight to the remove-saas --force workaround. The DPE-10203 report
has two more steps around them: the whole datacenter dies (the watcher's
machine goes down together with the cluster's units — "all Rome units"),
and the dead relation is first attacked with remove-relation --force —
the ticket's Issue 1, for which Juju delivers no events — before the
workaround clears the offer.

Add both, keeping the test valid regardless of the Juju behavior: the
remove-saas workaround tolerates "not found" (the _consumer_alias_exists
idiom), so a Juju fix that honors remove-relation --force skips it
instead of erroring, while the current behavior keeps exercising the
exact ordering that orphaned the consumer label and promotion counter.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label Aug 21, 2026
Pull the stale-counter reconciliation fix (clear even after a new
relation forms) so this PR's extended test runs against the fixed base.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel marceloneppel added the not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes label Aug 21, 2026
@marceloneppel

Copy link
Copy Markdown
Member Author

Superseded by #1914 (same extended test, rebased on the restructured fix set).

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.

1 participant