Skip to content

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

Merged
merged 26 commits into from
Oct 11, 2023

Conversation

kevinAlbs
Copy link
Collaborator

Summary

This PR partially resolves CDRIVER-4645:

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

For each server version that supports load balanced clusters, drivers MUST add two Evergreen tasks: one with a sharded cluster with both authentication and TLS enabled and one with a sharded cluster with authentication and TLS disabled.

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.

@kevinAlbs kevinAlbs marked this pull request as ready for review September 27, 2023 19:14
Copy link
Contributor

@eramongodb eramongodb left a 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': [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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",
Copy link
Contributor

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.

Copy link
Collaborator Author

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'],
Copy link
Contributor

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.

Copy link
Collaborator Author

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'],
Copy link
Contributor

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.

Copy link
Collaborator Author

@kevinAlbs kevinAlbs left a 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",
Copy link
Collaborator Author

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'],
Copy link
Collaborator Author

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
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Comment on lines 83 to 84
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'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@kevinAlbs
Copy link
Collaborator Author

Latest changes verified with this patch build: https://spruce.mongodb.com/version/6515d9307742ae813127938b/

Copy link
Contributor

@adriandole adriandole left a 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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'CC': 'gcc',
'CC': _COMPILER,

'AUTH': auth_str,
'SSL': ssl_str,
'LOADBALANCED': 'loadbalanced',
'CC': 'gcc',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'CC': 'gcc',
'CC': _COMPILER,

@kevinAlbs
Copy link
Collaborator Author

Latest changes verified with this patch: https://spruce.mongodb.com/version/6526cff12fbabe871ea125cf

@kevinAlbs kevinAlbs merged commit 82d593a into mongodb:master Oct 11, 2023
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.

3 participants