Skip to content

Reuse the demo subnet route table across workflows - #408

Draft
l3acon wants to merge 1 commit into
ansible:mainfrom
l3acon:fix/cloud-vpc-route-reuse
Draft

l3acon wants to merge 1 commit into
ansible:mainfrom
l3acon:fix/cloud-vpc-route-reuse

Conversation

@l3acon

@l3acon l3acon commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #406

Solution

Find named route tables in the demo VPC independent of the mutable owner tag,
then use the selected table's ID when updating its route and subnet association.
Prefer a table already associated with the demo subnet. If several candidates
exist without a uniquely associated table, stop for inspection rather than
choosing arbitrarily. Do not select the main route table or purge unrelated
subnet associations.

What changed

  • Added route-table discovery and guarded selection to the Cloud VPC playbook.
  • Updated the existing route-table task to reuse the selected ID and preserve
    other subnet associations; a fresh VPC can still create its demo table.
  • Added fixture-based selection tests and documented sequential workflow runs
    and duplicate-table handling.

Validation

  • python3 -m unittest discover -s cloud/tests -p test_route_table_selection.py -v: 5 passed, covering a new table, an owner-tag change, selection among duplicates, ambiguous duplicates, and a matching main table. These tests exercise Ansible selection logic with fixture data; they do not call AWS.
  • ansible-playbook -i localhost, cloud/create_vpc.yml --syntax-check and ansible-lint cloud/create_vpc.yml passed.
  • Still needed before marking ready: validate fresh creation and repeated Cloud Stack/Shared Services VPC setup with different owner tags in a disposable AWS environment; verify the public route, subnet association, and SSH connectivity after both runs. Test pre-existing duplicate tables as well. Concurrent runs are not covered.

The prior manual repair restored connectivity in the five workshops, but it did
not execute this proposed playbook change or establish the full cause of the
lost associations.

This branch has not been deployed

No deployments
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.

Repeated VPC setup can leave the demo subnet without a public route

1 participant