Skip to content

Enable dynamic change of connector cost#1867

Open
gabordozsa wants to merge 6 commits into
skupperproject:mainfrom
gabordozsa:gabor_connector_cost_1857
Open

Enable dynamic change of connector cost#1867
gabordozsa wants to merge 6 commits into
skupperproject:mainfrom
gabordozsa:gabor_connector_cost_1857

Conversation

@gabordozsa

@gabordozsa gabordozsa commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Enable dynamic change of the cost of inter-router connector and its existing connections.

Fixes #1857

The major steps of connector cost change are as follows.

Connector side:

  1. Mgmt thread calls update on ConnectorEntity
  2. Update function (in C) changes the connector cost, then it posts a core action for each existing connections.
  3. Core thread updates qdr_connection_t->inter_router_cost, then it posts a general work item to update the peer cost in the local link state.
  4. Peer cost in local link state (in Python) is updated, ls_seq is bumped

Listener side:

  1. Llistener side receives LSU from connector side with updated cost. It posts a core action to update the cost of the connection.
  2. Listener side core thread updates the qdr_connection_t->inter_router_cost, then it posts a general work item to update the peer cost in the local link state.

Notes:

  • The same core function (qdr_core_update_connection_cost_CT) handles both steps 3 and 6.
  • The remote cost is saved in qdr_connection_t at connection open time. It is used at the connector side to find the maximum cost of connector and listener when the dynamic update happens. This approach works as long as listener cost is immutable.

@gabordozsa gabordozsa marked this pull request as draft May 25, 2026 16:56
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@gabordozsa gabordozsa force-pushed the gabor_connector_cost_1857 branch 2 times, most recently from 6b4c7da to 39ad457 Compare May 26, 2026 16:07
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 6.34921% with 118 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.3%. Comparing base (60cd6ec) to head (39ad457).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1867     +/-   ##
=======================================
- Coverage   70.5%   70.3%   -0.3%     
=======================================
  Files        209     211      +2     
  Lines      47838   49537   +1699     
  Branches    5156    5302    +146     
=======================================
+ Hits       33765   34855   +1090     
- Misses     11608   12185    +577     
- Partials    2465    2497     +32     
Flag Coverage Δ
pysystemtests 76.9% <15.0%> (+0.6%) ⬆️
systemtests 66.5% <4.7%> (-0.9%) ⬇️

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

Components Coverage Δ
unittests 70.3% <54.5%> (-0.3%) ⬇️
systemtests 70.3% <54.5%> (-0.3%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gabordozsa gabordozsa force-pushed the gabor_connector_cost_1857 branch 2 times, most recently from 16e9cd7 to c1ed679 Compare May 26, 2026 16:54
@gabordozsa gabordozsa marked this pull request as ready for review May 26, 2026 18:05
@gabordozsa gabordozsa requested review from c-kruse and ted-ross May 26, 2026 18:05
@c-kruse

c-kruse commented May 27, 2026

Copy link
Copy Markdown
Contributor

Interested to hear what the upgrade experience is in mixed router version networks. I.e. if a connector is updated and the listener is on a current router release what happens/what should happen.

That said, hooked it up with a control plane experiment and it went very smoothly!

@gabordozsa

Copy link
Copy Markdown
Collaborator Author

Interested to hear what the upgrade experience is in mixed router version networks. I.e. if a connector is updated and the listener is on a current router release what happens/what should happen.

The cost of existing inter-router connection will still be updated correctly at the connector side. The connection cost at listener side will not change, resulting asymmetric peer costs at connector and listener sides. That should not be a problem from functional point of view, as far as I understand it.

For new connections, everything would work as expected after connector cost update.

That said, hooked it up with a control plane experiment and it went very smoothly!

Thank you for giving it a try!

@gabordozsa gabordozsa force-pushed the gabor_connector_cost_1857 branch from c1ed679 to bea73cd Compare May 28, 2026 07:23
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.

Enable connector cost to be dynamically changed without interruption to existing connection

3 participants