-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-4645 migrate and run load balancer tests #1414
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
CDRIVER-4645 migrate and run load balancer tests #1414
Conversation
Port 8000 conflicts with HAProxy started by run-load-balancer.sh in DET
Update to commit mongodb/specifications@5af2ab7 to fix test failure when an error is expected.
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.
Minor suggestions; otherwise, LGTM.
|
||
def functions(): | ||
return { | ||
'start load balancer': [ |
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.
'start load balancer': [ | |
'start-load-balancer': [ |
Recommend using -
instead of spaces for consistency in new EVG config generator scripts.
name=f"loadbalanced-test-{auth_str}-{ssl_str}-{server_version}", | ||
depends_on=[EvgTaskDependency(name="loadbalanced-compile")], | ||
# Use `rhel8.7` distro. `rhel8.7` distro includes necessary dependency: `haproxy`. | ||
run_on="rhel8.7-small", |
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.
Consider including {distro_str}
in the task name (using make_distro_str()
) for consistency with other new EVG config generator scripts, even if all the (current) tasks are on the same/single distro.
Also recommend specifying the run_on
distro using find_small_distro()
from config_generator.etc.distros
rather than hard-coding the distro string.
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.
Done. Required adding rhel8.7
to the RHEL_DISTROS
list.
depends_on=[EvgTaskDependency(name="loadbalanced-compile")], | ||
# Use `rhel8.7` distro. `rhel8.7` distro includes necessary dependency: `haproxy`. | ||
run_on="rhel8.7-small", | ||
tags=['loadbalanced'], |
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.
Recommend including distro_name
, compiler
, arch
, ssl
, and auth
in task tags for EVG CLI friendliness.
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.
Done. Omitted arch
since the no arch is specified in the compile or test task.
Also added the ssl
tag to other test tasks. The "nossl" value was omitted due to use on legacy config variants.
yield Task( | ||
name="loadbalanced-compile", | ||
run_on="rhel8.7-large", | ||
tags=['loadbalanced'], |
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.
Recommend including distro_name
, compiler
, and arch
in task tags for EVG CLI friendliness.
Co-authored-by: Ezra Chung <[email protected]>
Co-authored-by: Ezra Chung <[email protected]>
Co-authored-by: Ezra Chung <[email protected]>
I initially mistakenly thought `find_large_distro` returned a string.
For consistency with other task naming.
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.
Updated. Thank you for the suggested changes.
Latest changes verified with this patch build: https://spruce.mongodb.com/version/6515caaa3627e0fb1f125331
name=f"loadbalanced-test-{auth_str}-{ssl_str}-{server_version}", | ||
depends_on=[EvgTaskDependency(name="loadbalanced-compile")], | ||
# Use `rhel8.7` distro. `rhel8.7` distro includes necessary dependency: `haproxy`. | ||
run_on="rhel8.7-small", |
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.
Done. Required adding rhel8.7
to the RHEL_DISTROS
list.
depends_on=[EvgTaskDependency(name="loadbalanced-compile")], | ||
# Use `rhel8.7` distro. `rhel8.7` distro includes necessary dependency: `haproxy`. | ||
run_on="rhel8.7-small", | ||
tags=['loadbalanced'], |
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.
Done. Omitted arch
since the no arch is specified in the compile or test task.
Also added the ssl
tag to other test tasks. The "nossl" value was omitted due to use on legacy config variants.
# Do not add `nossl` tag to prevent being selected by legacy config variants. | ||
# Remove the `if` when CDRIVER-4571 is resolved. | ||
if SSL != 'nossl': | ||
test_tags += SSL |
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.
I believe this should be test_tags += [SSL]
or test_tags.append(SSL)
to avoid the following result in the generated config:
[sanitizers-matrix-asan, ..., server, "4.2", o, p, e, n, s, s, l]
Also applies to other instances in this PR.
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.
Oof. Thank you for the catch.
Distro(name='rhel8.7-large', os='rhel', os_type='linux', os_ver='8.7', size='large'), | ||
Distro(name='rhel8.7-small', os='rhel', os_type='linux', os_ver='8.7', size='small'), |
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.
Distro(name='rhel8.7-large', os='rhel', os_type='linux', os_ver='8.7', size='large'), | |
Distro(name='rhel8.7-small', os='rhel', os_type='linux', os_ver='8.7', size='small'), | |
Distro(name='rhel87-large', os='rhel', os_type='linux', os_ver='8.7', size='large'), | |
Distro(name='rhel87-small', os='rhel', os_type='linux', os_ver='8.7', size='small'), |
Suggest omitting .
for consistency with other RHEL distro names.
Latest changes verified with this patch build: https://spruce.mongodb.com/version/6515d9307742ae813127938b/ |
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.
LGTM, minor suggestion to keep the distro string and compiler consistent if the compiler ever changes.
bash_exec( | ||
command_type=EvgCommandType.TEST, | ||
env={ | ||
'CC': 'gcc', |
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.
'CC': 'gcc', | |
'CC': _COMPILER, |
'AUTH': auth_str, | ||
'SSL': ssl_str, | ||
'LOADBALANCED': 'loadbalanced', | ||
'CC': 'gcc', |
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.
'CC': 'gcc', | |
'CC': _COMPILER, |
Latest changes verified with this patch: https://spruce.mongodb.com/version/6526cff12fbabe871ea125cf |
Summary
This PR partially resolves CDRIVER-4645:
*-loadbalanced-*
tasks to new Evergreen config.haproxy
use of port 8000.hello
monitoring command. CDRIVER-4193 Ensure OP_MSG for handshakes and fix RPC op_egress counters #1256 switched from legacy hello tohello
when in Load Balancing mode.New tasks tested in this patch build: https://spruce.mongodb.com/version/65147abba4cf4765a33cf54d
Background & Motivation
Testing in CI is partially motivated to test a fix specific to load balancers in CI: CDRIVER-4718.
Specifications describe load balanced test requirements
The Load Balancer Support specification documents
Minimum Server Version: 5.0
Use of rhel8.7
The previously unused
*-loadbalanced-*
tasks used ubuntu1804. https://wiki.corp.mongodb.com/display/DBDEVPROD/Guidelines+around+Evergreen+distros suggest use of newer distros.ubuntu2204 was tried. The ubuntu2204 distro does not appear to have the necessary dependency
haproxy
installed. The rhel8.7 distro is instead used. Sanitizers are excluded due to observed failure to configure.