From 143566fb72513cad71899cdf59283750eb15bb49 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Fri, 5 Apr 2024 15:06:12 -0400 Subject: [PATCH] 21583: Configure Passenger with passenger_preload_bundler This helps avoid situations where Passenger loads gems that create a conflict with our bundle. We're currently seeing this with the base64 gem, where Passenger on Ruby 3.[0-3] can load the version shipped with that Ruby before our RailsAPI bundle gets loaded. This causes an error: [ E 2024-03-12 15:12:44.8347 907382/Tf age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/arvados-api/current: The application encountered the following error: You have already activated base64 0.1.1, but your Gemfile requires base64 0.2.0. Since base64 is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports base64 as a default gem. (Gem::LoadError) Arvados-DCO-1.1-Signed-off-by: Brett Smith --- doc/admin/config-urls.html.textile.liquid | 1 + doc/install/install-api-server.html.textile.liquid | 1 + .../multi_host/aws/pillars/nginx_api_configuration.sls | 1 + .../multiple_hostnames/pillars/nginx_api_configuration.sls | 1 + .../single_hostname/pillars/nginx_api_configuration.sls | 1 + .../single_hostname/pillars/nginx_workbench_configuration.sls | 1 + 6 files changed, 6 insertions(+) diff --git a/doc/admin/config-urls.html.textile.liquid b/doc/admin/config-urls.html.textile.liquid index 3cf6e79722..7c998061fe 100644 --- a/doc/admin/config-urls.html.textile.liquid +++ b/doc/admin/config-urls.html.textile.liquid @@ -174,6 +174,7 @@ server { index index.html index.htm index.php; passenger_enabled on; + passenger_preload_bundler on; # If you are using RVM, uncomment the line below. # If you're using system ruby, leave it commented out. diff --git a/doc/install/install-api-server.html.textile.liquid b/doc/install/install-api-server.html.textile.liquid index d1d1478180..8e4f347d49 100644 --- a/doc/install/install-api-server.html.textile.liquid +++ b/doc/install/install-api-server.html.textile.liquid @@ -178,6 +178,7 @@ server { index index.html index.htm index.php; passenger_enabled on; + passenger_preload_bundler on; # If you are using RVM, uncomment the line below. # If you're using system ruby, leave it commented out. diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_api_configuration.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_api_configuration.sls index bfe0386e93..d27552f6fb 100644 --- a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_api_configuration.sls +++ b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_api_configuration.sls @@ -25,4 +25,5 @@ nginx: - access_log: /var/log/nginx/api.__DOMAIN__-upstream.access.log combined - error_log: /var/log/nginx/api.__DOMAIN__-upstream.error.log - passenger_enabled: 'on' + - passenger_preload_bundler: 'on' - client_max_body_size: 128m diff --git a/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_api_configuration.sls b/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_api_configuration.sls index 54087f6d6d..b567af90d7 100644 --- a/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_api_configuration.sls +++ b/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_api_configuration.sls @@ -31,4 +31,5 @@ nginx: - access_log: /var/log/nginx/api.__CLUSTER__.__DOMAIN__-upstream.access.log combined - error_log: /var/log/nginx/api.__CLUSTER__.__DOMAIN__-upstream.error.log - passenger_enabled: 'on' + - passenger_preload_bundler: 'on' - client_max_body_size: 128m diff --git a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_api_configuration.sls b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_api_configuration.sls index 04195ae5b9..3bf7bf54ab 100644 --- a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_api_configuration.sls +++ b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_api_configuration.sls @@ -31,4 +31,5 @@ nginx: - access_log: /var/log/nginx/api.__CLUSTER__.__DOMAIN__-upstream.access.log combined - error_log: /var/log/nginx/api.__CLUSTER__.__DOMAIN__-upstream.error.log - passenger_enabled: 'on' + - passenger_preload_bundler: 'on' - client_max_body_size: 128m diff --git a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench_configuration.sls b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench_configuration.sls index 59fb43e57a..5d5d0af668 100644 --- a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench_configuration.sls +++ b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench_configuration.sls @@ -78,6 +78,7 @@ nginx: - root: /var/www/arvados-workbench/current/public - index: index.html index.htm - passenger_enabled: 'on' + - passenger_preload_bundler: 'on' # yamllint disable-line rule:line-length - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.access.log combined - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.error.log -- 2.30.2