Skip to content

fix site-to-site vpn not connecting until a vm is deployed in the vpc - #14315

Open
Damans227 wants to merge 2 commits into
apache:mainfrom
Damans227:nl/issue-13687
Open

Damans227 wants to merge 2 commits into
apache:mainfrom
Damans227:nl/issue-13687

Conversation

@Damans227

@Damans227 Damans227 commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #13687

A site-to-site VPN between VPCs stays Disconnected until a VM is deployed in a tier. Two things cause it. The router only starts the tunnel when traffic tries to cross it, and after setup it pings the far side to trigger that. With no VM the tier has no address on the router, so the ping leaves from the public IP and never matches the tunnel. On top of that, the periodic state check skipped VPC routers with no running VMs, so the state never caught up either way.

  • the active side now starts the tunnel itself with ipsec up when it isn't established after setup, split connections included. The passive side still waits.
  • the state check now covers VPC routers that have no running VMs.

Test:

Lab with two VPCs, one tier each, VPN gateway on both, customer gateways pointing at each other's public IP, one active and one passive connection. No VMs anywhere.

Before: both connections stay Disconnected. The routers show no security associations:

Security Associations (0 up, 0 connecting):
  none

After: reset the active connection. The router starts the tunnel on its own and both connections go Connected with no VMs:

INFO     Executing: timeout 20 ipsec up vpn-10.0.60.83
vpn-10.0.60.83[4]: ESTABLISHED 30 seconds ago, 10.0.60.84[10.0.60.84]...10.0.60.83[10.0.60.83]

a46b69e4=Connecting df4946df=Disconnected
a46b69e4=Connected  df4946df=Connected

Taking the tunnel down with ipsec down on both routers moves both connections back to Disconnected within a minute, so the state follows the tunnel.

@Damans227

Copy link
Copy Markdown
Collaborator Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19411

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.91%. Comparing base (7ed0cec) to head (4349d82).

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #14315   +/-   ##
=========================================
  Coverage     19.91%   19.91%           
- Complexity    20198    20201    +3     
=========================================
  Files          6373     6373           
  Lines        577230   577231    +1     
  Branches      70696    70696           
=========================================
+ Hits         114936   114983   +47     
+ Misses       449736   449680   -56     
- Partials      12558    12568   +10     
Flag Coverage Δ
uitests 3.71% <ø> (ø)
unittests 21.19% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@boring-cyborg boring-cyborg Bot added component:virtual-router Python Warning... Python code Ahead! labels Oct 5, 2026
@Damans227
Damans227 marked this pull request as ready for review October 5, 2026 18:58
@Damans227 Damans227 changed the title fix site-to-site vpn state on vpc routers with no running vms fix site-to-site vpn not connecting until a vm is deployed in the vpc Oct 5, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site to Site VPN Connections shows disconnected if there are no running vm's

2 participants