Skip to content

Commit 46e4cbb

Browse files
authored
fix: add RHEL9 support for ppc64le and s390x MONGOSH-1680 (#2504)
* patch the openssl included in node to ignore redhat's rh-allow-sha1-signatures config * add rhel9 e2e and smoke tests for ppc64le/s390x * remove disable_openssl_shared_config_for_bundled_openssl and disableOpenSslSharedConfig
1 parent 9f91df4 commit 46e4cbb

File tree

7 files changed

+68
-97
lines changed

7 files changed

+68
-97
lines changed

.evergreen.yml

Lines changed: 32 additions & 66 deletions
Large diffs are not rendered by default.

.evergreen/build-variants/e2e-tests-build-variants.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export type E2ETestsBuildVariant = {
66
executableOsId: string;
77
mVersion: string;
88
tags?: string[];
9-
disableOpenSslSharedConfig?: boolean;
109
fips?: boolean;
1110
additionalTasks?: string[];
1211
};

.evergreen/build-variants/e2e-tests-build-variants.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ exports.E2E_TESTS_BUILD_VARIANTS = [
2828
displayName: 'RHEL 9.0 x64',
2929
runOn: 'rhel90-small',
3030
tags: ['nightly-driver'],
31-
disableOpenSslSharedConfig: true,
3231
executableOsId: 'linux-x64',
3332
mVersion: '7.0.x',
3433
},
3534
{
3635
displayName: 'RHEL 9.3 x64',
3736
runOn: 'rhel93-small',
3837
tags: ['nightly-driver'],
39-
disableOpenSslSharedConfig: true,
4038
executableOsId: 'linux-x64',
4139
mVersion: 'stable',
4240
},
@@ -181,7 +179,6 @@ exports.E2E_TESTS_BUILD_VARIANTS = [
181179
displayName: 'Amazon Linux 2023 x64',
182180
runOn: 'amazon2023.0-small',
183181
tags: ['nightly-driver'],
184-
disableOpenSslSharedConfig: true,
185182
executableOsId: 'linux-x64',
186183
mVersion: 'stable',
187184
},
@@ -253,7 +250,6 @@ exports.E2E_TESTS_BUILD_VARIANTS = [
253250
{
254251
displayName: 'Amazon Linux 2023 arm64',
255252
runOn: 'amazon2023.0-arm64-small',
256-
disableOpenSslSharedConfig: true,
257253
executableOsId: 'linux-arm64',
258254
mVersion: 'stable',
259255
},
@@ -266,29 +262,25 @@ exports.E2E_TESTS_BUILD_VARIANTS = [
266262
{
267263
displayName: 'RHEL 9.0 arm64',
268264
runOn: 'rhel90-arm64-small',
269-
disableOpenSslSharedConfig: true,
270265
executableOsId: 'linux-arm64',
271266
mVersion: '7.0.x',
272267
},
273268
{
274269
displayName: 'RHEL 9.0 arm64',
275270
runOn: 'rhel90-arm64-small',
276-
disableOpenSslSharedConfig: true,
277271
sharedOpenSsl: 'openssl3',
278272
executableOsId: 'linux-arm64-openssl3',
279273
mVersion: '7.0.x',
280274
},
281275
{
282276
displayName: 'RHEL 9.3 arm64',
283277
runOn: 'rhel93-arm64-small',
284-
disableOpenSslSharedConfig: true,
285278
executableOsId: 'linux-arm64',
286279
mVersion: 'stable',
287280
},
288281
{
289282
displayName: 'RHEL 9.3 arm64',
290283
runOn: 'rhel93-arm64-small',
291-
disableOpenSslSharedConfig: true,
292284
sharedOpenSsl: 'openssl3',
293285
executableOsId: 'linux-arm64-openssl3',
294286
mVersion: 'stable',
@@ -299,6 +291,12 @@ exports.E2E_TESTS_BUILD_VARIANTS = [
299291
executableOsId: 'linux-ppc64le',
300292
mVersion: 'stable',
301293
},
294+
{
295+
displayName: 'RHEL 9 PPC',
296+
runOn: 'rhel9-power-small',
297+
executableOsId: 'linux-ppc64le',
298+
mVersion: 'stable',
299+
},
302300
{
303301
displayName: 'RHEL 7 s390x',
304302
runOn: 'rhel7-zseries-large',
@@ -311,6 +309,12 @@ exports.E2E_TESTS_BUILD_VARIANTS = [
311309
executableOsId: 'linux-s390x',
312310
mVersion: 'stable',
313311
},
312+
{
313+
displayName: 'RHEL 9 s390x',
314+
runOn: 'rhel9-zseries-small',
315+
executableOsId: 'linux-s390x',
316+
mVersion: 'stable',
317+
},
314318
{
315319
displayName: 'MacOS 14 x64',
316320
runOn: 'macos-14',

.evergreen/evergreen.yml.in

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ functions:
487487
NODE_JS_VERSION: ${node_js_version}
488488
AWS_AUTH_IAM_ACCESS_KEY_ID: ${devtools_ci_aws_key}
489489
AWS_AUTH_IAM_SECRET_ACCESS_KEY: ${devtools_ci_aws_secret}
490-
DISABLE_OPENSSL_SHARED_CONFIG_FOR_BUNDLED_OPENSSL: ${disable_openssl_shared_config_for_bundled_openssl}
491490
TASK_NAME: ${task_name}
492491

493492
###
@@ -1044,8 +1043,6 @@ functions:
10441043
script: |
10451044
set -e
10461045
set -x
1047-
# fix rh-allow-sha1-signatures error, see run-e2e-tests.sh
1048-
export OPENSSL_CONF=""
10491046
npx -y mongodb-runner exec -t standalone --version=7.0.x-enterprise -- \
10501047
sh -c 'MONGOSH_SMOKE_TEST_SERVER="$MONGODB_URI" ./dist/mongosh --perfTests > perf_results.json'
10511048
env:
@@ -1241,7 +1238,6 @@ tasks:
12411238
node_js_version: ${node_js_version}
12421239
mongosh_server_test_version: ${mongosh_server_test_version}
12431240
mongosh_test_e2e_force_fips: ${mongosh_test_e2e_force_fips}
1244-
disable_openssl_shared_config_for_bundled_openssl: ${disable_openssl_shared_config_for_bundled_openssl|false}
12451241
<% } %>
12461242
- name: perf_tests_linux_x64
12471243
tags: ["perf-test"]
@@ -1550,7 +1546,6 @@ buildvariants:
15501546
tags: <% out([...(variant.tags ?? [])]) %>
15511547
expansions:
15521548
executable_os_id: "<% out(variant.executableOsId) %>"
1553-
disable_openssl_shared_config_for_bundled_openssl: <% out(variant.disableOpenSslSharedConfig || false) %>
15541549
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
15551550
mongosh_server_test_version: "<% out(variant.mVersion) %>-enterprise"
15561551
mongosh_test_e2e_force_fips: "<% out(variant.fips ? '1' : '') %>"
@@ -1718,12 +1713,21 @@ buildvariants:
17181713
run_on: rhel8-zseries-small
17191714
tasks:
17201715
- name: pkg_test_rpmextract_rpm_s390x
1716+
- name: pkg_smoke_tests_rhel9_s390x
1717+
display_name: "package smoke tests (RHEL 9 s390x)"
1718+
run_on: rhel9-zseries-small
1719+
tasks:
1720+
- name: pkg_test_rpmextract_rpm_s390x
17211721
- name: pkg_smoke_tests_rhel8_ppc64le
17221722
display_name: "package smoke tests (RHEL 8 ppc64le)"
17231723
run_on: rhel8-power-small
17241724
tasks:
17251725
- name: pkg_test_rpmextract_rpm_ppc64le
1726-
1726+
- name: pkg_smoke_tests_rhel9_ppc64le
1727+
display_name: "package smoke tests (RHEL 9 ppc64le)"
1728+
run_on: rhel9-power-small
1729+
tasks:
1730+
- name: pkg_test_rpmextract_rpm_ppc64le
17271731
- name: draft_publish_release
17281732
display_name: "Draft/Publish Release"
17291733
run_on: ubuntu2004-small

.evergreen/run-e2e-tests.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@ set -e
33
export NODE_JS_VERSION=${NODE_JS_VERSION}
44
export TASK_NAME=${TASK_NAME}
55

6-
if [[ "$DISABLE_OPENSSL_SHARED_CONFIG_FOR_BUNDLED_OPENSSL" == "true" ]] && [[ ! "$TASK_NAME" =~ openssl(3|11) ]]; then
7-
# On RHEL9 and based-distros, an additional configuration option
8-
# `rh-allow-sha1-signatures` is present which is not recognizable to the
9-
# OpenSSL version bundled with Node.js and hence the mongosh binary fails to
10-
# run. Explicitly on those hosts we disable effect of --openssl-shared-config
11-
# flag which is pushed by boxednode when bundling Node.js
12-
export OPENSSL_CONF=""
13-
fi
14-
156
source .evergreen/setup-env.sh
167
dist/mongosh --version
178

scripts/docker/amazonlinux2023-rpm.Dockerfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
FROM amazonlinux:2023
22

3-
# On RHEL9 and based-distros, an additional configuration option
4-
# `rh-allow-sha1-signatures` is present which is not recognizable to the
5-
# OpenSSL version bundled with Node.js and hence the mongosh binary fails to
6-
# run. Explicitly on those hosts we disable effect of --openssl-shared-config
7-
# flag which is pushed by boxednode when bundling Node.js
8-
ENV OPENSSL_CONF=""
9-
103
ARG artifact_url=""
114
ADD ${artifact_url} /tmp
125
ADD node_modules /usr/share/mongodb-crypt-library-version/node_modules
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/deps/openssl/openssl/crypto/evp/evp_cnf.c b/deps/openssl/openssl/crypto/evp/evp_cnf.c
2+
index 0e7fe64cf9..bdba3638ee 100644
3+
--- a/deps/openssl/openssl/crypto/evp/evp_cnf.c
4+
+++ b/deps/openssl/openssl/crypto/evp/evp_cnf.c
5+
@@ -57,6 +57,9 @@ static int alg_module_init(CONF_IMODULE *md, const CONF *cnf)
6+
ERR_raise(ERR_LIB_EVP, EVP_R_SET_DEFAULT_PROPERTY_FAILURE);
7+
return 0;
8+
}
9+
+ } else if (strcmp(oval->name, "rh-allow-sha1-signatures") == 0) {
10+
+ /* allow and then ignore this option */
11+
+
12+
} else {
13+
ERR_raise_data(ERR_LIB_EVP, EVP_R_UNKNOWN_OPTION,
14+
"name=%s, value=%s", oval->name, oval->value);

0 commit comments

Comments
 (0)