-
-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: two apache fixes after putting in production (#11230)
There were some surprises as we put in production, so here are the fix. There are also additional files that were modified directly in production.
- Loading branch information
Showing
7 changed files
with
72 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
conf/well-known/off-apple-developer-merchantid-domain-association
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ function check_args { | |
exit -2 | ||
fi | ||
ZFS_PATH="/mnt/$SERVICE" | ||
OFF_ZFS_PATH="/mnt/off" | ||
IS_PRO=$(is_pro "$SERVICE") | ||
NON_PRO_SERVICE=$(non_pro_name "$SERVICE") | ||
PRO_SERVICE=$NON_PRO_SERVICE"-pro" | ||
|
@@ -79,15 +80,15 @@ function check_args { | |
|
||
function compute_services { | ||
# systemd services to check for symlinks | ||
SYSTEMD_LINKS+=( [email protected] nginx.service.d apache2.service [email protected] [email protected].d [email protected] ) | ||
SYSTEMD_LINKS+=( [email protected] nginx.service.d apache2.service.d [email protected] ) | ||
# units that must be active (and enabled) | ||
SYSTEMD_UNITS_ACTIVE=( nginx.service apache2.service cloud_vision_ocr@$SERVICE.service ) | ||
# units that must be enabled | ||
SYSTEMD_UNITS_ENABLED=( ) | ||
# priority request on off | ||
if [[ $SERVICE = "off" ]] | ||
then | ||
SYSTEMD_LINKS+=( [email protected] ) | ||
SYSTEMD_LINKS+=( [email protected] [email protected] ) | ||
SYSTEMD_UNITS_ACTIVE+=( [email protected] prometheus-apache-exporter.service [email protected] ) | ||
fi | ||
if [[ -z $IS_PRO ]] | ||
|
@@ -111,7 +112,6 @@ function compute_expected_links { | |
EXPECTED_LINKS["$REPO_PATH/log.conf"]="$REPO_PATH/conf/$SERVICE-log.conf" | ||
EXPECTED_LINKS["$REPO_PATH/minion_log.conf"]="$REPO_PATH/conf/$SERVICE-minion_log.conf" | ||
# config | ||
EXPECTED_LINKS["$REPO_PATH/lib/ProductOpener/Config.pm"]="$REPO_PATH/lib/ProductOpener/Config_$NON_PRO_SERVICE.pm" | ||
EXPECTED_LINKS["$REPO_PATH/po/site-specific"]="$REPO_PATH/po/$SERVICE_LONG_NAME" | ||
# off-web | ||
EXPECTED_LINKS["$REPO_PATH/lang"]="/srv/openfoodfacts-web/lang" | ||
|
@@ -120,8 +120,9 @@ function compute_expected_links { | |
EXPECTED_LINKS["$REPO_PATH/data"]="$ZFS_PATH/data" | ||
EXPECTED_LINKS["$REPO_PATH/orgs"]="$ZFS_PATH/orgs" | ||
EXPECTED_LINKS["$REPO_PATH/users"]="$ZFS_PATH/users" | ||
EXPECTED_LINKS["$REPO_PATH/products"]="$ZFS_PATH/products" | ||
EXPECTED_LINKS["$REPO_PATH/html/images/products"]="$ZFS_PATH/images/products" | ||
# image and products are now merges on off zfs storage | ||
EXPECTED_LINKS["$REPO_PATH/products"]="$OFF_ZFS_PATH/products" | ||
EXPECTED_LINKS["$REPO_PATH/html/images/products"]="$OFF_ZFS_PATH/images/products" | ||
# public data | ||
EXPECTED_LINKS["$REPO_PATH/html/data"]="$ZFS_PATH/html_data" | ||
EXPECTED_LINKS["$REPO_PATH/html/exports"]="$ZFS_PATH/html_data/exports" | ||
|
@@ -203,12 +204,9 @@ function compute_expected_links { | |
EXPECTED_LINKS["/etc/apache2/off-envvars"]="$REPO_PATH/conf/apache-2.4/off-envvars" | ||
EXPECTED_LINKS["/etc/apache2/mods-available/mpm_prefork.conf"]="$REPO_PATH/conf/apache-2.4/mpm_prefork.conf" | ||
EXPECTED_LINKS["/etc/apache2/sites-enabled/$SERVICE.conf"]="$REPO_PATH/conf/apache-2.4/sites-available/$SERVICE.conf" | ||
EXPECTED_LINKS["/etc/apache2-standard"]="/etc/apache-2" | ||
EXPECTED_LINKS["/var/log/apache2-standard"]="/var/log/apache-2" | ||
if [[ $SERVICE = "off" ]] | ||
then | ||
EXPECTED_LINKS["/etc/apache2-priority"]="/etc/apache-2" | ||
EXPECTED_LINKS["/var/log/apache2-standard"]="/var/log/apache-2" | ||
EXPECTED_LINKS["/etc/apache2-priority"]="/etc/apache2" | ||
fi | ||
|
||
for systemd_unit in {apache2,nginx}.service.d ${SYSTEMD_LINKS[@]} | ||
|
@@ -244,11 +242,11 @@ function check_links { | |
GOT_ERROR=1 | ||
if [[ ! -e $target ]] | ||
then | ||
>&2 echo "ERROR: link $target does not exist" | ||
>&2 echo "ERROR: link $target does not exist (should link to $destination)" | ||
else | ||
if [[ ! -e $destination ]] | ||
then | ||
>&2 echo "ERROR: link $destination does not exist" | ||
>&2 echo "ERROR: link $destination does not exist (while $target links to it)" | ||
else | ||
>&2 echo "ERROR: link instead of $target -> $destination, got $(readlink -f $target) instead" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.