Skip to content

CDRIVER-5740 Use run-orchestration.sh #1742

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 7 commits into from
Oct 1, 2024

Conversation

eramongodb
Copy link
Contributor

@eramongodb eramongodb commented Oct 1, 2024

Summary

This PR resolves CDRIVER-5740. Verified by this patch.

Fixes the purple wall currently blocking C Driver EVG tasks.

Observed that recent updates to DET scripts (in order to keep up with updates to mongo-orchestration) were frequently breaking C Driver EVG tasks, but not C++ Driver EVG tasks. The difference appeared to be due to the C++ Driver EVG scripts using run-orchestration.sh to start mongo-orchestration (as intended/expected by DET scripts), whereas the C Driver is using its own manual implementation of the same initialization routines.

This PR updates integration-tests.sh to use run-orchestration.sh to better keep up with DET script updates in a compatible manner.

run-orchestration.sh

Using the C++ Driver's implementation as reference, run-orchestration.sh has been updated as follows:

  • MONGO_ORCHESTRATION_HOME: defined as "$DRIVERS_TOOLS/.evergreen/orchestration" (instead of C:\data\MO or $(pwd)/MO depending on the distro) for consistency with DET scripts and the C++ Driver.
    • All subsequent path handling of the MO home directory are left to run-orchestration.sh.
  • ORCHESTRATION_FILE: defined by run-orchestration.sh except when an explicit config is required (i.e. versioned API tasks, Auth AWS tasks, and ocsp-* tasks).
    • The .json file extension needed to be included for compatibility.
    • Config files are under $DRIVERS_TOOLS/.evergreen/orchestration (the new MONGO_ORCHESTRATION_HOME).
  • MONGODB_BINARIES: defined as $DRIVERS_TOOLS/mongodb/bin for consistency with DET scripts and the C++ Driver.
    • This path also provides crypt_shared and mongocryptd. run-tests.sh needed to be updated accordingly.

Versioned API Tests

A currently-unaddressed issue with run-orchestration.sh (which is blocked on a fix to mongo-orchestration) does not allow testing Stable API with SSL/TLS enabled in mongo-orchestration due to lack of a tls URI option in the connection string.

This PR uses a workaround that adds --tls --tlsAllowInvalidCertificates to the mongosh command used to set "requireApiVersion": 1 in run-orchestration.sh. This should hopefully be made unnecessary in the near future.

The test-versioned-api-* tasks are updated to use a build with SSL/TLS support enabled, but does not utilize these features during test execution. Using AUTH without SSL is a bit unusual for C Driver tests, so comments were added to the task definition accordingly.

Other Notes

  • The AUTHSOURCE env var appears to be obsolete and was therefore removed.
  • Removed references to the non-existent snappy-zlib-zstd orchestration config (logs indicate the basic config file was being used instead...?).
  • Added --max-time to the MO wait routine's curl command.
  • The single task failure in the veryfing patch appears to be due to mongocryptd --fork, but it is unclear to me what the root cause may be. It appears to be a bit flaky.

@eramongodb eramongodb requested a review from kevinAlbs October 1, 2024 14:33
@eramongodb eramongodb self-assigned this Oct 1, 2024
@eramongodb
Copy link
Contributor Author

The --tls --tlsAllowInvalidCertificates workaround appears to be sufficient to support SSL/TLS testing by the C Driver as verified by this patch. Reverted the task definition changes to their original state.

@eramongodb
Copy link
Contributor Author

Latest patch reveals Ubuntu 18.04 still has some issues with killing existing processes occupying server port(s). This issue should eventually be addressed by DET scripts (not us).

Copy link
Collaborator

@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.

Exciting! This has been a long-standing want (recalling CDRIVER-2707).

# IPV4_ONLY: off, on
# SSL: openssl, darwinssl, winssl, nossl
# ORCHESTRATION_FILE: <file name in orchestration_configs/ without .json>
# If this is not set, the file name is constructed from other options.
# ORCHESTRATION_FILE: <file name in DET configs/${TOPOLOGY}s/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The C driver contains orchestration configs that are not in DET:

  • orchestration_configs/servers/basic-ipv4-only.json
  • orchestration_configs/servers/snappy.json
  • orchestration_configs/servers/zstd.json

On further look, I do not the extra configs provide much meaningful test coverage.

snappy and zstd may not be relevant for modern servers. The default enables all three.

Tasks specifying IPV4_ONLY (to use basic-ipv4-only) also specify the URI mongodb://127.0.0.1, so I expect those tasks connect with IPv4 without extra server configuration.

Suggest:

  • Remove C driver orchestration_configs.
  • Remove mention of IPV4_ONLY.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. Done as suggested.

I preserved the MONGOC_CHECK_IPV6 env var (formerly conditioned on "$IPV4_ONLY" != "on"; now unconditionally defined in EVG scripts) in case there are downstream users that still depend on it. LMK if you would like this removed from the test suite as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I slightly prefer removing MONGOC_CHECK_IPV6. I do not think preserving test environment variables is needed, and I expect removing MONGOC_CHECK_IPV6 would not be disruptive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@eramongodb eramongodb requested a review from kevinAlbs October 1, 2024 17:53
@eramongodb
Copy link
Contributor Author

Latest changes verified by this patch.

# IPV4_ONLY: off, on
# SSL: openssl, darwinssl, winssl, nossl
# ORCHESTRATION_FILE: <file name in orchestration_configs/ without .json>
# If this is not set, the file name is constructed from other options.
# ORCHESTRATION_FILE: <file name in DET configs/${TOPOLOGY}s/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I slightly prefer removing MONGOC_CHECK_IPV6. I do not think preserving test environment variables is needed, and I expect removing MONGOC_CHECK_IPV6 would not be disruptive.

@eramongodb eramongodb merged commit ebfc4da into mongodb:master Oct 1, 2024
1 check was pending
@eramongodb eramongodb deleted the cdriver-5740 branch October 1, 2024 18:55
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.

2 participants