From 5e529fc54f557eabb67d56e539d0d42b301769c4 Mon Sep 17 00:00:00 2001 From: Joe McClure Date: Mon, 5 Feb 2024 13:17:48 -0500 Subject: [PATCH 1/3] Add WARM_ENDPOINT option --- README.md | 6 +++ .../kernel/helpers/build/configure.sh | 6 +++ .../kernel/helpers/build/populate_scc.sh | 38 +++++++++++++++---- ga/23.0.0.9/kernel/helpers/build/configure.sh | 6 +++ .../kernel/helpers/build/populate_scc.sh | 38 +++++++++++++++---- ga/24.0.0.1/kernel/helpers/build/configure.sh | 6 +++ .../kernel/helpers/build/populate_scc.sh | 38 +++++++++++++++---- ga/latest/kernel/helpers/build/configure.sh | 6 +++ .../kernel/helpers/build/populate_scc.sh | 38 +++++++++++++++---- 9 files changed, 154 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index d66285a5b..d17f1333c 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,12 @@ This feature can be controlled via the following variables: * `SCC_SIZE` (environment variable) * Description: The size of the application-specific SCC layer in the image. This value is only used if `TRIM_SCC` is set to `"false"`. * Default: `"80m"`. +* `WARM_ENDPOINT` (environment variable) + * Description: If `"true"`, curl will be used to access the WARM_ENDPOINT_URL (see below) during the population of the SCC. This will increase the amount of information in the SCC and improve first request time in subsequent starts of the image. + * Default: `"true"`. +* `WARM_ENDPOINT_URL` (enviornment variable) + * Description: The URL to access during SCC population if WARM_ENDPOINT is true. + * Default: `"localhost:9080/"`. ## Logging diff --git a/ga/23.0.0.12/kernel/helpers/build/configure.sh b/ga/23.0.0.12/kernel/helpers/build/configure.sh index a13d4d8a2..750dc7611 100755 --- a/ga/23.0.0.12/kernel/helpers/build/configure.sh +++ b/ga/23.0.0.12/kernel/helpers/build/configure.sh @@ -179,6 +179,12 @@ function main() { if [ ! "$SCC_SIZE" = "" ]; then cmd+=" -s $SCC_SIZE" fi + if [ "$WARM_ENDPOINT" = "true" ]; then + cmd+=" -w" + fi + if [ ! "$WARM_ENDPOINT_URL" = "" ]; then + cmd+=" -u $WARM_ENDPOINT_URL" + fi eval $cmd fi } diff --git a/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh b/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh index 3c07a4e92..647afa12e 100755 --- a/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh +++ b/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Copyright IBM Corporation 2020. +# (C) Copyright IBM Corporation 2020, 2024 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ set -Eeox pipefail SCC_SIZE="80m" # Default size of the SCC layer. ITERATIONS=2 # Number of iterations to run to populate it. TRIM_SCC=yes # Trim the SCC to eliminate any wasted space. +WARM_ENDPOINT=true +WARM_ENDPOINT_URL=localhost:9080/ # If this directory exists and has at least ug=rwx permissions, assume the base image includes an SCC called 'openj9_system_scc' and build on it. # If not, build on our own SCC. @@ -48,7 +50,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess" DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy" PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats" -while getopts ":i:s:tdh" OPT +while getopts ":i:s:u:tdhw" OPT do case "$OPT" in i) @@ -64,13 +66,21 @@ do d) TRIM_SCC=no ;; + w) + WARM_ENDPOINT=true + ;; + u) + WARM_ENDPOINT_URL="${OPTARG}" + ;; h) echo \ -"Usage: $0 [-i iterations] [-s size] [-t] [-d] +"Usage: $0 [-i iterations] [-s size] [-t] [-d] [-w] [-u url] -i Number of iterations to run to populate the SCC. (Default: $ITERATIONS) -s Size of the SCC in megabytes (m suffix required). (Default: $SCC_SIZE) -t Trim the SCC to eliminate most of the free space, if any. -d Don't trim the SCC. + -w Use curl to warm an endpoint during SCC creation. (Default: $WARM_ENDPOINT) + -u The URL endpoint to warm during SCC creation. (Default: $WARM_ENDPOINT_URL) Trimming enabled=$TRIM_SCC" exit 1 @@ -97,8 +107,15 @@ if [ $TRIM_SCC == yes ] then echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE." # Populate the newly created class cache layer. - /opt/ibm/wlp/bin/server start - /opt/ibm/wlp/bin/server stop + /opt/ol/wlp/bin/server start + + if [ ${WARM_ENDPOINT} == true ] + then + curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" + fi + + /opt/ol/wlp/bin/server stop + # Find out how full it is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` echo "SCC layer is $FULL% full. Destroying layer." @@ -121,8 +138,14 @@ fi # Server start/stop to populate the /output/workarea and make subsequent server starts faster. for ((i=0; i<$ITERATIONS; i++)) do - /opt/ibm/wlp/bin/server start - /opt/ibm/wlp/bin/server stop + /opt/ol/wlp/bin/server start + + if [ ${WARM_ENDPOINT} == true ] + then + curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" + fi + + /opt/ol/wlp/bin/server stop done # restore umask @@ -135,6 +158,7 @@ then chmod -R g+rwx /output/resources fi + # Tell the user how full the final layer is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` echo "SCC layer is $FULL% full." diff --git a/ga/23.0.0.9/kernel/helpers/build/configure.sh b/ga/23.0.0.9/kernel/helpers/build/configure.sh index b2480a5cd..cd4c210c3 100755 --- a/ga/23.0.0.9/kernel/helpers/build/configure.sh +++ b/ga/23.0.0.9/kernel/helpers/build/configure.sh @@ -176,6 +176,12 @@ function main() { if [ ! "$SCC_SIZE" = "" ]; then cmd+=" -s $SCC_SIZE" fi + if [ "$WARM_ENDPOINT" = "true" ]; then + cmd+=" -w" + fi + if [ ! "$WARM_ENDPOINT_URL" = "" ]; then + cmd+=" -u $WARM_ENDPOINT_URL" + fi eval $cmd fi } diff --git a/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh b/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh index 3c07a4e92..647afa12e 100755 --- a/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh +++ b/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Copyright IBM Corporation 2020. +# (C) Copyright IBM Corporation 2020, 2024 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ set -Eeox pipefail SCC_SIZE="80m" # Default size of the SCC layer. ITERATIONS=2 # Number of iterations to run to populate it. TRIM_SCC=yes # Trim the SCC to eliminate any wasted space. +WARM_ENDPOINT=true +WARM_ENDPOINT_URL=localhost:9080/ # If this directory exists and has at least ug=rwx permissions, assume the base image includes an SCC called 'openj9_system_scc' and build on it. # If not, build on our own SCC. @@ -48,7 +50,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess" DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy" PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats" -while getopts ":i:s:tdh" OPT +while getopts ":i:s:u:tdhw" OPT do case "$OPT" in i) @@ -64,13 +66,21 @@ do d) TRIM_SCC=no ;; + w) + WARM_ENDPOINT=true + ;; + u) + WARM_ENDPOINT_URL="${OPTARG}" + ;; h) echo \ -"Usage: $0 [-i iterations] [-s size] [-t] [-d] +"Usage: $0 [-i iterations] [-s size] [-t] [-d] [-w] [-u url] -i Number of iterations to run to populate the SCC. (Default: $ITERATIONS) -s Size of the SCC in megabytes (m suffix required). (Default: $SCC_SIZE) -t Trim the SCC to eliminate most of the free space, if any. -d Don't trim the SCC. + -w Use curl to warm an endpoint during SCC creation. (Default: $WARM_ENDPOINT) + -u The URL endpoint to warm during SCC creation. (Default: $WARM_ENDPOINT_URL) Trimming enabled=$TRIM_SCC" exit 1 @@ -97,8 +107,15 @@ if [ $TRIM_SCC == yes ] then echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE." # Populate the newly created class cache layer. - /opt/ibm/wlp/bin/server start - /opt/ibm/wlp/bin/server stop + /opt/ol/wlp/bin/server start + + if [ ${WARM_ENDPOINT} == true ] + then + curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" + fi + + /opt/ol/wlp/bin/server stop + # Find out how full it is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` echo "SCC layer is $FULL% full. Destroying layer." @@ -121,8 +138,14 @@ fi # Server start/stop to populate the /output/workarea and make subsequent server starts faster. for ((i=0; i<$ITERATIONS; i++)) do - /opt/ibm/wlp/bin/server start - /opt/ibm/wlp/bin/server stop + /opt/ol/wlp/bin/server start + + if [ ${WARM_ENDPOINT} == true ] + then + curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" + fi + + /opt/ol/wlp/bin/server stop done # restore umask @@ -135,6 +158,7 @@ then chmod -R g+rwx /output/resources fi + # Tell the user how full the final layer is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` echo "SCC layer is $FULL% full." diff --git a/ga/24.0.0.1/kernel/helpers/build/configure.sh b/ga/24.0.0.1/kernel/helpers/build/configure.sh index a13d4d8a2..750dc7611 100755 --- a/ga/24.0.0.1/kernel/helpers/build/configure.sh +++ b/ga/24.0.0.1/kernel/helpers/build/configure.sh @@ -179,6 +179,12 @@ function main() { if [ ! "$SCC_SIZE" = "" ]; then cmd+=" -s $SCC_SIZE" fi + if [ "$WARM_ENDPOINT" = "true" ]; then + cmd+=" -w" + fi + if [ ! "$WARM_ENDPOINT_URL" = "" ]; then + cmd+=" -u $WARM_ENDPOINT_URL" + fi eval $cmd fi } diff --git a/ga/24.0.0.1/kernel/helpers/build/populate_scc.sh b/ga/24.0.0.1/kernel/helpers/build/populate_scc.sh index 675415f29..c2de3f4a5 100755 --- a/ga/24.0.0.1/kernel/helpers/build/populate_scc.sh +++ b/ga/24.0.0.1/kernel/helpers/build/populate_scc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Copyright IBM Corporation 2020. +# (C) Copyright IBM Corporation 2020, 2024 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ set -Eeox pipefail SCC_SIZE="80m" # Default size of the SCC layer. ITERATIONS=2 # Number of iterations to run to populate it. TRIM_SCC=yes # Trim the SCC to eliminate any wasted space. +WARM_ENDPOINT=true +WARM_ENDPOINT_URL=localhost:9080/ # If this directory exists and has at least ug=rwx permissions, assume the base image includes an SCC called 'openj9_system_scc' and build on it. # If not, build on our own SCC. @@ -49,7 +51,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess" DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy" PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats" -while getopts ":i:s:tdh" OPT +while getopts ":i:s:u:tdhw" OPT do case "$OPT" in i) @@ -65,13 +67,21 @@ do d) TRIM_SCC=no ;; + w) + WARM_ENDPOINT=true + ;; + u) + WARM_ENDPOINT_URL="${OPTARG}" + ;; h) echo \ -"Usage: $0 [-i iterations] [-s size] [-t] [-d] +"Usage: $0 [-i iterations] [-s size] [-t] [-d] [-w] [-u url] -i Number of iterations to run to populate the SCC. (Default: $ITERATIONS) -s Size of the SCC in megabytes (m suffix required). (Default: $SCC_SIZE) -t Trim the SCC to eliminate most of the free space, if any. -d Don't trim the SCC. + -w Use curl to warm an endpoint during SCC creation. (Default: $WARM_ENDPOINT) + -u The URL endpoint to warm during SCC creation. (Default: $WARM_ENDPOINT_URL) Trimming enabled=$TRIM_SCC" exit 1 @@ -98,8 +108,15 @@ if [ $TRIM_SCC == yes ] then echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE." # Populate the newly created class cache layer. - /opt/ibm/wlp/bin/server start - /opt/ibm/wlp/bin/server stop + /opt/ol/wlp/bin/server start + + if [ ${WARM_ENDPOINT} == true ] + then + curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" + fi + + /opt/ol/wlp/bin/server stop + # Find out how full it is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` echo "SCC layer is $FULL% full. Destroying layer." @@ -122,8 +139,14 @@ fi # Server start/stop to populate the /output/workarea and make subsequent server starts faster. for ((i=0; i<$ITERATIONS; i++)) do - /opt/ibm/wlp/bin/server start - /opt/ibm/wlp/bin/server stop + /opt/ol/wlp/bin/server start + + if [ ${WARM_ENDPOINT} == true ] + then + curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" + fi + + /opt/ol/wlp/bin/server stop done # restore umask @@ -136,6 +159,7 @@ then chmod -R g+rwx /output/resources fi + # Tell the user how full the final layer is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` echo "SCC layer is $FULL% full." diff --git a/ga/latest/kernel/helpers/build/configure.sh b/ga/latest/kernel/helpers/build/configure.sh index a13d4d8a2..750dc7611 100755 --- a/ga/latest/kernel/helpers/build/configure.sh +++ b/ga/latest/kernel/helpers/build/configure.sh @@ -179,6 +179,12 @@ function main() { if [ ! "$SCC_SIZE" = "" ]; then cmd+=" -s $SCC_SIZE" fi + if [ "$WARM_ENDPOINT" = "true" ]; then + cmd+=" -w" + fi + if [ ! "$WARM_ENDPOINT_URL" = "" ]; then + cmd+=" -u $WARM_ENDPOINT_URL" + fi eval $cmd fi } diff --git a/ga/latest/kernel/helpers/build/populate_scc.sh b/ga/latest/kernel/helpers/build/populate_scc.sh index 675415f29..c2de3f4a5 100755 --- a/ga/latest/kernel/helpers/build/populate_scc.sh +++ b/ga/latest/kernel/helpers/build/populate_scc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Copyright IBM Corporation 2020. +# (C) Copyright IBM Corporation 2020, 2024 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ set -Eeox pipefail SCC_SIZE="80m" # Default size of the SCC layer. ITERATIONS=2 # Number of iterations to run to populate it. TRIM_SCC=yes # Trim the SCC to eliminate any wasted space. +WARM_ENDPOINT=true +WARM_ENDPOINT_URL=localhost:9080/ # If this directory exists and has at least ug=rwx permissions, assume the base image includes an SCC called 'openj9_system_scc' and build on it. # If not, build on our own SCC. @@ -49,7 +51,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess" DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy" PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats" -while getopts ":i:s:tdh" OPT +while getopts ":i:s:u:tdhw" OPT do case "$OPT" in i) @@ -65,13 +67,21 @@ do d) TRIM_SCC=no ;; + w) + WARM_ENDPOINT=true + ;; + u) + WARM_ENDPOINT_URL="${OPTARG}" + ;; h) echo \ -"Usage: $0 [-i iterations] [-s size] [-t] [-d] +"Usage: $0 [-i iterations] [-s size] [-t] [-d] [-w] [-u url] -i Number of iterations to run to populate the SCC. (Default: $ITERATIONS) -s Size of the SCC in megabytes (m suffix required). (Default: $SCC_SIZE) -t Trim the SCC to eliminate most of the free space, if any. -d Don't trim the SCC. + -w Use curl to warm an endpoint during SCC creation. (Default: $WARM_ENDPOINT) + -u The URL endpoint to warm during SCC creation. (Default: $WARM_ENDPOINT_URL) Trimming enabled=$TRIM_SCC" exit 1 @@ -98,8 +108,15 @@ if [ $TRIM_SCC == yes ] then echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE." # Populate the newly created class cache layer. - /opt/ibm/wlp/bin/server start - /opt/ibm/wlp/bin/server stop + /opt/ol/wlp/bin/server start + + if [ ${WARM_ENDPOINT} == true ] + then + curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" + fi + + /opt/ol/wlp/bin/server stop + # Find out how full it is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` echo "SCC layer is $FULL% full. Destroying layer." @@ -122,8 +139,14 @@ fi # Server start/stop to populate the /output/workarea and make subsequent server starts faster. for ((i=0; i<$ITERATIONS; i++)) do - /opt/ibm/wlp/bin/server start - /opt/ibm/wlp/bin/server stop + /opt/ol/wlp/bin/server start + + if [ ${WARM_ENDPOINT} == true ] + then + curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" + fi + + /opt/ol/wlp/bin/server stop done # restore umask @@ -136,6 +159,7 @@ then chmod -R g+rwx /output/resources fi + # Tell the user how full the final layer is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` echo "SCC layer is $FULL% full." From d6802783b2f9a41c0fcb1033fd9bb197c9fd6052 Mon Sep 17 00:00:00 2001 From: Joe McClure Date: Thu, 8 Feb 2024 12:14:39 -0500 Subject: [PATCH 2/3] fix logic --- ga/23.0.0.12/kernel/helpers/build/configure.sh | 4 ++-- ga/23.0.0.12/kernel/helpers/build/populate_scc.sh | 5 ++++- ga/23.0.0.9/kernel/helpers/build/configure.sh | 4 ++-- ga/23.0.0.9/kernel/helpers/build/populate_scc.sh | 5 ++++- ga/24.0.0.2/kernel/helpers/build/configure.sh | 4 ++-- ga/24.0.0.2/kernel/helpers/build/populate_scc.sh | 5 ++++- ga/latest/kernel/helpers/build/configure.sh | 4 ++-- ga/latest/kernel/helpers/build/populate_scc.sh | 5 ++++- 8 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ga/23.0.0.12/kernel/helpers/build/configure.sh b/ga/23.0.0.12/kernel/helpers/build/configure.sh index 750dc7611..7a9f03b16 100755 --- a/ga/23.0.0.12/kernel/helpers/build/configure.sh +++ b/ga/23.0.0.12/kernel/helpers/build/configure.sh @@ -179,8 +179,8 @@ function main() { if [ ! "$SCC_SIZE" = "" ]; then cmd+=" -s $SCC_SIZE" fi - if [ "$WARM_ENDPOINT" = "true" ]; then - cmd+=" -w" + if [ "$WARM_ENDPOINT" = "false" ]; then + cmd+=" -c" fi if [ ! "$WARM_ENDPOINT_URL" = "" ]; then cmd+=" -u $WARM_ENDPOINT_URL" diff --git a/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh b/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh index 647afa12e..2a15a8e4f 100755 --- a/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh +++ b/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh @@ -50,7 +50,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess" DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy" PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats" -while getopts ":i:s:u:tdhw" OPT +while getopts ":i:s:u:tdhwc" OPT do case "$OPT" in i) @@ -69,6 +69,9 @@ do w) WARM_ENDPOINT=true ;; + c) + WARM_ENDPOINT=false + ;; u) WARM_ENDPOINT_URL="${OPTARG}" ;; diff --git a/ga/23.0.0.9/kernel/helpers/build/configure.sh b/ga/23.0.0.9/kernel/helpers/build/configure.sh index cd4c210c3..2f2a29cfb 100755 --- a/ga/23.0.0.9/kernel/helpers/build/configure.sh +++ b/ga/23.0.0.9/kernel/helpers/build/configure.sh @@ -176,8 +176,8 @@ function main() { if [ ! "$SCC_SIZE" = "" ]; then cmd+=" -s $SCC_SIZE" fi - if [ "$WARM_ENDPOINT" = "true" ]; then - cmd+=" -w" + if [ "$WARM_ENDPOINT" = "false" ]; then + cmd+=" -c" fi if [ ! "$WARM_ENDPOINT_URL" = "" ]; then cmd+=" -u $WARM_ENDPOINT_URL" diff --git a/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh b/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh index 647afa12e..2a15a8e4f 100755 --- a/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh +++ b/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh @@ -50,7 +50,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess" DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy" PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats" -while getopts ":i:s:u:tdhw" OPT +while getopts ":i:s:u:tdhwc" OPT do case "$OPT" in i) @@ -69,6 +69,9 @@ do w) WARM_ENDPOINT=true ;; + c) + WARM_ENDPOINT=false + ;; u) WARM_ENDPOINT_URL="${OPTARG}" ;; diff --git a/ga/24.0.0.2/kernel/helpers/build/configure.sh b/ga/24.0.0.2/kernel/helpers/build/configure.sh index 750dc7611..7a9f03b16 100755 --- a/ga/24.0.0.2/kernel/helpers/build/configure.sh +++ b/ga/24.0.0.2/kernel/helpers/build/configure.sh @@ -179,8 +179,8 @@ function main() { if [ ! "$SCC_SIZE" = "" ]; then cmd+=" -s $SCC_SIZE" fi - if [ "$WARM_ENDPOINT" = "true" ]; then - cmd+=" -w" + if [ "$WARM_ENDPOINT" = "false" ]; then + cmd+=" -c" fi if [ ! "$WARM_ENDPOINT_URL" = "" ]; then cmd+=" -u $WARM_ENDPOINT_URL" diff --git a/ga/24.0.0.2/kernel/helpers/build/populate_scc.sh b/ga/24.0.0.2/kernel/helpers/build/populate_scc.sh index c2de3f4a5..1854f6989 100755 --- a/ga/24.0.0.2/kernel/helpers/build/populate_scc.sh +++ b/ga/24.0.0.2/kernel/helpers/build/populate_scc.sh @@ -51,7 +51,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess" DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy" PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats" -while getopts ":i:s:u:tdhw" OPT +while getopts ":i:s:u:tdhwc" OPT do case "$OPT" in i) @@ -70,6 +70,9 @@ do w) WARM_ENDPOINT=true ;; + c) + WARM_ENDPOINT=false + ;; u) WARM_ENDPOINT_URL="${OPTARG}" ;; diff --git a/ga/latest/kernel/helpers/build/configure.sh b/ga/latest/kernel/helpers/build/configure.sh index 750dc7611..7a9f03b16 100755 --- a/ga/latest/kernel/helpers/build/configure.sh +++ b/ga/latest/kernel/helpers/build/configure.sh @@ -179,8 +179,8 @@ function main() { if [ ! "$SCC_SIZE" = "" ]; then cmd+=" -s $SCC_SIZE" fi - if [ "$WARM_ENDPOINT" = "true" ]; then - cmd+=" -w" + if [ "$WARM_ENDPOINT" = "false" ]; then + cmd+=" -c" fi if [ ! "$WARM_ENDPOINT_URL" = "" ]; then cmd+=" -u $WARM_ENDPOINT_URL" diff --git a/ga/latest/kernel/helpers/build/populate_scc.sh b/ga/latest/kernel/helpers/build/populate_scc.sh index c2de3f4a5..1854f6989 100755 --- a/ga/latest/kernel/helpers/build/populate_scc.sh +++ b/ga/latest/kernel/helpers/build/populate_scc.sh @@ -51,7 +51,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess" DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy" PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats" -while getopts ":i:s:u:tdhw" OPT +while getopts ":i:s:u:tdhwc" OPT do case "$OPT" in i) @@ -70,6 +70,9 @@ do w) WARM_ENDPOINT=true ;; + c) + WARM_ENDPOINT=false + ;; u) WARM_ENDPOINT_URL="${OPTARG}" ;; From 38fbcb7f36a9467b2e12f73306bec5b3ab54d008 Mon Sep 17 00:00:00 2001 From: Joe McClure Date: Mon, 12 Feb 2024 16:55:33 -0500 Subject: [PATCH 3/3] fix path --- ga/23.0.0.12/kernel/helpers/build/populate_scc.sh | 8 ++++---- ga/23.0.0.9/kernel/helpers/build/populate_scc.sh | 8 ++++---- ga/24.0.0.2/kernel/helpers/build/populate_scc.sh | 8 ++++---- ga/latest/kernel/helpers/build/populate_scc.sh | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh b/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh index 2a15a8e4f..ea255eef9 100755 --- a/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh +++ b/ga/23.0.0.12/kernel/helpers/build/populate_scc.sh @@ -110,14 +110,14 @@ if [ $TRIM_SCC == yes ] then echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE." # Populate the newly created class cache layer. - /opt/ol/wlp/bin/server start + /opt/ibm/wlp/bin/server start if [ ${WARM_ENDPOINT} == true ] then curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" fi - /opt/ol/wlp/bin/server stop + /opt/ibm/wlp/bin/server stop # Find out how full it is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` @@ -141,14 +141,14 @@ fi # Server start/stop to populate the /output/workarea and make subsequent server starts faster. for ((i=0; i<$ITERATIONS; i++)) do - /opt/ol/wlp/bin/server start + /opt/ibm/wlp/bin/server start if [ ${WARM_ENDPOINT} == true ] then curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" fi - /opt/ol/wlp/bin/server stop + /opt/ibm/wlp/bin/server stop done # restore umask diff --git a/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh b/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh index 2a15a8e4f..ea255eef9 100755 --- a/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh +++ b/ga/23.0.0.9/kernel/helpers/build/populate_scc.sh @@ -110,14 +110,14 @@ if [ $TRIM_SCC == yes ] then echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE." # Populate the newly created class cache layer. - /opt/ol/wlp/bin/server start + /opt/ibm/wlp/bin/server start if [ ${WARM_ENDPOINT} == true ] then curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" fi - /opt/ol/wlp/bin/server stop + /opt/ibm/wlp/bin/server stop # Find out how full it is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` @@ -141,14 +141,14 @@ fi # Server start/stop to populate the /output/workarea and make subsequent server starts faster. for ((i=0; i<$ITERATIONS; i++)) do - /opt/ol/wlp/bin/server start + /opt/ibm/wlp/bin/server start if [ ${WARM_ENDPOINT} == true ] then curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" fi - /opt/ol/wlp/bin/server stop + /opt/ibm/wlp/bin/server stop done # restore umask diff --git a/ga/24.0.0.2/kernel/helpers/build/populate_scc.sh b/ga/24.0.0.2/kernel/helpers/build/populate_scc.sh index 1854f6989..19e4974c8 100755 --- a/ga/24.0.0.2/kernel/helpers/build/populate_scc.sh +++ b/ga/24.0.0.2/kernel/helpers/build/populate_scc.sh @@ -111,14 +111,14 @@ if [ $TRIM_SCC == yes ] then echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE." # Populate the newly created class cache layer. - /opt/ol/wlp/bin/server start + /opt/ibm/wlp/bin/server start if [ ${WARM_ENDPOINT} == true ] then curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" fi - /opt/ol/wlp/bin/server stop + /opt/ibm/wlp/bin/server stop # Find out how full it is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` @@ -142,14 +142,14 @@ fi # Server start/stop to populate the /output/workarea and make subsequent server starts faster. for ((i=0; i<$ITERATIONS; i++)) do - /opt/ol/wlp/bin/server start + /opt/ibm/wlp/bin/server start if [ ${WARM_ENDPOINT} == true ] then curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" fi - /opt/ol/wlp/bin/server stop + /opt/ibm/wlp/bin/server stop done # restore umask diff --git a/ga/latest/kernel/helpers/build/populate_scc.sh b/ga/latest/kernel/helpers/build/populate_scc.sh index 1854f6989..19e4974c8 100755 --- a/ga/latest/kernel/helpers/build/populate_scc.sh +++ b/ga/latest/kernel/helpers/build/populate_scc.sh @@ -111,14 +111,14 @@ if [ $TRIM_SCC == yes ] then echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE." # Populate the newly created class cache layer. - /opt/ol/wlp/bin/server start + /opt/ibm/wlp/bin/server start if [ ${WARM_ENDPOINT} == true ] then curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" fi - /opt/ol/wlp/bin/server stop + /opt/ibm/wlp/bin/server stop # Find out how full it is. FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'` @@ -142,14 +142,14 @@ fi # Server start/stop to populate the /output/workarea and make subsequent server starts faster. for ((i=0; i<$ITERATIONS; i++)) do - /opt/ol/wlp/bin/server start + /opt/ibm/wlp/bin/server start if [ ${WARM_ENDPOINT} == true ] then curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing" fi - /opt/ol/wlp/bin/server stop + /opt/ibm/wlp/bin/server stop done # restore umask