-
Notifications
You must be signed in to change notification settings - Fork 23
Fixes #1748: Implement inter-router connection group upgrade #1755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1755 +/- ##
=======================================
- Coverage 67.9% 66.2% -1.7%
=======================================
Files 202 205 +3
Lines 47767 48037 +270
Branches 5184 5217 +33
=======================================
- Hits 32457 31840 -617
- Misses 13198 14221 +1023
+ Partials 2112 1976 -136
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
aefb2f7
to
e93e174
Compare
src/router_core/connections.c
Outdated
if (strcmp(core->group_correlator_by_maskbit[mask_bit], correlator) == 0) { | ||
qdr_connection_t *old_conn = core->rnode_conns_by_mask_bit[mask_bit]; | ||
qd_log(LOG_ROUTER_CORE, QD_LOG_ERROR, | ||
"CGROUP duplicate group control connection detected: correlator=%s conns=[C%"PRIu64"],[C%"PRIu64"]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace CGROUP with Connection Group
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch - fixed.
correlator, member->identity, conn->identity); | ||
DEQ_REMOVE_N(GROUP, core->unallocated_group_members, member); | ||
DEQ_INSERT_HEAD_N(GROUP, conn->connection_group, member); | ||
member->group_parent_mask_bit = conn->mask_bit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group_parent_mask_bit
is an excellent /easy to understand name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why thank you! :)
src/router_core/connections.c
Outdated
// | ||
if (!!conn->control_links[QD_INCOMING] && !!conn->control_links[QD_OUTGOING]) { | ||
// | ||
// If this connection is pending upgrade we can now to the switchover. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// If this connection is pending upgrade we can now to the switchover. | |
// If this connection is pending upgrade we can now do the switchover. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
conns = self.management.query(type=CONNECTION_TYPE).get_dicts() | ||
return [c for c in conns if 'inter-router' in c['role']] | ||
|
||
def get_inter_router_data_conns(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like some of these functions are generic enough to be added to system_test.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are in system_test.py, right? I remembered you made a similar request on the previous patch so I move all the router-specific accessors into the QdRouter class.
The only two helper functions I left in the certificate rotation testcase are wait_inter_router_conns() and wait_control_links(). wait_inter_router_conns() invokes self.assertTrue() which means it needs to be in a TestCase subclass, and wait_control_link() has some very test-specific constraints which I think would make it error-prone to use generally.
…grade This introduces the concept of a connection group ordinal. It annotates inter-router connections. Its purpose is to assign a precedence to connections within and inter-router connection group. Those inter router connections with the highest ordinal become the active routing path to a peer router. Connections within the group that have a lower ordinal remain active but no new flows are sent over them. This is used to implement connection upgrade for certificate rotation.
No description provided.